rearranged if structures in order to reach footer without extra template code
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 5 Feb 2006 09:07:52 +0000 (09:07 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 5 Feb 2006 09:07:52 +0000 (09:07 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10640 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/addrbook_search.php

index b26dfc538c365f2aa89124363f0208688482529b..33d9109343aa033ee9bd3e6fbb602135e3ed4fb0 100644 (file)
@@ -289,20 +289,14 @@ if ($show == 'form' && ! isset($listall)) {
             echo html_tag( 'p', '<b><br />' .
                            _("Your search failed with the following error(s)") .
                            ':<br />' . $abook->error . "</b>\n" ,
             echo html_tag( 'p', '<b><br />' .
                            _("Your search failed with the following error(s)") .
                            ':<br />' . $abook->error . "</b>\n" ,
-                           'center' ) .
-                "\n</body></html>\n";
-            exit;
-        }
-
-        if (sizeof($res) == 0) {
+                           'center' );
+        } elseif (sizeof($res) == 0) {
             echo html_tag( 'p', '<br /><b>' .
                            _("No persons matching your search were found") . "</b>\n" ,
             echo html_tag( 'p', '<br /><b>' .
                            _("No persons matching your search were found") . "</b>\n" ,
-                           'center' ) .
-                "\n</body></html>\n";
-            exit;
+                           'center' );
+        } else {
+            display_result($res);
         }
         }
-
-        display_result($res);
     } else {
         /**
          * listall is not set, query is not set or empty.
     } else {
         /**
          * listall is not set, query is not set or empty.