fixed bug in conf.pl that didn't let you have more than 10 themes
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 15 Jul 2000 12:30:20 +0000 (12:30 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 15 Jul 2000 12:30:20 +0000 (12:30 +0000)
removed unnecessary condition in download.php

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@619 7612ce4b-ef26-0410-bec9-ea0150e637f0

config/conf.pl
src/download.php

index a8648ff..8912bb3 100755 (executable)
@@ -50,7 +50,8 @@ while ($line = <FILE>) {
          } elsif ($options[0] =~ /^theme\[[0-9]+\]\["NAME"\]/) {
             $sub = $options[0];
             $sub =~ s/\]\["NAME"\]//;
-            $sub = substr ($sub, @sub-1, 1);
+            $sub =~ s/.*\[//; 
+            #$sub = substr ($sub, @sub-1, 1);
             $theme_name[$sub] = $options[1];
          } elsif ($options[0] =~ /^ldap_server\[[0-9]+\]/) {
             $sub = $options[0];
index bf44bbe..5302bfb 100644 (file)
@@ -31,7 +31,8 @@
 
       echo "<BR><TABLE WIDTH=90% BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER><TR><TD BGCOLOR=\"$color[0]\">";
       echo "<B><CENTER>";
-      echo _("Viewing a plain text attachment");
+      echo _("Viewing a text attachment") . " - ";
+      echo "<a href=\"read_body.php?mailbox=$mailbox&passed_id=$id\">". _("View message") . "</a>";
       echo "</CENTER></B>";
       echo "</TD></TR><TR><TD BGCOLOR=\"$color[4]\">";
       $urlmailbox = urlencode($mailbox);
             echo $body;
             break;
       }
-#   } else if ($view == "true") {
-#      $body = decodeBody ($body, $header->encoding);
-#      header("Content-type: $type0/$type1; name=\"$filename\"");
-#      header("Content-disposition: attachment; filename=\"$filename\"");
-#      echo $body;
    } else {
       switch ($type0) {
          case "text":
             break;
          default:
             $body = decodeBody($body, $header->encoding);
-            header("Content-type: applicatin/octet-stream; name=\"$filename\"");
+            header("Content-type: $type0/$type1; name=\"$filename\"");
             header("Content-Disposition: attachment; filename=\"$filename\"");
             echo $body;
             break;