[geeklog-cvs] geeklog: Only open theme directory when needed

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Mar 1 15:31:45 EST 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/e6d01d19b66b
changeset: 6815:e6d01d19b66b
user:      Dirk Haun <dirk at haun-online.de>
date:      Sun Mar 01 16:44:29 2009 +0100
description:
Only open theme directory when needed

diffstat:

1 file changed, 3 insertions(+), 3 deletions(-)
public_html/lib-common.php |    6 +++---

diffs (30 lines):

diff -r 15dc24cdaccb -r e6d01d19b66b public_html/lib-common.php
--- a/public_html/lib-common.php	Sun Mar 01 16:33:31 2009 +0100
+++ b/public_html/lib-common.php	Sun Mar 01 16:44:29 2009 +0100
@@ -144,7 +144,7 @@
     } else {
         $curPHPIncludePath = $_CONF['path_pear'] . PATH_SEPARATOR
                            . $curPHPIncludePath;
-    } 
+    }
 
     if (set_include_path($curPHPIncludePath) === false) {
         COM_errorLog('set_include_path failed - there may be problems using the PEAR classes.', 1);
@@ -528,8 +528,6 @@
 
     $themes = array();
 
-    $fd = opendir( $_CONF['path_themes'] );
-
     // If users aren't allowed to change their theme then only return the default theme
 
     if(( $_CONF['allow_user_themes'] == 0 ) && !$all )
@@ -538,6 +536,8 @@
     }
     else
     {
+        $fd = opendir( $_CONF['path_themes'] );
+
         while(( $dir = @readdir( $fd )) == TRUE )
         {
             if( is_dir( $_CONF['path_themes'] . $dir) && $dir <> '.' && $dir <> '..' && $dir <> 'CVS' && substr( $dir, 0 , 1 ) <> '.' )



More information about the geeklog-cvs mailing list