1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 12:20:44 +02:00

#1196 - Check for dependencies on plugin installation (cleanup)

More cleaning needed
This commit is contained in:
Tijn Kuyper
2016-02-07 20:17:19 +01:00
parent 2976754d29
commit 82969eaa1c
2 changed files with 20 additions and 19 deletions

View File

@@ -945,31 +945,32 @@ class pluginManager{
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// TODO FIXME - This needs cleaning: e107::getMessage(), limit the globals, etc.
function pluginInstall() function pluginInstall()
{ {
global $plugin,$admin_log,$eplug_folder; global $plugin,$admin_log,$eplug_folder;
$text = $plugin->install_plugin($this->id); $text = $plugin->install_plugin($this->id);
$log = e107::getAdminLog(); $log = e107::getAdminLog();
if ($text === FALSE) if ($text === FALSE)
{ // Tidy this up { // Tidy this up
$this->show_message(EPL_ADLAN_99, E_MESSAGE_ERROR); $this->show_message(EPL_ADLAN_99, E_MESSAGE_ERROR);
} }
else else
{ {
$plugin->save_addon_prefs('update'); $plugin->save_addon_prefs('update');
$info = $plugin->getinfo($this->id); $info = $plugin->getinfo($this->id);
$name = deftrue($info['plugin_name'],$info['plugin_name']). " v".$info['plugin_version']. "({e_PLUGIN}".$info['plugin_path'].")"; $name = deftrue($info['plugin_name'],$info['plugin_name']). " v".$info['plugin_version']. "({e_PLUGIN}".$info['plugin_path'].")";
$log->log_event('PLUGMAN_01', $name, E_LOG_INFORMATIVE, ''); $log->log_event('PLUGMAN_01', $name, E_LOG_INFORMATIVE, '');
$this->show_message($text, E_MESSAGE_SUCCESS); $this->show_message($text, E_MESSAGE_SUCCESS);
} }
} }

View File

@@ -269,8 +269,8 @@ define ('EPL_ADLAN_227',"Scan for Changes");
define ('EPL_ADLAN_228',"Plugin folders are scanned every [x] minutes for changes. Click the button below to scan now."); define ('EPL_ADLAN_228',"Plugin folders are scanned every [x] minutes for changes. Click the button below to scan now.");
define ('EPL_ADLAN_229',"Refresh"); define ('EPL_ADLAN_229',"Refresh");
define('LAN_UPGRADE_SUCCESSFUL', "Upgrade Successful"); define('LAN_UPGRADE_SUCCESSFUL', "Upgrade successful");
define('LAN_INSTALL_SUCCESSFUL', "Installation Successful"); define('LAN_INSTALL_SUCCESSFUL', "Installation successful");
define('LAN_INSTALL_FAIL', "Instalation Failed"); define('LAN_INSTALL_FAIL', "Installation failed!");
?> ?>