diff options
Diffstat (limited to 'admin/extend_for_templates.php')
-rw-r--r-- | admin/extend_for_templates.php | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/admin/extend_for_templates.php b/admin/extend_for_templates.php index cb2845adc..0bab1215e 100644 --- a/admin/extend_for_templates.php +++ b/admin/extend_for_templates.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | Piwigo - a PHP based photo gallery | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org | +// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | // +-----------------------------------------------------------------------+ @@ -113,32 +113,6 @@ $eligible_templates = array( $flip_templates = array_flip($eligible_templates); -/** - * returns an array contening sub-directories, excluding ".svn" - * - * @param string $dir - * @return array - */ -function get_dirs($directory) -{ - $sub_dirs = array(); - if ($opendir = opendir($directory)) - { - while ($file = readdir($opendir)) - { - if ($file != '.' - and $file != '..' - and is_dir($directory.'/'.$file) - and $file != '.svn') - { - array_push($sub_dirs, $file); - } - } - closedir($opendir); - } - return $sub_dirs; -} - $available_templates = array_merge( array('N/A' => '----------'), get_dirs(PHPWG_ROOT_PATH.'themes')); @@ -175,8 +149,7 @@ UPDATE '.CONFIG_TABLE.' WHERE param = \'extents_for_templates\';'; if (pwg_query($query)) { - array_push($page['infos'], - l10n('Templates configuration has been recorded.')); + $page['infos'][] = l10n('Templates configuration has been recorded.'); } } |