Support Tickets - CMS - Plugin Blog uninstall.php

CMS - Plugin Blog uninstall.php

CMS 09.10.2016 2157 Feedback Status: Closed Solution: Yes bluesatkv


Fix bug in Plugin Blog - uninstall.php

$jakdb->query('DELETE FROM tagcloud WHERE tag = "' . smartsql($row['tag']) . '"')
$jakdb->query('DELETE FROM ' . DB_PREFIX . 'tagcloud WHERE tag = "' . smartsql($row['tag']) . '"');

and then

$jakdb->query('UPDATE tagcloud SET count = count - 1 WHERE tag = "' . smartsql($row['tag']) . '"');
$jakdb->query('UPDATE ' . DB_PREFIX . 'tagcloud SET count = count - 1 WHERE tag = "' . smartsql($row['tag']) . '"');

thx


Replies (3)

  • avatar Jerome

    The missing table prefix has been added on all plugins otherwise the code is correct.

    // Now delete all tags
    $result = $jakdb->query('SELECT tag FROM '.DB_PREFIX.'tags WHERE pluginid = "'.smartsql($rows['id']).'"');
    while ($row = $result->fetch_assoc()) {

    $result1 = $jakdb->query('SELECT count FROM '.DB_PREFIX.'tagcloud WHERE tag = "'.smartsql($row['tag']).'" LIMIT 1');
    $count = $result1->fetch_assoc();

    if ($count['count'] <= '1') {
    $jakdb->query('DELETE FROM '.DB_PREFIX.'tagcloud WHERE tag = "'.smartsql($row['tag']).'"');

    } else {

    $jakdb->query('UPDATE '.DB_PREFIX.'tagcloud SET count = count - 1 WHERE tag = "'.smartsql($row['tag']).'"');

    }
    }

    $jakdb->query('DELETE FROM '.DB_PREFIX.'tags WHERE pluginid = "'.smartsql($rows['id']).'"');

    09.10.2016 0
  • avatar bluesatkv

    All is OK, thx

    09.10.2016 0
  • avatar Jerome

    Fixed in the upcoming relase 2.3.

    *** Ticket closed ***

    09.12.2016 0