-
Notifications
You must be signed in to change notification settings - Fork 0
/
uninstall.php
29 lines (25 loc) · 1.17 KB
/
uninstall.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
require_once("init.php");
//For security purposes, it is MANDATORY that this page be wrapped in the following
//if statement. This prevents remote execution of this code.
if (in_array($user->data()->id, $master_account)){
$db = DB::getInstance();
include "plugin_info.php";
//all actions should be performed here.
//you will probably be doing more than removing the item from the db
//$db->query("ALTER TABLE settings DROP plg_sez_sezlogin");
//$db->query("ALTER TABLE settings DROP plg_sez_sezid");
//$db->query("ALTER TABLE settings DROP plg_sez_sezsecret");
//$db->query("ALTER TABLE settings DROP plg_sez_sezcallback");
//$db->query("ALTER TABLE settings DROP plg_sez_sezfinalredir");
//$db->query("ALTER TABLE users DROP plg_sez_uid");
$db->query("DELETE FROM us_plugins WHERE plugin = ?",array($plugin_name));
deRegisterHooks($plugin_name);
if(!$db->error()) {
err($plugin_name.' uninstalled');
logger($user->data()->id,"USPlugins", $plugin_name. " uninstalled");
} else {
err($plugin_name.' was not uninstalled');
logger($user->data()->id,"USPlugins","Failed to uninstall Plugin, Error: ".$db->errorString());
}
} //do not perform actions outside of this statement