*** empty log message ***
[squirrelmail.git] / functions / strings.php
index c7c6060f4d2594bf1aa513f06d54583f0af9dc01..df0a7117452152f1ae87e3d0671ede0cd115437c 100644 (file)
@@ -16,7 +16,7 @@
  * SquirrelMail version number -- DO NOT CHANGE
  */
 global $version;
-$version = '1.2.7 [CVS]';
+$version = '1.3.0 [CVS-DEVEL]';
 
 /**
  * Wraps text at $wrap characters
@@ -64,7 +64,7 @@ function sqWordWrap(&$line, $wrap) {
         
         /* Go to the next line if we have more to process */
         if ($i < count($words)) {
-            $line .= "\n" . $beginning_spaces;
+            $line .= "\n";
         }
     }
 }
@@ -153,7 +153,7 @@ function php_self () {
 function get_location () {
     
     global $PHP_SELF, $SERVER_NAME, $HTTP_HOST, $SERVER_PORT,
-        $HTTP_SERVER_VARS;
+        $HTTP_SERVER_VARS, $imap_server_type;
     
     /* Get the path, handle virtual directories */
     $path = substr(php_self(), 0, strrpos(php_self(), '/'));
@@ -196,6 +196,14 @@ function get_location () {
         }
     }
     
+   /* this is a workaround for the weird macosx caching that
+      causes Apache to return 16080 as the port number, which causes
+      SM to bail */
+      
+   if ($imap_server_type == 'macosx' && $port == ':16080') {
+        $port = '';
+   }
+   
     /* Fallback is to omit the server name and use a relative */
     /* URI, although this is not RFC 2616 compliant.          */
     return ($host ? $proto . $host . $port . $path : $path);