mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-26 19:29:58 +03:00
Issue 329: Added event triggers to activate/deactive theme actions.
This commit is contained in:
parent
b31d68fbd9
commit
57fb560ce1
1 changed files with 13 additions and 0 deletions
|
@ -148,6 +148,14 @@ INSERT INTO '.THEMES_TABLE.'
|
||||||
{
|
{
|
||||||
conf_update_param('mobile_theme', $theme_id);
|
conf_update_param('mobile_theme', $theme_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Trigger event with new theme list.
|
||||||
|
$this->db_themes_by_id[$theme_id] = [
|
||||||
|
'id' => $theme_id,
|
||||||
|
'version' => $this->fs_themes[$theme_id]['version'],
|
||||||
|
'name' => $this->fs_themes[$theme_id]['name'],
|
||||||
|
];
|
||||||
|
trigger_change('get_pwg_themes', $this->db_themes_by_id);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -201,6 +209,11 @@ DELETE
|
||||||
{
|
{
|
||||||
conf_update_param('mobile_theme', '');
|
conf_update_param('mobile_theme', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Trigger event with new theme list.
|
||||||
|
unset($this->db_themes_by_id[$theme_id]);
|
||||||
|
trigger_change('get_pwg_themes', $this->db_themes_by_id);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'delete':
|
case 'delete':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue