|
From: Jon O. <jon...@us...> - 2007-05-04 20:34:28
|
Update of /cvsroot/mxbb/core/modules/mx_phpbb2blocks
In directory sc8-pr-cvs16:/tmp/cvs-serv11244
Modified Files:
mx_forum.php
Log Message:
missing auth function inclusion in mx_forum.php
Fix: call the mxBB auth cache
Index: mx_forum.php
===================================================================
RCS file: /cvsroot/mxbb/core/modules/mx_phpbb2blocks/mx_forum.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** mx_forum.php 28 Apr 2007 20:51:07 -0000 1.2
--- mx_forum.php 4 May 2007 20:34:22 -0000 1.3
***************
*** 249,254 ****
--- 249,266 ----
// Find which forums are visible for this user
//
+ /*
+ include_once($phpbb_root_path . 'includes/auth.' . $phpEx);
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);
+ */
+ // Fix, using the cached auth data
+ $auth_data_sql = get_auth_forum();
+ $is_auth_tmp = explode(',', $auth_data_sql);
+
+ $is_auth_data = array();
+ foreach ($is_auth_tmp as $key => $forum_id_tmp)
+ {
+ $is_auth_data[trim($forum_id_tmp)] = true;
+ }
//
***************
*** 309,313 ****
for($j = 0; $j < $total_forums; $j++)
{
! if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $forum_data[$j]['cat_id'] == $cat_id )
{
$display_forums = true;
--- 321,327 ----
for($j = 0; $j < $total_forums; $j++)
{
!
! //if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $forum_data[$j]['cat_id'] == $cat_id )
! if ( $is_auth_data[$forum_data[$j]['forum_id']] && $forum_data[$j]['cat_id'] == $cat_id )
{
$display_forums = true;
***************
*** 335,339 ****
$forum_id = $forum_data[$j]['forum_id'];
! if ( $is_auth_ary[$forum_id]['auth_view'] )
{
if ( $forum_data[$j]['forum_status'] == FORUM_LOCKED )
--- 349,354 ----
$forum_id = $forum_data[$j]['forum_id'];
! //if ( $is_auth_ary[$forum_id]['auth_view'] )
! if ( $is_auth_data[$forum_id] )
{
if ( $forum_data[$j]['forum_status'] == FORUM_LOCKED )
|