Fix undefined var notices on search page
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 28 Sep 2007 18:00:55 +0000 (18:00 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 28 Sep 2007 18:00:55 +0000 (18:00 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12703 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/search.php

index 061b3e85e62a991ed19e058d626fc5e54866b29d..20e624a2a2aaca9b24cb58923c022060b8207705 100644 (file)
@@ -897,6 +897,12 @@ if (!sqgetGlobalVar('checkall',$checkall,SQ_GET)) {
     $checkall = false;
 }
 
+if (!sqgetGlobalVar('preselected', $preselected, SQ_GET) || !is_array($preselected)) {
+    $preselected = array();
+} else {
+    $preselected = array_keys($preselected);
+}
+
 /**
  * Retrieve the mailbox cache from the session.
  */
@@ -1617,6 +1623,7 @@ if ($submit == $search_button_text) {
                         $oTemplate->assign('color', $color);
                         $oTemplate->assign('align', $align);
                         $oTemplate->assign('checkall', $checkall);
+                        $oTemplate->assign('preselected', $preselected);
 
                         $oTemplate->display('message_list.tpl');
                     }