mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-09 10:13:00 +02:00
improvement: dynamically activate all installed themes (with checks on
parent availability and so on). git-svn-id: http://piwigo.org/svn/trunk@5340 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -123,4 +123,19 @@ function available_engines()
|
||||
|
||||
return $engines;
|
||||
}
|
||||
|
||||
/**
|
||||
* Automatically activate all themes in the "themes" directory.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function activate_all_themes()
|
||||
{
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/themes.class.php');
|
||||
$themes = new themes();
|
||||
foreach ($themes->fs_themes as $theme_id => $fs_theme)
|
||||
{
|
||||
$themes->perform_action('activate', $theme_id);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -81,6 +81,12 @@ class themes
|
||||
break;
|
||||
}
|
||||
|
||||
if ('default' == $theme_id)
|
||||
{
|
||||
// you can't activate the "default" theme
|
||||
break;
|
||||
}
|
||||
|
||||
$missing_parent = $this->missing_parent_theme($theme_id);
|
||||
if (isset($missing_parent))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user