added extra variable to make it possible to add more lines to the onload
[squirrelmail.git] / src / right_main.php
index 6e4dbd92224c51344fd99a544764ea0f69e2493e..b41bc5109c42e02fd4f227c274a506ab768cca0b 100644 (file)
@@ -103,6 +103,13 @@ if (! isset($use_mailbox_cache)) {
     $use_mailbox_cache = 0;
 }
 
+/* There is a problem with registered vars in 4.1 */
+/*
+if( substr( phpversion(), 0, 3 ) == '4.1'  ) {
+    $use_mailbox_cache = FALSE;
+}
+*/
+
 if ($use_mailbox_cache && session_is_registered('msgs')) {
     showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort, $color, $show_num, $use_mailbox_cache);
 } else {
@@ -126,13 +133,16 @@ if ($use_mailbox_cache && session_is_registered('msgs')) {
 
     if (session_is_registered('msgs') && isset($msgs)) {
         session_register('msgs');
+        $_SESSION['msgs'] = $msgs;
     }
 
     if (session_is_registered('msort') && isset($msort)) {
         session_register('msort');
+        $_SESSION['msort'] = $msort;
     }
 
     session_register('numMessages');
+    $_SESSION['numMessages'] = $numMessages;
 }
 
 do_hook('right_main_bottom');