/** * **************************************************** * UPDATE * **************************************************** */ function update() { codebase_query(Lang::item('admin.update'), 'plugins' . DS . 'forum' . DS . 'sql' . DS . 'update.sql'); forum::message(Lang::item('common.message'), Lang::item('admin.update_success'), 'forum.php?c=admin', 3); }
function codebase_uninstall() { global $CONFIG; $superCage = Inspekt::makeSuperCage(); if (!$superCage->post->keyExists('drop')) { return 1; } @unlink('forum.php'); if ($superCage->post->getInt('drop') == 0) { return true; } else { $plugin_id = $superCage->get->getInt('p'); $result = cpg_db_query("SELECT path FROM `{$CONFIG['TABLE_PREFIX']}plugins` WHERE plugin_id='{$plugin_id}';"); $row = cpg_db_fetch_row($result); $plugin_name = $row['path']; $uninstall_sql_file = 'plugins' . DS . $plugin_name . DS . 'sql' . DS . 'uninstall.sql'; codebase_query('Drop the database', $uninstall_sql_file); return true; } }