Hi,

Would any great person of karma like to commit a small patch that will 
allow lazy^H^H^H^Hhard working phpdoc helpers to more easily stop bad 
notes before they hit the mirrors?

Below, I've attached a patch against php-master-web/manage/user-notes.php.

Ken Tossell

Index: manage/user-notes.php
===================================================================
RCS file: /repository/php-master-web/manage/user-notes.php,v
retrieving revision 1.34
diff -u -r1.34 user-notes.php
--- manage/user-notes.php       15 Nov 2003 19:45:47 -0000      1.34
+++ manage/user-notes.php       2 Feb 2004 01:17:07 -0000
@@ -95,7 +95,11 @@
   }
 
   if (isset($keyword)) {
-    $sql = 'SELECT *,UNIX_TIMESTAMP(ts) AS ts FROM note WHERE note LIKE 
"%' . addslashes($keyword) . '%" LIMIT 20';
+    $sql = 'SELECT *,UNIX_TIMESTAMP(ts) AS ts FROM note WHERE note LIKE 
"%' . addslashes($keyword) . '%"';
+    if (is_numeric($keyword)) {
+      $sql .= ' OR id = ' . (int)$keyword;
+    }
+    $sql .= ' LIMIT 20';
     @mysql_connect("localhost","nobody","")
       or die("unable to connect to database");
     @mysql_select_db("php3")
@@ -132,7 +136,7 @@
 <form method="post" action="<?php echo $PHP_SELF;?>">
 <table>
  <tr>   
-  <th align="right">Keyword :</th>
+  <th align="right">Keyword/ID :</th>
   <td><input type="text" name="keyword" value="<?php echo $searched; ?>" 
size="10" maxlength="32" /></td>
  </tr>
  <tr> 

== END OF PATCH ==

Reply via email to