mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Fix for missing plugin install/uninstall log info.
This commit is contained in:
@@ -179,10 +179,8 @@ class admin_log_ui extends e_admin_ui
|
||||
|
||||
|
||||
|
||||
var $eventTypes = array();
|
||||
public $eventTypes = array();
|
||||
|
||||
var $eventUsers = array();
|
||||
|
||||
// optional
|
||||
public function init()
|
||||
{
|
||||
@@ -198,15 +196,6 @@ class admin_log_ui extends e_admin_ui
|
||||
}
|
||||
|
||||
asort($this->eventTypes);
|
||||
|
||||
$row = $sql->retrieve("SELECT f.dblog_user_id, u.user_name FROM #admin_log AS f LEFT JOIN #user AS u ON f.dblog_user_id = u.user_id WHERE f.dblog_user_id != 0 GROUP BY dblog_user_id ORDER BY u.user_name",true);
|
||||
foreach($row as $val)
|
||||
{
|
||||
$id = $val['dblog_user_id'];
|
||||
$this->eventUsers[$id] = $val['user_name'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -668,7 +668,8 @@ class pluginManager{
|
||||
e107::getConfig('core')->save();
|
||||
}
|
||||
|
||||
$admin_log->log_event('PLUGMAN_03', $plug['plugin_path'], E_LOG_INFORMATIVE, '');
|
||||
$logInfo = deftrue($plug['plugin_name'],$plug['plugin_name']). " v".$plug['plugin_version']." ({e_PLUGIN}".$plug['plugin_path'].")";
|
||||
$admin_log->log_event('PLUGMAN_03', $logInfo, E_LOG_INFORMATIVE, '');
|
||||
}
|
||||
|
||||
if($_POST['delete_files'])
|
||||
@@ -801,14 +802,24 @@ class pluginManager{
|
||||
{
|
||||
global $plugin,$admin_log,$eplug_folder;
|
||||
$text = $plugin->install_plugin($this->id);
|
||||
|
||||
$log = e107::getAdminLog();
|
||||
|
||||
|
||||
|
||||
if ($text === FALSE)
|
||||
{ // Tidy this up
|
||||
$this->show_message("Error messages above this line", E_MESSAGE_ERROR);
|
||||
}
|
||||
else
|
||||
{
|
||||
$plugin ->save_addon_prefs('update');
|
||||
$admin_log->log_event('PLUGMAN_01', $this->id.':'.$eplug_folder, E_LOG_INFORMATIVE, '');
|
||||
$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);
|
||||
}
|
||||
|
||||
@@ -889,7 +900,11 @@ class pluginManager{
|
||||
|
||||
$eplug_addons = $plugin -> getAddons($eplug_folder);
|
||||
|
||||
$admin_log->log_event('PLUGMAN_02', $eplug_folder, E_LOG_INFORMATIVE, '');
|
||||
$info = $plugin->getinfo($this->id);
|
||||
|
||||
$name = deftrue($info['plugin_name'],$info['plugin_name']). " v".$eplug_version. "({e_PLUGIN}".$info['plugin_path'].")";
|
||||
|
||||
$admin_log->log_event('PLUGMAN_02', $name, E_LOG_INFORMATIVE, '');
|
||||
$text .= (isset($eplug_upgrade_done)) ? '<br />'.$eplug_upgrade_done : "<br />".LAN_UPGRADE_SUCCESSFUL;
|
||||
$sql->update('plugin', "plugin_version ='{$eplug_version}', plugin_addons='{$eplug_addons}' WHERE plugin_id='$this->id' ");
|
||||
$pref['plug_installed'][$plug['plugin_path']] = $eplug_version; // Update the version
|
||||
|
@@ -5767,12 +5767,21 @@ class e_admin_form_ui extends e_form
|
||||
$sql = e107::getDb();
|
||||
$field = $val['field'];
|
||||
|
||||
$query = "SELECT d.".$field.", u.user_name FROM #".$val['table']." AS d LEFT JOIN #user AS u ON d.".$field." = u.user_id WHERE u.user_name != '' GROUP BY d.".$field." ORDER BY u.user_name";
|
||||
$query = "SELECT d.".$field.", u.user_name FROM #".$val['table']." AS d LEFT JOIN #user AS u ON d.".$field." = u.user_id GROUP BY d.".$field." ORDER BY u.user_name";
|
||||
$row = $sql->retrieve($query,true);
|
||||
foreach($row as $data)
|
||||
{
|
||||
$k = $data[$field];
|
||||
$option[$key.'__'.$k] = $data['user_name'];
|
||||
if($k == 0)
|
||||
{
|
||||
$option[$key.'__'.$k] = "(".LAN_ANONYMOUS.")";
|
||||
}
|
||||
else
|
||||
{
|
||||
$option[$key.'__'.$k] = vartrue($data['user_name'],'Unknown');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user