init location field correctly
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 16 Aug 2002 15:05:11 +0000 (15:05 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 16 Aug 2002 15:05:11 +0000 (15:05 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3331 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mailbox_display.php

index 2fc02b834ba8b452516b07aa4df5ad0878f019a9..0350414450e97b6a6562badce8e196a9acbab1c3 100644 (file)
@@ -721,7 +721,12 @@ function mail_message_listing_beginning ($imapConnection,
   echo getButton('SUBMIT', 'markRead',_("Read"));
   echo getButton('SUBMIT', 'markUnread',_("Unread"));
   echo getButton('SUBMIT', 'delete',_("Delete")) ."&nbsp\n";
-  echo '<INPUT TYPE="HIDDEN" NAME="location" VALUE="'.$PHP_SELF.'">';
+  if (!strpos($PHP_SELF,'mailbox')) {
+     $location = $PHP_SELF.'?mailbox=INBOX&amp;startMessage=1';
+  } else {
+     $location = $PHP_SELF;
+  }
+  echo '<INPUT TYPE="HIDDEN" NAME="location" VALUE="'.$location.'">';
   echo "</TD>\n"
        . "   </TR>\n";