|
From: Florin C B. <ory...@us...> - 2013-04-18 00:43:04
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb3 In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25970 Modified Files: core.php Log Message: updating phpBB3 announce Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/core.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** core.php 23 Apr 2010 19:39:53 -0000 1.21 --- core.php 18 Apr 2013 00:43:02 -0000 1.22 *************** *** 55,59 **** { global $userdata, $mx_root_path, $phpEx; ! // // Try to reuse auth_view query result. --- 55,59 ---- { global $userdata, $mx_root_path, $phpEx; ! static $auth_data_sql; // // Try to reuse auth_view query result. *************** *** 65,80 **** return $auth_data_sql; } - // // Now, this tries to optimize DB access involved in auth(), // passing AUTH_LIST_ALL will load info for all forums at once. ! // ! $is_auth_ary = $this->acl_getf('f_read', false); ! // // Loop through the list of forums to retrieve the ids for // those with AUTH_VIEW allowed. // - $auth_data_sql = ''; foreach( $is_auth_ary as $fid => $is_auth_row ) { --- 65,86 ---- return $auth_data_sql; } // // Now, this tries to optimize DB access involved in auth(), // passing AUTH_LIST_ALL will load info for all forums at once. ! // Start auth check ! if (!$is_auth_ary = $this->acl_getf('f_read', false)) ! { ! if ($user->data['user_id'] != ANONYMOUS) ! { ! //trigger_error('SORRY_AUTH_READ'); ! $auth_data_sql = false; ! } ! //login_box('', $user->lang['LOGIN_VIEWFORUM']); ! $auth_data_sql = $this->acl_getf_global('m_'); ! } // // Loop through the list of forums to retrieve the ids for // those with AUTH_VIEW allowed. // foreach( $is_auth_ary as $fid => $is_auth_row ) { *************** *** 84,93 **** } } - if( empty($auth_data_sql) ) { ! $auth_data_sql = -1; } - $userdata[$userdata_key] = $auth_data_sql; return $auth_data_sql; --- 90,97 ---- } } if( empty($auth_data_sql) ) { ! $auth_data_sql = 0; } $userdata[$userdata_key] = $auth_data_sql; return $auth_data_sql; |