Browse Source

"Fix" so old prefs do not totally kill conf.pl. Should be reverted when everyone has had a good chance to upgrade their configuration files

pdontthink 19 years ago
parent
commit
e1b66a3a5b
1 changed files with 12 additions and 0 deletions
  1. 12 0
      config/conf.pl

+ 12 - 0
config/conf.pl

@@ -196,6 +196,18 @@ while ( $line = <FILE> ) {
                 $options[1] =~ s/^\.\.\/config/\.\.\/templates/;
             }
             $templateset_id[$sub] = $options[1];
+##### FIXME: This section here so old prefs files don't blow up when running conf.pl
+#####        Remove after a month or two 
+        } elsif ( $options[0] =~ /^aTemplateSet\[[0-9]+\]\[['"]PATH['"]\]/ ) {
+            $sub = $options[0];
+            $sub =~ s/\]\[['"]PATH['"]\]//;
+            $sub =~ s/.*\[//;
+            if ( -e "../templates" ) {
+                $options[1] =~ s/^\.\.\/config/\.\.\/templates/;
+            }
+            $templateset_id[$sub] = $options[1];
+##### FIXME: This section here so old prefs files don't blow up when running conf.pl
+#####        Remove after a month or two 
         } elsif ( $options[0] =~ /^aTemplateSet\[[0-9]+\]\[['"]NAME['"]\]/ ) {
             $sub = $options[0];
             $sub =~ s/\]\[['"]NAME['"]\]//;