fixed some bugs in url parsing, and in conf.pl
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 1 Aug 2000 10:18:27 +0000 (10:18 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 1 Aug 2000 10:18:27 +0000 (10:18 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@663 7612ce4b-ef26-0410-bec9-ea0150e637f0

config/conf.pl
functions/url_parser.php

index 2d6e34d740f486ae7f197533e0234aa92dfb059f..1bb23ae2bbbe58e42afc3bdfc7ce85bea534b05b 100755 (executable)
@@ -224,12 +224,13 @@ if (!$default_unseen_type) {
 
 while (($command ne "q") && ($command ne "Q")) {
    system "clear";
-   if ($menu == 0) {
-      print $WHT."SquirrelMail Configuration : ".$NRM;
-      if ($config == 1) { print "Read: config.php"; }
-      elsif ($config == 2) { print "Read: config_default.php"; }
-      print "\n";
+   print $WHT."SquirrelMail Configuration : ".$NRM;
+   if ($config == 1) { print "Read: config.php"; }
+   elsif ($config == 2) { print "Read: config_default.php"; }
+   print "\n";
+   print "---------------------------------------------------------\n";
 
+   if ($menu == 0) {
       print $WHT."Main Menu --\n".$NRM;
       print "1.  Organization Preferences\n";
       print "2.  Server Settings\n";
@@ -1475,6 +1476,12 @@ sub save_data {
 
 sub set_defaults {
    system "clear";
+   print $WHT."SquirrelMail Configuration : ".$NRM;
+   if ($config == 1) { print "Read: config.php"; }
+   elsif ($config == 2) { print "Read: config_default.php"; }
+   print "\n";
+   print "---------------------------------------------------------\n";
+
    print "While we have been building SquirrelMail, we have discovered some\n";
    print "preferences that work better with some servers that don't work so\n";
    print "well with others.  If you select your IMAP server, this option will\n";
@@ -1541,12 +1548,21 @@ sub set_defaults {
                        $sent_folder = "INBOX/Sent Items";
                        $show_prefix_option = false;
                        $show_contain_subfolders_option = false;
-                       
                        $imap_server_type = "exchange";
          
+         print "          default_folder_prefix = INBOX/\n";
+         print "           default_sub_of_inbox = true\n";
+         print "                   trash_folder = \"INBOX/Deleted Items\"\n";
+         print "                    sent_folder = \"INBOX/Sent Items\"\n";
+         print "             show_prefix_option = false\n";
+         print " show_contain_subfolders_option = false\n";
+         print "               imap_server_type = exchange\n";
+         
                        $continue = 1;
       } elsif ($server eq "courier") {
                        $imap_server_type = "courier";
+
+         print "   imap_server_type = courier\n";
                        
          $continue = 1;
                } elsif ($server eq "quit") {
index 64e308a5dbc8fa33f288081d6bcf430b9b152f3c..f70580cc519f97142771a9bd3fe92860dfc37546 100644 (file)
@@ -34,7 +34,8 @@
    function parseUrl ($body) {
       #Possible ways a URL could finish.
 
-      $poss_ends=array(" ", "\n", "\r", "<", ">", ".\r", ".\n", ".&nbsp", "&nbsp", ")", "(","&quot");
+      $poss_ends=array(" ", "\n", "\r", "<", ">", ".\r", ".\n", ".&nbsp;", "&nbsp;", ")", "(", 
+                       "&quot;", "&lt;", "&gt;", ".<");
       $done=False;
       while (!$done) {
          #Look for when a URL starts
                if ($end == 0) $end = $enda;
                if ($enda < $end and $enda != 0) $end = $enda;
             } 
+            if (!$end) $end = strlen($body);
             #Extract URL
             $url = substr($body,$where,$end-$where);
             #Replace URL with HyperLinked Url
             if ($url != "") {
                $url_str = "<a href=\"$url\" target=\"_blank\">$url</a>";
                #    $body = str_replace($url,$url_str,$body); 
+               echo "$where, $end<br>";
                $body = replaceBlock($body,$url_str,$where,$end);
                $start = strpos($body,"</a>",$where);
             } else {