Make sure 'sortdate' has a default value
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 2 Apr 2010 04:10:37 +0000 (22:10 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Sat, 3 Apr 2010 01:05:35 +0000 (19:05 -0600)
imp/lib/IMP.php

index bae99c4..8f4aa09 100644 (file)
@@ -922,7 +922,8 @@ class IMP
         }
 
         if ($convert && ($ob['by'] == IMP::IMAP_SORT_DATE)) {
-            $ob['by'] = $GLOBALS['prefs']->getValue('sortdate');
+            $ob['by'] = $GLOBALS['prefs']->getValue('sortdate') ||
+                        Horde_Imap_Client::SORT_ARRIVAL;
         }
 
         return $ob;