svn: /pear2/sandbox/pear2.php.net/trunk/www/templates/pear2/html/ Search.tpl.php

[email protected] (Michael Gauthier)
Newsgroups php.pear.cvs,php.pear.core
Message-ID <[email protected]>
gauthierm                                Fri, 25 Jun 2010 22:13:51 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=300757

Log:
Show special message if no keywords are used.

Changed paths:
    U   pear2/sandbox/pear2.php.net/trunk/www/templates/pear2/html/Search.tpl.php

Modified: pear2/sandbox/pear2.php.net/trunk/www/templates/pear2/html/Search.tpl.php
===================================================================
--- pear2/sandbox/pear2.php.net/trunk/www/templates/pear2/html/Search.tpl.php	2010-06-25 22:11:57 UTC (rev 300756)
+++ pear2/sandbox/pear2.php.net/trunk/www/templates/pear2/html/Search.tpl.php	2010-06-25 22:13:51 UTC (rev 300757)
@@ -11,12 +11,16 @@
 <?php

 if (count($context) === 0) {
-    ?>
-    <p>No packages were found for the keywords <strong><?php echo $context->query; ?></strong>.</p>
-    <ul>
-        <li>try using less specific keywords</li>
-    </ul>
-    <?php
+    if ($context->query == '') {
+        ?><p>No search keywords specified.</p><?php
+    } else {
+        ?>
+        <p>No packages were found for the keywords <strong><?php echo $context->query; ?></strong>.</p>
+        <ul>
+            <li>try using less specific keywords</li>
+        </ul>
+        <?php
+    }
 } else {
     echo $savant->render($context, 'PackageList.tpl.php');
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.