Pārlūkot izejas kodu

some more fixes to solve the vhost problem (icy cold here in the freeze)

teepe 23 gadi atpakaļ
vecāks
revīzija
cddbdffbe3

+ 2 - 0
functions/mailbox_display.php

@@ -12,6 +12,8 @@
  * $Id$
  * $Id$
  */
  */
 
 
+include_once('../functions/strings.php');
+
 define('PG_SEL_MAX', 10);  /* Default value for page_selector_max. */
 define('PG_SEL_MAX', 10);  /* Default value for page_selector_max. */
 
 
 function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $start_msg, $where, $what) {
 function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $start_msg, $where, $what) {

+ 1 - 1
functions/mime.php

@@ -836,7 +836,7 @@ function encodeHeader ($string) {
 */
 */
 function MagicHTML( $body, $id ) {
 function MagicHTML( $body, $id ) {
 
 
-    global $message, $PHP_SELF, $HTTP_SERVER_VARS, 
+    global $message, $HTTP_SERVER_VARS, 
            $attachment_common_show_images;
            $attachment_common_show_images;
 
 
     $attachment_common_show_images =
     $attachment_common_show_images =

+ 3 - 1
functions/page_header.php

@@ -11,6 +11,8 @@
  * $Id$
  * $Id$
  */
  */
 
 
+include_once('../functions/strings.php');
+
 // Always set up the language before calling these functions
 // Always set up the language before calling these functions
 function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) {
 function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) {
 
 
@@ -134,4 +136,4 @@ function checkForm() {
         "</TABLE>\n\n";
         "</TABLE>\n\n";
 }
 }
 
 
-?>
+?>

+ 16 - 0
functions/strings.php

@@ -261,6 +261,20 @@ function find_mailbox_name ($mailbox) {
     
     
 }
 }
 
 
+function php_self () {
+    global $PHP_SELF, $HTTP_SERVER_VARS;
+    
+    if (isset($PHP_SELF) && !empty($PHP_SELF)) {
+        return $PHP_SELF;
+    } else if (isset($HTTP_SERVER_VARS['PHP_SELF']) &&
+               !empty($HTTP_SERVER_VARS['PHP_SELF'])) {
+        return $HTTP_SERVER_VARS['PHP_SELF'];
+    } else {
+        return '';
+    }
+}
+
+
 /**
 /**
  * This determines the location to forward to relative to your server.
  * This determines the location to forward to relative to your server.
  * If this doesnt work correctly for you (although it should), you can
  * If this doesnt work correctly for you (although it should), you can
@@ -589,4 +603,6 @@ function RemoveSlashes(&$array) {
     }
     }
 }
 }
 
 
+$PHP_SELF = php_self();
+
 ?>
 ?>

+ 1 - 0
src/addrbook_search_html.php

@@ -23,6 +23,7 @@ require_once('../functions/smtp.php');
 require_once('../functions/display_messages.php');
 require_once('../functions/display_messages.php');
 require_once('../functions/addressbook.php');
 require_once('../functions/addressbook.php');
 require_once('../functions/plugin.php');
 require_once('../functions/plugin.php');
+include_once('../functions/strings.php');
 
 
 /* Insert hidden data */
 /* Insert hidden data */
 function addr_insert_hidden() {
 function addr_insert_hidden() {

+ 1 - 0
src/addressbook.php

@@ -15,6 +15,7 @@ require_once('../src/validate.php');
 require_once('../functions/array.php');
 require_once('../functions/array.php');
 require_once('../functions/display_messages.php');
 require_once('../functions/display_messages.php');
 require_once('../functions/addressbook.php');
 require_once('../functions/addressbook.php');
+include_once('../functions/strings.php');
 
 
 /* Make an input field */
 /* Make an input field */
 function adressbook_inp_field($label, $field, $name, $size, $values, $add) {
 function adressbook_inp_field($label, $field, $name, $size, $values, $add) {

+ 1 - 0
src/options.php

@@ -17,6 +17,7 @@ require_once('../functions/display_messages.php');
 require_once('../functions/imap.php');
 require_once('../functions/imap.php');
 require_once('../functions/array.php');
 require_once('../functions/array.php');
 require_once('../functions/options.php');
 require_once('../functions/options.php');
+include_once('../functions/strings.php');
 
 
 /* Set the base uri. */
 /* Set the base uri. */
 ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs);
 ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs);

+ 1 - 0
src/options_highlight.php

@@ -16,6 +16,7 @@ require_once('../functions/display_messages.php');
 require_once('../functions/imap.php');
 require_once('../functions/imap.php');
 require_once('../functions/array.php');
 require_once('../functions/array.php');
 require_once('../functions/plugin.php');
 require_once('../functions/plugin.php');
+include_once('../functions/strings.php');
 
 
 function oh_opt( $val, $sel, $tit ) {
 function oh_opt( $val, $sel, $tit ) {
     echo "<option value=\"$val\"";
     echo "<option value=\"$val\"";

+ 2 - 1
src/search.php

@@ -13,6 +13,7 @@ require_once('../src/validate.php');
 require_once('../functions/imap.php');
 require_once('../functions/imap.php');
 require_once('../functions/imap_search.php');
 require_once('../functions/imap_search.php');
 require_once('../functions/array.php');
 require_once('../functions/array.php');
+include_once('../functions/strings.php');
 
 
 function s_opt( $val, $sel, $tit ) {
 function s_opt( $val, $sel, $tit ) {
     echo "            <option value=\"$val\"";
     echo "            <option value=\"$val\"";
@@ -145,4 +146,4 @@ sqimap_logout ($imapConnection);
 
 
 echo '</body></html>';
 echo '</body></html>';
 
 
-?>
+?>

+ 1 - 0
src/signout.php

@@ -30,6 +30,7 @@
 require_once('../src/validate.php');
 require_once('../src/validate.php');
 require_once('../functions/prefs.php');
 require_once('../functions/prefs.php');
 require_once('../functions/plugin.php');
 require_once('../functions/plugin.php');
+include_once('../functions/strings.php');
 
 
    // Erase any lingering attachments
    // Erase any lingering attachments
    if (! isset($attachments)) {
    if (! isset($attachments)) {

+ 3 - 0
themes/darkness.php

@@ -6,6 +6,9 @@
        
        
    **/
    **/
 
 
+
+include_once('../functions/strings.php');
+
    // Note:  The text distance is actually pre-squared
    // Note:  The text distance is actually pre-squared
    // Background range is from 24-64, all three colors are the same
    // Background range is from 24-64, all three colors are the same
    // Text range is from 196 to 255
    // Text range is from 196 to 255