logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

SF.net SVN: squirrelmail: [12509] trunk/squirrelmail/class/template/ Templa: msg#00016

Subject: SF.net SVN: squirrelmail: [12509] trunk/squirrelmail/class/template/ Template.class.php
Revision: 12509
          
http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=12509&view=rev
Author:   pdontthink
Date:     2007-07-07 17:25:23 -0700 (Sat, 07 Jul 2007)

Log Message:
-----------
Don't include svn files in any of the cached template files

Modified Paths:
--------------
    trunk/squirrelmail/class/template/Template.class.php

Modified: trunk/squirrelmail/class/template/Template.class.php
===================================================================
--- trunk/squirrelmail/class/template/Template.class.php        2007-07-07 
05:43:28 UTC (rev 12508)
+++ trunk/squirrelmail/class/template/Template.class.php        2007-07-08 
00:25:23 UTC (rev 12509)
@@ -712,6 +712,8 @@
       * 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 @@
             $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 @@
         $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)));
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


<Prev in Thread] Current Thread [Next in Thread>