X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=class%2Ftemplate%2FTemplate.class.php;h=284be85bab402ab32f674bbf02d904770e4aec52;hp=df6cc7a80b3a4696e9bd9e2fe7fd35f3d958431d;hb=1f270d3ccac30fd2e794923ff9aa0e0f07f59772;hpb=7ca9685a9fdc22d572f092257f8411906dfa5122 diff --git a/class/template/Template.class.php b/class/template/Template.class.php index df6cc7a8..284be85b 100644 --- a/class/template/Template.class.php +++ b/class/template/Template.class.php @@ -8,7 +8,7 @@ * class with any custom functionality needed to interface a target * templating engine with SquirrelMail. * - * @copyright © 2003-2006 The SquirrelMail Project Team + * @copyright © 2003-2007 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -712,6 +712,8 @@ class Template * are catalogued; for identically named files, the file earlier * in the hierarchy (closest to this template set) is used. * + * Refuses to traverse directories called ".svn" + * * @param string $template_set_id The template set in which to * search for files * @param array $file_list The file list so far to be added @@ -743,6 +745,12 @@ class Template $directory = $template_base_dir; } + + // bail if we have been asked to traverse a Subversion directory + // + if (strpos($directory, '/.svn') === strlen($directory) - 5) return $file_list; + + $files_and_dirs = list_files($directory, '', FALSE, TRUE, FALSE, TRUE); // recurse for all the subdirectories in the template set @@ -1186,9 +1194,10 @@ class Template $return_array = array(); foreach ($css_directories as $directory) { - // CVS directories are not wanted + // CVS and SVN directories are not wanted // - if (strpos($directory, '/CVS') === strlen($directory) - 4) continue; + if ((strpos($directory, '/CVS') === strlen($directory) - 4) + || (strpos($directory, '/.svn') === strlen($directory) - 5)) continue; $pretty_name = ucwords(str_replace('_', ' ', basename($directory)));