Replace array_search that only uses a boolean to check whether the value
[squirrelmail.git] / functions / imap_messages.php
index 2f14a9084f5aca13ad6f969cde462a3ce81e9227..5930134d09f5c52770f49529072765ad6ea9d46f 100755 (executable)
@@ -534,11 +534,7 @@ function sqimap_get_small_header_list ($imap_stream, $msg_list, $show_num=false,
     $messages = array();
     $read_list = array();
 
-    if (array_search('UID',$aFetchItems,true) !== false) {
-        $bUidFetch = false;
-    } else {
-        $bUidFetch = true;
-    }
+    $bUidFetch = ! in_array('UID', $aFetchItems, true);
 
     /* Get the small headers for each message in $msg_list */
     if ($show_num != '999999' && $show_num != '*' ) {