If search string not found at all, keep it in the field
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 8 Dec 2009 23:13:32 +0000 (16:13 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 8 Dec 2009 23:13:32 +0000 (16:13 -0700)
imp/lib/Ui/Compose.php

index 6c349c9..e3e0af8 100644 (file)
@@ -47,6 +47,10 @@ class IMP_Ui_Compose
         if (count($res) == 1) {
             array_push($addr_list, reset($res));
             return implode(', ', $addr_list);
+        } elseif (!count($res)) {
+            $GLOBALS['notification']->push(sprintf(_("Search for \"%s\" failed: no address found."), $search), 'horde.warning');
+            array_push($addr_list, $search);
+            return implode(', ', $addr_list);
         }
 
         $GLOBALS['notification']->push(_("Ambiguous address found."), 'horde.warning');