[geeklog-cvs] geeklog-1.3/system/classes search.class.php,1.15,1.16

dhaun at geeklog.net dhaun at geeklog.net
Tue Dec 30 10:51:33 EST 2003


Update of /usr/cvs/geeklog/geeklog-1.3/system/classes
In directory geeklog_prod:/tmp/cvs-serv3644

Modified Files:
	search.class.php 
Log Message:
Don't search through comments to stories that have the draft flag set (bug #128).


Index: search.class.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/system/classes/search.class.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** search.class.php	31 Aug 2003 17:26:55 -0000	1.15
--- search.class.php	30 Dec 2003 15:51:31 -0000	1.16
***************
*** 6,11 ****
  // +---------------------------------------------------------------------------+
  // | search.php                                                                |
- // | Geeklog search class.                                                     |
  // |                                                                           |
  // +---------------------------------------------------------------------------+
  // | Copyright (C) 2000-2003 by the following authors:                         |
--- 6,11 ----
  // +---------------------------------------------------------------------------+
  // | search.php                                                                |
  // |                                                                           |
+ // | Geeklog search class.                                                     |
  // +---------------------------------------------------------------------------+
  // | Copyright (C) 2000-2003 by the following authors:                         |
***************
*** 33,37 ****
  // $Id$
  
! require_once($_CONF['path_system'] . 'classes/plugin.class.php');
  
  /**
--- 33,41 ----
  // $Id$
  
! if (eregi ('search.class.php', $PHP_SELF)) {
!     die ('This file can not be used on its own.');
! }
! 
! require_once ($_CONF['path_system'] . 'classes/plugin.class.php');
  
  /**
***************
*** 128,132 ****
          $this->_page = $input_vars['page'];
          
!         // In case we got a username instead of uid, converit.  This should
          // make custom themes for search page easier.
          $this->_convertAuthor();
--- 132,136 ----
          $this->_page = $input_vars['page'];
          
!         // In case we got a username instead of uid, convert it.  This should
          // make custom themes for search page easier.
          $this->_convertAuthor();
***************
*** 359,362 ****
--- 363,367 ----
              $sql .= "LEFT JOIN {$_TABLES['pollquestions']} ON ((qid = {$_TABLES['comments']}.sid)" . $posql . ") ";
              $sql .= "WHERE ";
+             $sql .= "({$_TABLES['stories']}.draft_flag = 0) AND ({$_TABLES['stories']}.date <= NOW()) AND ";
              $sql .= " (comment like '%$this->_query%' ";
              $sql .= "OR {$_TABLES['comments']}.title like '%$this->_query%') ";





More information about the geeklog-cvs mailing list