[geeklog-cvs] geeklog-1.3/public_html/admin moderation.php,1.39,1.40

geeklog-cvs-admin at lists.geeklog.net geeklog-cvs-admin at lists.geeklog.net
Sun Jul 6 05:16:17 EDT 2003


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

Modified Files:
	moderation.php 
Log Message:
Check for proper topic access when listing draft stories.


Index: moderation.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/moderation.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** moderation.php	19 Jun 2003 17:38:41 -0000	1.39
--- moderation.php	6 Jul 2003 09:16:14 -0000	1.40
***************
*** 352,356 ****
      $retval .= COM_startBlock ($LANG29[35] . ' (' . $LANG24[34] . ')', '',
              COM_getBlockTemplate ('_admin_block', 'header'));
!     $result = DB_query ("SELECT sid AS id,title,UNIX_TIMESTAMP(date) AS day,tid FROM {$_TABLES['stories']} WHERE (draft_flag = 1)" . COM_getPermSQL ('AND', 0, 3) . " ORDER BY date ASC");
      $nrows = DB_numRows($result);
      if ($nrows > 0) {
--- 352,372 ----
      $retval .= COM_startBlock ($LANG29[35] . ' (' . $LANG24[34] . ')', '',
              COM_getBlockTemplate ('_admin_block', 'header'));
! 
!     $topicsql = '';
!     $tresult = DB_query ("SELECT tid FROM {$_TABLES['topics']}"
!                          . COM_getPermSQL ());
!     $trows = DB_numRows ($tresult);
!     if ($trows > 0) {
!         $tids = array ();
!         for ($i = 0; $i < $trows; $i++) {
!             $T = DB_fetchArray ($tresult);
!             $tids[] = $T['tid'];
!         }
!         if (sizeof ($tids) > 0) {
!             $topicsql = " AND (tid IN ('" . implode ("','", $tids) . "'))";
!         }
!     }
! 
!     $result = DB_query ("SELECT sid AS id,title,UNIX_TIMESTAMP(date) AS day,tid FROM {$_TABLES['stories']} WHERE (draft_flag = 1)" . $topicsql . COM_getPermSQL ('AND', 0, 3) . " ORDER BY date ASC");
      $nrows = DB_numRows($result);
      if ($nrows > 0) {





More information about the geeklog-cvs mailing list