/[drupal]/contributions/modules/macrotags/macros.inc
ViewVC logotype

Diff of /contributions/modules/macrotags/macros.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.6, Thu Mar 18 17:35:09 2004 UTC revision 1.7, Wed Nov 24 22:03:32 2004 UTC
# Line 1  Line 1 
1  <?php  <?php
2  /* $Id: macros.inc,v 1.5 2004/03/18 17:31:56 mathias Exp $ */  /* $Id: macros.inc,v 1.6 2004/03/18 17:35:09 mathias Exp $ */
3    
4  /* Use this space to write your own custom macrotags. */  /* Use this space to write your own custom macrotags. */
5    
# Line 312  function mt_title_page_hook($title) { Line 312  function mt_title_page_hook($title) {
312    
313      if (db_num_rows($result) == 0) {      if (db_num_rows($result) == 0) {
314        // No node with exact title found, try substring.        // No node with exact title found, try substring.
315        $result = db_query("SELECT n.*, u.name, u.uid FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.title LIKE '%". check_query($title) ."%' AND n.status = 1 ORDER BY n.created DESC");        $result = db_query("SELECT n.*, u.name, u.uid FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.title LIKE '%". db_escape_string($title) ."%' AND n.status = 1 ORDER BY n.created DESC");
316      }      }
317    
318      if (db_num_rows($result) == 0 && module_exist("search")) {      if (db_num_rows($result) == 0 && module_exist("search")) {

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.2