Browse Source

fixed bug that added index.php as a theme when autodetecting

Luke Ehresman 25 năm trước cách đây
mục cha
commit
3d73002fa2
1 tập tin đã thay đổi với 14 bổ sung12 xóa
  1. 14 12
      config/conf.pl

+ 14 - 12
config/conf.pl

@@ -1249,19 +1249,21 @@ sub command41 {
          $cnt = 0;
          $cnt = 0;
          while ($cnt <= $#files) {
          while ($cnt <= $#files) {
             $filename = "../themes/" . $files[$cnt];
             $filename = "../themes/" . $files[$cnt];
-            $found = 0;
-            for ($x=0; $x <= $#theme_path; $x++) {
-               if ($theme_path[$x] eq $filename) {
-                  $found = 1;
+               if ($filename ne "../themes/index.php") {
+               $found = 0;
+               for ($x=0; $x <= $#theme_path; $x++) {
+                  if ($theme_path[$x] eq $filename) {
+                     $found = 1;
+                  }
+               }
+               if ($found != 1) {
+                  print "** Found theme: $filename\n";
+                  print "   What is its name? ";
+                  $nm = <STDIN>;
+                  $nm =~ s/[\n|\r]//g;
+                  $theme_name[$#theme_name+1] = $nm;
+                  $theme_path[$#theme_path+1] = $filename;
                }
                }
-            }
-            if ($found != 1) {
-               print "** Found theme: $filename\n";
-               print "   What is its name? ";
-               $nm = <STDIN>;
-               $nm =~ s/[\n|\r]//g;
-               $theme_name[$#theme_name+1] = $nm;
-               $theme_path[$#theme_path+1] = $filename;
             }
             }
             $cnt++;
             $cnt++;
          }
          }