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 061b3e8..20e624a 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');
                     }