mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-03 08:22:24 +02:00
fixes #1841 register system activities
This commit is contained in:
@@ -96,6 +96,7 @@ class themes
|
||||
$theme_maintain = self::build_maintain_class($theme_id);
|
||||
|
||||
$errors = array();
|
||||
$activity_details = array('theme_id'=>$theme_id);
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
@@ -144,6 +145,8 @@ INSERT INTO '.THEMES_TABLE.'
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
$activity_details['version'] = $this->fs_themes[$theme_id]['version'];
|
||||
|
||||
if ($this->fs_themes[$theme_id]['mobile'])
|
||||
{
|
||||
conf_update_param('mobile_theme', $theme_id);
|
||||
@@ -236,6 +239,9 @@ DELETE
|
||||
$this->set_default_theme($theme_id);
|
||||
break;
|
||||
}
|
||||
|
||||
pwg_activity('system', ACTIVITY_SYSTEM_THEME, $action, $activity_details);
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
@@ -577,7 +583,7 @@ SELECT
|
||||
* @param string - remote revision identifier (numeric)
|
||||
* @param string - theme id or extension id
|
||||
*/
|
||||
function extract_theme_files($action, $revision, $dest)
|
||||
function extract_theme_files($action, $revision, $dest, &$theme_id=null)
|
||||
{
|
||||
global $logger;
|
||||
|
||||
@@ -614,13 +620,13 @@ SELECT
|
||||
$root = dirname($main_filepath); // main.inc.php path in archive
|
||||
if ($action == 'upgrade')
|
||||
{
|
||||
$extract_path = PHPWG_THEMES_PATH . $dest;
|
||||
$theme_id = $dest;
|
||||
}
|
||||
else
|
||||
{
|
||||
$extract_path = PHPWG_THEMES_PATH . ($root == '.' ? 'extension_' . $dest : basename($root));
|
||||
$theme_id = ($root == '.' ? 'extension_' . $dest : basename($root));
|
||||
}
|
||||
|
||||
$extract_path = PHPWG_THEMES_PATH . $theme_id;
|
||||
$logger->debug(__FUNCTION__.', $extract_path = '.$extract_path);
|
||||
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user