* 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'
),
// items
// images
'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
@ -111,7 +111,7 @@ $config = array(
// reCAPTCHA (prevent spam bots)
'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_theme' => 'light', // light, dark

View File

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

View File

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