diff options
author | plegall <plg@piwigo.org> | 2010-03-13 00:00:52 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2010-03-13 00:00:52 +0000 |
commit | 14778ce673277f2df41f963aa70df1cbed427294 (patch) | |
tree | 8c723d4d9827876dbf19d2bd581405fc50910860 /include/functions.inc.php | |
parent | c396f08708d431c6f7e8656eaca4fd8e440fdd39 (diff) |
feature 1502: based on Dotclear model, P@t has reorganized the way Piwigo
manages template/theme in a simpler "theme only level" architecture. It
supports multiple level inheritance.
git-svn-id: http://piwigo.org/svn/trunk@5123 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/functions.inc.php | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php index 6659d582e..7eee41d57 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -611,12 +611,11 @@ function redirect_html( $url , $msg = '', $refresh_time = 0) load_language('common.lang'); trigger_action('loading_lang'); load_language('local.lang', '', array('no_fallback'=>true) ); - list($tmpl, $thm) = explode('/', get_default_template()); - $template = new Template(PHPWG_ROOT_PATH.'template/'.$tmpl, $thm); + $template = new Template(PHPWG_ROOT_PATH.'themes', get_default_theme()); } else { - $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template'], $user['theme']); + $template = new Template(PHPWG_ROOT_PATH.'themes', $user['theme']); } if (empty($msg)) @@ -710,24 +709,21 @@ function url_is_remote($url) } /** - * returns available template/theme + * returns available themes */ function get_pwg_themes() { global $conf; $themes = array(); - $template_dir = PHPWG_ROOT_PATH.'template'; + $template_dir = PHPWG_ROOT_PATH.'themes'; - foreach (get_dirs($template_dir) as $template) + foreach (get_dirs($template_dir) as $theme) { - if ( $template != 'default' ) - { - foreach (get_dirs($template_dir.'/'.$template.'/theme') as $theme) - { - array_push($themes, $template.'/'.$theme); - } - } + if ( $theme != 'default' ) + { + array_push($themes, $theme); + } } // plugins want remove some themes based on user status maybe? |