mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
fixes #1841 register system activities
This commit is contained in:
@@ -190,6 +190,20 @@ function ws_extensions_update($params, $service)
|
||||
{
|
||||
$upgrade_status = $extension->extract_theme_files('upgrade', $revision, $extension_id);
|
||||
$extension_name = $extension->fs_themes[$extension_id]['name'];
|
||||
|
||||
$activity_details = array('theme_id'=>$extension_id, 'from_version'=>$extension->fs_themes[$extension_id]['version']);
|
||||
|
||||
if ('ok' == $upgrade_status)
|
||||
{
|
||||
$extension->get_fs_themes(); // refresh list
|
||||
$activity_details['to_version'] = $extension->fs_themes[$extension_id]['version'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$activity_details['result'] = 'error';
|
||||
}
|
||||
|
||||
pwg_activity('system', ACTIVITY_SYSTEM_THEME, 'update', $activity_details);
|
||||
}
|
||||
else if ($type == 'languages')
|
||||
{
|
||||
|
||||
@@ -446,23 +446,24 @@ SELECT
|
||||
occured_on,
|
||||
details,
|
||||
user_agent
|
||||
FROM '.ACTIVITY_TABLE;
|
||||
FROM '.ACTIVITY_TABLE.'
|
||||
WHERE object != \'system\'';
|
||||
|
||||
if (isset($param['uid']))
|
||||
{
|
||||
$query.= '
|
||||
WHERE performed_by = '.$param['uid'];
|
||||
AND performed_by = '.$param['uid'];
|
||||
}
|
||||
elseif ('none' == $conf['activity_display_connections'])
|
||||
{
|
||||
$query.= '
|
||||
WHERE action NOT IN (\'login\', \'logout\')';
|
||||
AND action NOT IN (\'login\', \'logout\')';
|
||||
}
|
||||
elseif ('admins_only' == $conf['activity_display_connections'])
|
||||
{
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
||||
$query.= '
|
||||
WHERE NOT (action IN (\'login\', \'logout\') AND object_id NOT IN ('.implode(',', get_admins()).'))';
|
||||
AND NOT (action IN (\'login\', \'logout\') AND object_id NOT IN ('.implode(',', get_admins()).'))';
|
||||
}
|
||||
|
||||
$query.= '
|
||||
|
||||
Reference in New Issue
Block a user