1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 13:17:24 +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()
{
global $plugin,$admin_log,$eplug_folder;
$text = $plugin->install_plugin($this->id);
$text = $plugin->install_plugin($this->id);
$log = e107::getAdminLog();
if ($text === FALSE)
{ // Tidy this up
$this->show_message(EPL_ADLAN_99, E_MESSAGE_ERROR);
}
else
{
$plugin->save_addon_prefs('update');
$info = $plugin->getinfo($this->id);
$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, '');
$this->show_message($text, E_MESSAGE_SUCCESS);
}
if ($text === FALSE)
{ // Tidy this up
$this->show_message(EPL_ADLAN_99, E_MESSAGE_ERROR);
}
else
{
$plugin->save_addon_prefs('update');
$info = $plugin->getinfo($this->id);
$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, '');
$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_229',"Refresh");
define('LAN_UPGRADE_SUCCESSFUL', "Upgrade Successful");
define('LAN_INSTALL_SUCCESSFUL', "Installation Successful");
define('LAN_INSTALL_FAIL', "Instalation Failed");
define('LAN_UPGRADE_SUCCESSFUL', "Upgrade successful");
define('LAN_INSTALL_SUCCESSFUL', "Installation successful");
define('LAN_INSTALL_FAIL', "Installation failed!");
?>