function newpoints_shop_uninstall() { global $db; $db->write_query("ALTER TABLE `" . TABLE_PREFIX . "users` DROP `newpoints_items`;"); $db->write_query("ALTER TABLE `" . TABLE_PREFIX . "newpoints_grouprules` DROP `items_rate`;"); // delete settings newpoints_remove_settings("'newpoints_shop_sendable','newpoints_shop_sellable','newpoints_shop_lastpurchases','newpoints_shop_percent','newpoints_shop_viewothers','newpoints_shop_itemsprofile','newpoints_shop_itemspostbit'"); rebuild_settings(); if ($db->table_exists('newpoints_shop_categories')) { $db->drop_table('newpoints_shop_categories'); } if ($db->table_exists('newpoints_shop_items')) { $db->drop_table('newpoints_shop_items'); } newpoints_remove_log(array('shop_purchase', 'shop_send', 'shop_sell')); }
function newpoints_buy_sticky_uninstall() { global $db, $cache; // Remove the plugin columns, if any... !$db->field_exists('buy_sticky', 'newpoints_shop_items') or $db->drop_column('newpoints_shop_items', 'buy_sticky'); !$db->field_exists('buy_sticky_time', 'newpoints_shop_items') or $db->drop_column('newpoints_shop_items', 'buy_sticky_time'); // Clean any logs from this plugin. newpoints_remove_log(array('buy_sticky')); // Delete version from cache $plugins = (array) $cache->read('ougc_plugins'); if (isset($plugins['newpoints_buy_sticky'])) { unset($plugins['newpoints_buy_sticky']); } if (!empty($plugins)) { $cache->update('ougc_plugins', $plugins); } else { $cache->delete('ougc_plugins'); } }