* fixed uninstalling plugin

This commit is contained in:
slawkens 2017-10-23 10:13:50 +02:00
parent 72212f8256
commit 28299744c4
3 changed files with 9 additions and 9 deletions

View File

@ -74,7 +74,7 @@ $config = array(
//'2' => 'Your Second World Name' //'2' => 'Your Second World Name'
), ),
// items // images
'outfit_images_url' => 'http://outfit-images.ots.me/outfit.php', // set to animoutfit.php for animated outfit 'outfit_images_url' => 'http://outfit-images.ots.me/outfit.php', // set to animoutfit.php for animated outfit
'item_images_url' => 'http://item-images.ots.me/960/', // set to images/items if you host your own items in images folder 'item_images_url' => 'http://item-images.ots.me/960/', // set to images/items if you host your own items in images folder
@ -111,7 +111,7 @@ $config = array(
// reCAPTCHA (prevent spam bots) // reCAPTCHA (prevent spam bots)
'recaptcha_enabled' => false, // enable recaptcha verification code 'recaptcha_enabled' => false, // enable recaptcha verification code
'recaptcha_site_key' => '', // get your own public and private keys at https://www.google.com/recaptcha 'recaptcha_site_key' => '', // get your own site and secret keys at https://www.google.com/recaptcha
'recaptcha_secret_key' => '', 'recaptcha_secret_key' => '',
'recaptcha_theme' => 'light', // light, dark 'recaptcha_theme' => 'light', // light, dark

View File

@ -84,9 +84,9 @@ CREATE TABLE `myaac_forum_boards`
`name` VARCHAR(32) NOT NULL, `name` VARCHAR(32) NOT NULL,
`description` VARCHAR(255) NOT NULL DEFAULT '', `description` VARCHAR(255) NOT NULL DEFAULT '',
`ordering` INT(11) NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0,
`closed` TINYINT(1) NOT NULL DEFAULT 0,
`guild` INT(11) NOT NULL DEFAULT 0, `guild` INT(11) NOT NULL DEFAULT 0,
`access` INT(11) NOT NULL DEFAULT 0, `access` INT(11) NOT NULL DEFAULT 0,
`closed` TINYINT(1) NOT NULL DEFAULT 0,
`hidden` TINYINT(1) NOT NULL DEFAULT 0, `hidden` TINYINT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE = MyISAM; ) ENGINE = MyISAM;

View File

@ -45,16 +45,16 @@ if(isset($_REQUEST['uninstall'])){
if(!file_exists($filename)) { if(!file_exists($filename)) {
error('Plugin ' . $uninstall . ' does not exist.'); error('Plugin ' . $uninstall . ' does not exist.');
} }
else {
if(!isset($plugin_info['uninstall'])) {
error("Plugin doesn't have uninstall options defined. Skipping...");
}
else { else {
$string = file_get_contents($filename); $string = file_get_contents($filename);
$plugin_info = json_decode($string, true); $plugin_info = json_decode($string, true);
if($plugin_info == false) { if($plugin_info == false) {
error('Cannot load plugin info ' . $uninstall . '.json'); error('Cannot load plugin info ' . $uninstall . '.json');
} }
else {
if(!isset($plugin_info['uninstall'])) {
error("Plugin doesn't have uninstall options defined. Skipping...");
}
else { else {
$success = true; $success = true;
foreach($plugin_info['uninstall'] as $file) { foreach($plugin_info['uninstall'] as $file) {