diff --git a/e107_admin/update_routines.php b/e107_admin/update_routines.php index 848d30471..28957a6ee 100644 --- a/e107_admin/update_routines.php +++ b/e107_admin/update_routines.php @@ -986,7 +986,7 @@ function update_706_to_800($type='') //TODO - send notification messages to Log. - + if($sql->field('page','page_theme') && $sql->gen("SELECT * FROM #page WHERE page_theme != '' AND menu_title = '' LIMIT 1")) { @@ -1004,6 +1004,16 @@ function update_706_to_800($type='') } + if($sql->field('plugin','plugin_releaseUrl')) + { + if ($just_check) return update_needed('plugin_releaseUrl is deprecated and needs to be removed. '); + if($sql->gen("ALTER TABLE `#plugin` DROP `plugin_releaseUrl`")) + { + e107::getMessage()->addDebug("Successfully removed plugin_releaseUrl. "); + } + + } + // --- Notify Prefs diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php index 7db8c5bed..93f1326b1 100644 --- a/e107_handlers/plugin_class.php +++ b/e107_handlers/plugin_class.php @@ -366,8 +366,20 @@ class e107plugin $_installed = ($plug_info['@attributes']['installRequired'] == 'true' || $plug_info['@attributes']['installRequired'] == 1 ? 0 : 1); - if (e107::getDb()->db_Insert("plugin", "0, '".$tp->toDB($pName, true)."', '".$tp->toDB($plug_info['@attributes']['version'], true)."', '".$tp->toDB($plugin_path, true)."',{$_installed}, '{$eplug_addons}', '".$this->manage_category($plug_info['category'])."' ")) - { + + $pInsert = array( + 'plugin_id' => 0, + 'plugin_name' => $tp->toDB($pName, true), + 'plugin_version' => $tp->toDB($plug_info['@attributes']['version'], true), + 'plugin_path' => $tp->toDB($plugin_path, true), + 'plugin_installflag' => $_installed, + 'plugin_addons' => $eplug_addons, + 'plugin_category' => $this->manage_category($plug_info['category']) + ); + + // if (e107::getDb()->db_Insert("plugin", "0, '".$tp->toDB($pName, true)."', '".$tp->toDB($plug_info['@attributes']['version'], true)."', '".$tp->toDB($plugin_path, true)."',{$_installed}, '{$eplug_addons}', '".$this->manage_category($plug_info['category'])."' ")) + if (e107::getDb()->insert("plugin", $pInsert)) + { $mes->addDebug("Added ".$tp->toHTML($pName,false,"defs")." to the plugin table."); } else