- added variable initalization and check on variable
authorvanmer <vanmer@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 9 Jul 2006 22:37:35 +0000 (22:37 +0000)
committervanmer <vanmer@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 9 Jul 2006 22:37:35 +0000 (22:37 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11385 7612ce4b-ef26-0410-bec9-ea0150e637f0

templates/default/stylelink.tpl

index 2c514b7ec610ec9b2007fecef2d1d56e372cab23..45d87a6abb42c8a5cb833d70963a52a8b9715c43 100644 (file)
@@ -58,8 +58,8 @@ echo $css_link_html;
 **/
 function list_css_files($cssdir,$cssroot) {
     if (!$cssroot OR !$cssdir) return false;
 **/
 function list_css_files($cssdir,$cssroot) {
     if (!$cssroot OR !$cssdir) return false;
+    $files=array();
    if (is_dir($cssdir)) {
    if (is_dir($cssdir)) {
-        $files=array();
         if ($dh = opendir($cssdir)) {
             while (($file = readdir($dh)) !== false) {
                 if ((strlen($file)>3) AND strtolower(substr($file,strlen($file)-3,3))=='css') {
         if ($dh = opendir($cssdir)) {
             while (($file = readdir($dh)) !== false) {
                 if ((strlen($file)>3) AND strtolower(substr($file,strlen($file)-3,3))=='css') {
@@ -69,7 +69,7 @@ function list_css_files($cssdir,$cssroot) {
         }
         closedir($dh);
     }
         }
         closedir($dh);
     }
-    if ($files) {
+    if (count($files)>0) {
 //        sort($files);
         return $files;
     }
 //        sort($files);
         return $files;
     }
@@ -125,6 +125,9 @@ function css_link($url, $name = null, $alt = true, $mtype = 'screen', $xhtml_end
 
 /**
  * $Log$
 
 /**
  * $Log$
+ * Revision 1.2  2006/07/09 22:37:35  vanmer
+ * - added variable initalization and check on variable
+ *
  * Revision 1.1  2006/07/09 22:23:03  vanmer
  * - intial revision of a template to display CSS links at the top of the page
  *
  * Revision 1.1  2006/07/09 22:23:03  vanmer
  * - intial revision of a template to display CSS links at the top of the page
  *