[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.229,1.230

geeklog-cvs-admin at lists.geeklog.net geeklog-cvs-admin at lists.geeklog.net
Sat Jun 21 16:43:11 EDT 2003


Update of /usr/cvs/geeklog/geeklog-1.3/public_html
In directory internal.geeklog.net:/tmp/cvs-serv29635

Modified Files:
	lib-common.php 
Log Message:
1) don't list new comments on stories that have the draft flag set,
2) add current version number to "GL Version Test" menu entry,
3) removed two extra slashes in poll template paths


Index: lib-common.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.229
retrieving revision 1.230
diff -C2 -d -r1.229 -r1.230
*** lib-common.php	21 Jun 2003 12:55:51 -0000	1.229
--- lib-common.php	21 Jun 2003 20:43:09 -0000	1.230
***************
*** 1643,1647 ****
              if( $nanswers > 0 )
              {
!                 $poll = new Template( $_CONF['path_layout'] . '/pollbooth' );
                  $poll->set_file( array( 'panswer' => 'pollanswer.thtml',
                                          'block' => 'pollblock.thtml',
--- 1643,1647 ----
              if( $nanswers > 0 )
              {
!                 $poll = new Template( $_CONF['path_layout'] . 'pollbooth' );
                  $poll->set_file( array( 'panswer' => 'pollanswer.thtml',
                                          'block' => 'pollblock.thtml',
***************
*** 1825,1829 ****
              }
  
!             $poll = new Template( $_CONF['path_layout'] . '/pollbooth' );
              $poll->set_file( array( 'result' => 'pollresult.thtml',
                                      'comments' => 'pollcomments.thtml',
--- 1825,1829 ----
              }
  
!             $poll = new Template( $_CONF['path_layout'] . 'pollbooth' );
              $poll->set_file( array( 'result' => 'pollresult.thtml',
                                      'comments' => 'pollcomments.thtml',
***************
*** 2475,2481 ****
          if( SEC_inGroup( 'Root' ))
          {
!             $adminmenu->set_var( 'option_url', 'http://www.geeklog.net/versionchecker.php?version=' . VERSION );
              $adminmenu->set_var( 'option_label', $LANG01[107] );
!             $adminmenu->set_var( 'option_count', 'N/A' );
  
              $retval .= $adminmenu->parse( 'item', 'option' );
--- 2475,2482 ----
          if( SEC_inGroup( 'Root' ))
          {
!             $adminmenu->set_var( 'option_url',
!                'http://www.geeklog.net/versionchecker.php?version=' . VERSION );
              $adminmenu->set_var( 'option_label', $LANG01[107] );
!             $adminmenu->set_var( 'option_count', VERSION );
  
              $retval .= $adminmenu->parse( 'item', 'option' );
***************
*** 4091,4095 ****
          }
  
!         $sql = "SELECT DISTINCT count(*) AS dups, type, question, {$_TABLES['stories']}.title, {$_TABLES['stories']}.sid, qid, max({$_TABLES['comments']}.date) as lastdate FROM {$_TABLES['comments']} LEFT JOIN {$_TABLES['stories']} ON (({$_TABLES['stories']}.sid = {$_TABLES['comments']}.sid)" . COM_getPermSQL( 'AND', 0, 2, $_TABLES['stories'] ) . ") LEFT JOIN {$_TABLES['pollquestions']} ON ((qid = {$_TABLES['comments']}.sid)" . COM_getPermSQL( 'AND', 0, 2, $_TABLES['pollquestions'] ) . ") WHERE ({$_TABLES['comments']}.date >= (DATE_SUB(NOW(), INTERVAL {$_CONF['newcommentsinterval']} SECOND))) AND ((({$stwhere})) OR (({$powhere}))) GROUP BY {$_TABLES['comments']}.sid ORDER BY 7 DESC LIMIT 15";
  
          $result = DB_query( $sql );
--- 4092,4096 ----
          }
  
!         $sql = "SELECT DISTINCT count(*) AS dups, type, question, {$_TABLES['stories']}.title, {$_TABLES['stories']}.sid, qid, max({$_TABLES['comments']}.date) as lastdate FROM {$_TABLES['comments']} LEFT JOIN {$_TABLES['stories']} ON (({$_TABLES['stories']}.sid = {$_TABLES['comments']}.sid)" . COM_getPermSQL( 'AND', 0, 2, $_TABLES['stories'] ) . " AND ({$_TABLES['stories']}.draft_flag = 0)" . ") LEFT JOIN {$_TABLES['pollquestions']} ON ((qid = {$_TABLES['comments']}.sid)" . COM_getPermSQL( 'AND', 0, 2, $_TABLES['pollquestions'] ) . ") WHERE ({$_TABLES['comments']}.date >= (DATE_SUB(NOW(), INTERVAL {$_CONF['newcommentsinterval']} SECOND))) AND ((({$stwhere})) OR (({$powhere}))) GROUP BY {$_TABLES['comments']}.sid ORDER BY 7 DESC LIMIT 15";
  
          $result = DB_query( $sql );





More information about the geeklog-cvs mailing list