[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.199,1.200

dhaun at geeklog.net dhaun at geeklog.net
Thu Feb 13 12:46:07 EST 2003


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

Modified Files:
	lib-common.php 
Log Message:
Changes to make What's New block work again with MySQL 3.22.xx, provided by
Markus Guske.
Also changed the display of the submission count to only count user submissions
if those are enabled in config.php.


Index: lib-common.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.199
retrieving revision 1.200
diff -C2 -d -r1.199 -r1.200
*** lib-common.php	29 Jan 2003 17:08:02 -0000	1.199
--- lib-common.php	13 Feb 2003 17:46:05 -0000	1.200
***************
*** 9,17 ****
  // |                                                                           |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2000,2001 by the following authors:                         |
  // |                                                                           |
! // | Authors: Tony Bibbs       - tony at tonybibbs.com                            |
! // |          Mark Limburg     - mlimburg at users.sourceforge.net                |
! // |          Jason Wittenburg - jwhitten at securitygeeks.com                    |
  // +---------------------------------------------------------------------------+
  // |                                                                           |
--- 9,18 ----
  // |                                                                           |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2003 by the following authors:                         |
  // |                                                                           |
! // | Authors: Tony Bibbs        - tony at tonybibbs.com                           |
! // |          Mark Limburg      - mlimburg at users.sourceforge.net               |
! // |          Jason Whittenburg - jwhitten at securitygeeks.com                   |
! // |          Dirk Haun         - dirk at haun-online.de                          |
  // +---------------------------------------------------------------------------+
  // |                                                                           |
***************
*** 2040,2047 ****
              }
  
!             if( SEC_hasrights( 'user.edit' ) && SEC_hasrights( 'user.delete' ))
              {
!                 $emptypwd = md5( '' );
!                 $num += DB_count( $_TABLES['users'], 'passwd', $emptypwd );
              }
  
--- 2041,2051 ----
              }
  
!             if( $_CONF['usersubmission'] == 1)
              {
!                 if( SEC_hasrights( 'user.edit' ) && SEC_hasrights( 'user.delete' ))
!                 {
!                     $emptypwd = md5( '' );
!                     $num += DB_count( $_TABLES['users'], 'passwd', $emptypwd );
!                 }
              }
  
***************
*** 3699,3703 ****
  
          $nesql .= "(perm_anon >= 2)";
!         $sql = "SELECT count(*) AS count FROM {$_TABLES['stories']} WHERE (date >= (NOW() - INTERVAL {$_CONF['newstoriesinterval']} SECOND)) AND (date <= NOW()) AND (draft_flag = 0) AND (" . $nesql . ")";
          $result = DB_query( $sql );
          $A = DB_fetchArray( $result );
--- 3703,3707 ----
  
          $nesql .= "(perm_anon >= 2)";
!         $sql = "SELECT count(*) AS count FROM {$_TABLES['stories']} WHERE (date >= (date_sub(NOW(), INTERVAL {$_CONF['newstoriesinterval']} SECOND))) AND (date <= NOW()) AND (draft_flag = 0) AND (" . $nesql . ")";
          $result = DB_query( $sql );
          $A = DB_fetchArray( $result );
***************
*** 3791,3795 ****
              . "FROM {$_TABLES['comments']} LEFT JOIN {$_TABLES['stories']} ON (({$_TABLES['stories']}.sid = {$_TABLES['comments']}.sid) AND (" . $stsql . ")) "
              . "LEFT JOIN {$_TABLES['pollquestions']} ON ((qid = {$_TABLES['comments']}.sid) AND (" . $posql . ")) WHERE (";
!         $sql .= "{$_TABLES['comments']}.date >= (NOW() - INTERVAL {$_CONF['newcommentsinterval']} SECOND)) AND ((" .  $stwhere . ") OR (" . $powhere . "))";
          $sql .= " GROUP BY {$_TABLES['comments']}.sid ORDER BY {$_TABLES['comments']}.date DESC LIMIT 15";
  
--- 3795,3799 ----
              . "FROM {$_TABLES['comments']} LEFT JOIN {$_TABLES['stories']} ON (({$_TABLES['stories']}.sid = {$_TABLES['comments']}.sid) AND (" . $stsql . ")) "
              . "LEFT JOIN {$_TABLES['pollquestions']} ON ((qid = {$_TABLES['comments']}.sid) AND (" . $posql . ")) WHERE (";
!         $sql .= "{$_TABLES['comments']}.date >= (DATE_SUB( NOW(),INTERVAL {$_CONF['newcommentsinterval']} SECOND))) AND ((" .  $stwhere . ") OR (" . $powhere . "))";
          $sql .= " GROUP BY {$_TABLES['comments']}.sid ORDER BY {$_TABLES['comments']}.date DESC LIMIT 15";
  





More information about the geeklog-cvs mailing list