From 16034a592a32d9a6a0af0ed04c27ad4cf28cd844 Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 20 Feb 2006 22:14:24 +0000 Subject: request 290: replace function get_themes name to avoid redeclaration from Wordpress in jillij template. git-svn-id: http://piwigo.org/svn/trunk@1048 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions.inc.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'include/functions.inc.php') diff --git a/include/functions.inc.php b/include/functions.inc.php index 1c106233b..5dc764193 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -546,19 +546,17 @@ function url_is_remote($url) } /** - * returns available templates/themes + * returns available template/theme */ -function get_templates() -{ - return get_dirs(PHPWG_ROOT_PATH.'theme'); -} -function get_themes() +function get_pwg_themes() { $themes = array(); - foreach (get_dirs(PHPWG_ROOT_PATH.'template') as $template) + $template_dir = PHPWG_ROOT_PATH.'template'; + + foreach (get_dirs($template_dir) as $template) { - foreach (get_dirs(PHPWG_ROOT_PATH.'template/'.$template.'/theme') as $theme) + foreach (get_dirs($template_dir.'/'.$template.'/theme') as $theme) { array_push($themes, $template.'/'.$theme); } -- cgit v1.2.3