[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.276,1.277

dhaun at geeklog.net dhaun at geeklog.net
Sun Feb 1 06:04:34 EST 2004


Update of /usr/cvs/geeklog/geeklog-1.3/public_html
In directory geeklog_prod:/tmp/cvs-serv11993

Modified Files:
	lib-common.php 
Log Message:
If the user prefers not to see stories from certain topics, then don't list those topics in the Topics block either.


Index: lib-common.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.276
retrieving revision 1.277
diff -C2 -d -r1.276 -r1.277
*** lib-common.php	31 Jan 2004 14:16:25 -0000	1.276
--- lib-common.php	1 Feb 2004 11:04:31 -0000	1.277
***************
*** 1831,1838 ****
  function COM_showTopics( $topic='' )
  {
!     global $_TABLES, $_CONF, $_USER, $_GROUPS, $LANG01, $HTTP_SERVER_VARS,
             $page, $newstories;
  
      $sql = "SELECT tid,topic,owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon FROM {$_TABLES['topics']}" . COM_getPermSQL();
      if( $_CONF['sortmethod'] == 'alpha' )
      {
--- 1831,1846 ----
  function COM_showTopics( $topic='' )
  {
!     global $_CONF, $_TABLES, $_USER, $_GROUPS, $LANG01, $HTTP_SERVER_VARS,
             $page, $newstories;
  
      $sql = "SELECT tid,topic,owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon FROM {$_TABLES['topics']}" . COM_getPermSQL();
+     if( $_USER['uid'] > 1 ) {
+         $tids = DB_getItem( $_TABLES['userindex'], 'tids',
+                             "uid = '{$_USER['uid']}'" );
+         if (!empty ($tids)) {
+             $sql .= " AND (tid NOT IN ('" . str_replace( ' ', "','", $tids )
+                  . "'))";
+         }
+     }
      if( $_CONF['sortmethod'] == 'alpha' )
      {





More information about the geeklog-cvs mailing list