From 612eda0a34f624b875bd2800a19e59bab83c2df3 Mon Sep 17 00:00:00 2001 From: lkehresman Date: Tue, 1 Aug 2000 10:18:27 +0000 Subject: [PATCH] fixed some bugs in url parsing, and in conf.pl git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@663 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- config/conf.pl | 28 ++++++++++++++++++++++------ functions/url_parser.php | 5 ++++- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/config/conf.pl b/config/conf.pl index 2d6e34d7..1bb23ae2 100755 --- a/config/conf.pl +++ b/config/conf.pl @@ -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") { diff --git a/functions/url_parser.php b/functions/url_parser.php index 64e308a5..f70580cc 100644 --- a/functions/url_parser.php +++ b/functions/url_parser.php @@ -34,7 +34,8 @@ function parseUrl ($body) { #Possible ways a URL could finish. - $poss_ends=array(" ", "\n", "\r", "<", ">", ".\r", ".\n", ". ", " ", ")", "(","""); + $poss_ends=array(" ", "\n", "\r", "<", ">", ".\r", ".\n", ". ", " ", ")", "(", + """, "<", ">", ".<"); $done=False; while (!$done) { #Look for when a URL starts @@ -56,12 +57,14 @@ 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 = "$url"; # $body = str_replace($url,$url_str,$body); + echo "$where, $end
"; $body = replaceBlock($body,$url_str,$where,$end); $start = strpos($body,"",$where); } else { -- 2.25.1