includes/paths.php
changeset 138 13561bde2e2c
parent 118 0c5efda996bf
child 142 ca9118d9c0f2
--- a/includes/paths.php	Tue Sep 18 17:27:55 2007 -0400
+++ b/includes/paths.php	Wed Sep 19 13:26:42 2007 -0400
@@ -745,8 +745,13 @@
     {
       return false;
     }
+    foreach ( $cache as $key => $_unused )
+    {
+      $cache[$key] = $db->escape( $cache[$key] );
+    }
     $cache = "query LIKE '%" . implode ( "%' OR query LIKE '%", $cache ) . "%'";
-    $db->sql_query('DELETE FROM '.table_prefix.'search_cache WHERE '.$cache);
+    $sql = 'DELETE FROM '.table_prefix.'search_cache WHERE '.$cache;
+    $db->sql_query($sql);
     
     $query = $db->sql_query('SELECT word,page_names FROM '.table_prefix.'search_index WHERE '.$keys.';');