mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-06 01:42:29 +02:00
feature 1514: new screen to manage installed themes; activate, deactivate,
delete, set as default. plugins.class.php was merged back to a state it doesn't manage themes at all. themes.class.php was created instead, from a duplication of plugins.class.php and strongly modified then. feature 1507: the display of available themes is now much more "graphic". git-svn-id: http://piwigo.org/svn/trunk@5153 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -713,21 +713,24 @@ function url_is_remote($url)
|
||||
*/
|
||||
function get_pwg_themes()
|
||||
{
|
||||
global $conf;
|
||||
$themes = array();
|
||||
|
||||
$template_dir = PHPWG_ROOT_PATH.'themes';
|
||||
|
||||
foreach (get_dirs($template_dir) as $theme)
|
||||
$query = '
|
||||
SELECT
|
||||
id,
|
||||
name
|
||||
FROM '.THEMES_TABLE.'
|
||||
ORDER BY name ASC
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
while ($row = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
if ( $theme != 'default' )
|
||||
{
|
||||
array_push($themes, $theme);
|
||||
}
|
||||
$themes[ $row['id'] ] = $row['name'];
|
||||
}
|
||||
|
||||
// plugins want remove some themes based on user status maybe?
|
||||
$themes = trigger_event('get_pwg_themes', $themes);
|
||||
|
||||
return $themes;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user