[geeklog-cvs] geeklog-1.3/system/classes search.class.php,1.23,1.24

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Mon Aug 9 03:56:24 EDT 2004


Update of /var/cvs/geeklog-1.3/system/classes
In directory www:/tmp/cvs-serv16143/system/classes

Modified Files:
	search.class.php 
Log Message:
Use $HTTP_SERVER_VARS['PHP_SELF'] instead of $PHP_SELF


Index: search.class.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/system/classes/search.class.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** search.class.php	11 Jul 2004 18:18:05 -0000	1.23
--- search.class.php	9 Aug 2004 07:56:22 -0000	1.24
***************
*** 33,37 ****
  // $Id$
  
! if (eregi ('search.class.php', $PHP_SELF)) {
      die ('This file can not be used on its own.');
  }
--- 33,37 ----
  // $Id$
  
! if (eregi ('search.class.php', $HTTP_SERVER_VARS['PHP_SELF'])) {
      die ('This file can not be used on its own.');
  }
***************
*** 367,371 ****
      
              $mysearchterm = addslashes ($this->_query);
!             $sql = "SELECT {$_TABLES['stories']}.sid,{$_TABLES['comments']}.title,comment,pid,{$_TABLES['comments']}.uid,{$_TABLES['comments']}.sid AS qid,type as comment_type,UNIX_TIMESTAMP({$_TABLES['comments']}.date) as day,'comment' as type FROM {$_TABLES['comments']} ";
              $sql .= "LEFT JOIN {$_TABLES['stories']} ON (({$_TABLES['stories']}.sid = {$_TABLES['comments']}.sid)" . $stsql . ") ";
              $sql .= "LEFT JOIN {$_TABLES['pollquestions']} ON ((qid = {$_TABLES['comments']}.sid)" . $posql . ") ";
--- 367,371 ----
      
              $mysearchterm = addslashes ($this->_query);
!             $sql = "SELECT {$_TABLES['stories']}.sid,{$_TABLES['comments']}.title,comment,pid,cid,{$_TABLES['comments']}.uid,{$_TABLES['comments']}.sid AS qid,type as comment_type,UNIX_TIMESTAMP({$_TABLES['comments']}.date) as day,'comment' as type FROM {$_TABLES['comments']} ";
              $sql .= "LEFT JOIN {$_TABLES['stories']} ON (({$_TABLES['stories']}.sid = {$_TABLES['comments']}.sid)" . $stsql . ") ";
              $sql .= "LEFT JOIN {$_TABLES['pollquestions']} ON ((qid = {$_TABLES['comments']}.sid)" . $posql . ") ";
***************
*** 409,418 ****
                      $querystring = '';
                  }
!                 if ($A['comment_type'] == 'article') {
                      $A['title'] = '<a href="' .$_CONF['site_url'] .'/article.php?story=' . $A['sid'] . $querystring . '#comments">' . stripslashes($A['title']) . '</a>';
                  } else {
                      $A['title'] = '<a href="' .$_CONF['site_url'] .'/pollbooth.php?qid=' . $A['qid'] . '&aid=-1' . $querystring . '#comments">' . stripslashes($A['title']) . '</a>';
!                 }
!                 
                  $thetime = COM_getUserDateTimeFormat($A['day']);
                  $row = array($A['title'], $thetime[0],DB_getItem($_TABLES['users'],'username',"uid = '{$A['uid']}'"));
--- 409,419 ----
                      $querystring = '';
                  }
!                 $A['title'] = '<a href="' . $_CONF['site_url'] . '/comment.php?mode=view&cid=' . $A['cid'] . '">' . stripslashes ($A['title']) . '</a>';
!                 /*if ($A['comment_type'] == 'article') {
                      $A['title'] = '<a href="' .$_CONF['site_url'] .'/article.php?story=' . $A['sid'] . $querystring . '#comments">' . stripslashes($A['title']) . '</a>';
                  } else {
                      $A['title'] = '<a href="' .$_CONF['site_url'] .'/pollbooth.php?qid=' . $A['qid'] . '&aid=-1' . $querystring . '#comments">' . stripslashes($A['title']) . '</a>';
!                 }*/
! 
                  $thetime = COM_getUserDateTimeFormat($A['day']);
                  $row = array($A['title'], $thetime[0],DB_getItem($_TABLES['users'],'username',"uid = '{$A['uid']}'"));




More information about the geeklog-cvs mailing list