mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
More changes ... switched away from prefetch for now ...
git-svn-id: file:///svn/phpbb/trunk@2849 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
a7cda845fa
commit
38b8e4b801
23 changed files with 1089 additions and 1443 deletions
|
@ -155,10 +155,6 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators
|
|||
|
||||
<p><?php echo $l_title_explain; ?></p>
|
||||
|
||||
<p><?php echo $lang['Permissions_extra_explain']; ?></p>
|
||||
|
||||
<p><?php echo $lang['Permissions_extra2_explain']; ?></p>
|
||||
|
||||
<?php
|
||||
|
||||
switch ( $mode )
|
||||
|
@ -175,7 +171,7 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators
|
|||
|
||||
case 'supermoderators':
|
||||
$type_sql = 'mod';
|
||||
$forum_sql = "AND a.forum_id = $forum_id";
|
||||
$forum_sql = '';
|
||||
break;
|
||||
|
||||
case 'administrators':
|
||||
|
@ -340,7 +336,7 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators
|
|||
case 'user':
|
||||
$l_type = 'User';
|
||||
|
||||
$sql = ( empty($HTTP_POST_VARS['new']) ) ? "SELECT u.user_id AS id, u.username AS name, u.user_founder, o.auth_option, a.auth_allow_deny FROM " . USERS_TABLE . " u, " . ACL_USERS_TABLE . " a, " . ACL_OPTIONS_TABLE . " o WHERE o.auth_type LIKE '$type_sql' AND a.auth_option_id = o.auth_option_id $forum_sql AND u.user_id = a.user_id AND u.user_id IN ($where_sql) ORDER BY u.username, u.user_regdate ASC" : "SELECT user_id AS id, username AS name, u.user_founder FROM " . USERS_TABLE . " WHERE username IN ($where_sql) ORDER BY username, user_regdate ASC";
|
||||
$sql = ( empty($HTTP_POST_VARS['new']) ) ? "SELECT u.user_id AS id, u.username AS name, u.user_founder, o.auth_option, a.auth_allow_deny FROM " . USERS_TABLE . " u, " . ACL_USERS_TABLE . " a, " . ACL_OPTIONS_TABLE . " o WHERE o.auth_type LIKE '$type_sql' AND a.auth_option_id = o.auth_option_id $forum_sql AND u.user_id = a.user_id AND u.user_id IN ($where_sql) ORDER BY u.username, u.user_regdate ASC" : "SELECT user_id AS id, username AS name, user_founder FROM " . USERS_TABLE . " WHERE username IN ($where_sql) ORDER BY username, user_regdate ASC";
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -363,6 +359,10 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators
|
|||
|
||||
?>
|
||||
|
||||
<p><?php echo $lang['Permissions_extra_explain']; ?></p>
|
||||
|
||||
<p><?php echo $lang['Permissions_extra2_explain']; ?></p>
|
||||
|
||||
<form method="post" action="<?php echo "admin_permissions.$phpEx$SID&mode=$mode"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th> <?php echo $lang[$l_type . $l_can]; ?> </th>
|
||||
|
@ -415,15 +415,17 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators
|
|||
}
|
||||
else
|
||||
{
|
||||
$sql = "SELECT forum_id, forum_name
|
||||
$sql = "SELECT left_id, right_id, forum_id, forum_name
|
||||
FROM " . FORUMS_TABLE . "
|
||||
ORDER BY cat_id ASC, forum_order ASC";
|
||||
ORDER BY forum_id ASC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$select_list = '';
|
||||
$sub_forum = '';
|
||||
while ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
$select_list .= '<option value="' . $row['forum_id'] . '">' . $row['forum_name'] . '</option>';
|
||||
$select_list .= '<option value="' . $row['forum_id'] . '">' . $sub_forum . $row['forum_name'] . '</option>';
|
||||
$sub_forum .= ( $row['right_id'] - $row['left_id'] > 1 ) ? ' ' : '';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
@ -435,8 +437,6 @@ else
|
|||
|
||||
<p><?php echo $l_title_explain ?></p>
|
||||
|
||||
<p><?php echo $lang['Permissions_extra_explain']; ?></p>
|
||||
|
||||
<form method="post" action="<?php echo "admin_permissions.$phpEx$SID&mode=$mode"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th align="center"><?php echo $lang['Select_a_Forum']; ?></th>
|
||||
|
|
|
@ -41,9 +41,6 @@ if ( !defined('PHPBB_INSTALLED') )
|
|||
|
||||
// User Levels <- Do not change the values of USER or ADMIN
|
||||
define('ANONYMOUS', -1);
|
||||
define('USER', 0);
|
||||
define('ADMIN', 1);
|
||||
define('MOD', 2);
|
||||
|
||||
// User related
|
||||
define('USER_ACTIVATION_NONE', 0);
|
||||
|
@ -56,19 +53,21 @@ define('USER_AVATAR_UPLOAD', 1);
|
|||
define('USER_AVATAR_REMOTE', 2);
|
||||
define('USER_AVATAR_GALLERY', 3);
|
||||
|
||||
// ACL
|
||||
define('ACL_PREVENT', 0);
|
||||
define('ACL_DENY', 1);
|
||||
define('ACL_ALLOW', 2);
|
||||
define('ACL_PERMIT', 3);
|
||||
|
||||
// Group settings
|
||||
define('GROUP_OPEN', 0);
|
||||
define('GROUP_CLOSED', 1);
|
||||
define('GROUP_HIDDEN', 2);
|
||||
|
||||
// Forum state
|
||||
define('FORUM_UNLOCKED', 0);
|
||||
define('FORUM_LOCKED', 1);
|
||||
|
||||
// Topic status
|
||||
define('TOPIC_UNLOCKED', 0);
|
||||
define('TOPIC_LOCKED', 1);
|
||||
define('TOPIC_MOVED', 2);
|
||||
// Forum/Topic states
|
||||
define('ITEM_UNLOCKED', 0);
|
||||
define('ITEM_LOCKED', 1);
|
||||
define('ITEM_MOVED', 2);
|
||||
|
||||
// Topic types
|
||||
define('POST_NORMAL', 0);
|
||||
|
@ -82,15 +81,8 @@ define('ERROR', 201);
|
|||
// Private messaging
|
||||
define('PRIVMSGS_READ_MAIL', 0);
|
||||
define('PRIVMSGS_NEW_MAIL', 1);
|
||||
define('PRIVMSGS_SENT_MAIL', 2);
|
||||
define('PRIVMSGS_SAVED_IN_MAIL', 3);
|
||||
define('PRIVMSGS_SAVED_OUT_MAIL', 4);
|
||||
define('PRIVMSGS_UNREAD_MAIL', 5);
|
||||
|
||||
// Session parameters
|
||||
define('SESSION_METHOD_COOKIE', 100);
|
||||
define('SESSION_METHOD_GET', 101);
|
||||
|
||||
// Table names
|
||||
define('ACL_GROUPS_TABLE', $table_prefix.'auth_groups');
|
||||
define('ACL_OPTIONS_TABLE', $table_prefix.'auth_options');
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -29,7 +28,7 @@ include($phpbb_root_path . 'common.'.$phpEx);
|
|||
// Start session management
|
||||
//
|
||||
$userdata = $session->start();
|
||||
$acl = new auth('list', $userdata);
|
||||
$acl = new acl('list', $userdata);
|
||||
//
|
||||
// End session management
|
||||
//
|
||||
|
|
|
@ -112,7 +112,7 @@ function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$
|
|||
// Start session management
|
||||
//
|
||||
$userdata = $session->start();
|
||||
$acl = new auth('list', $userdata);
|
||||
$acl = new acl('list', $userdata);
|
||||
//
|
||||
// End session management
|
||||
//
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -1236,7 +1235,7 @@ function generate_smilies($mode, $page_id)
|
|||
$row = 0;
|
||||
$col = 0;
|
||||
|
||||
while ( list($smile_url, $data) = @each($rowset) )
|
||||
foreach( $rowset as $smile_url => $data )
|
||||
{
|
||||
if ( !$col )
|
||||
{
|
||||
|
@ -1291,4 +1290,86 @@ function generate_smilies($mode, $page_id)
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
define('BBCODE_UID_LEN', 10);
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
class parse_message
|
||||
{
|
||||
var $message;
|
||||
var $bbcode_tpl = null;
|
||||
|
||||
function parse_message($message, $html, $bbcode, $emoticons)
|
||||
{
|
||||
global $board_config;
|
||||
|
||||
$this->message = $message;
|
||||
unset($message);
|
||||
|
||||
$this->html($html);
|
||||
$this->bbcode($bbcode);
|
||||
$this->emoticons($emoticons);
|
||||
|
||||
return $this->message;
|
||||
}
|
||||
|
||||
function html($html)
|
||||
{
|
||||
global $board_config;
|
||||
|
||||
}
|
||||
|
||||
function bbcode($bbcode)
|
||||
{
|
||||
global $board_config;
|
||||
|
||||
}
|
||||
|
||||
function emoticons($emoticons)
|
||||
{
|
||||
global $board_config;
|
||||
|
||||
}
|
||||
|
||||
function attachments()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class parse_poll
|
||||
{
|
||||
|
||||
function parse_poll()
|
||||
{
|
||||
global $board_config;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class parse_search
|
||||
{
|
||||
|
||||
function parse_search()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
function add()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
function delete()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
|
@ -29,31 +29,11 @@ define('HEADER_INC', TRUE);
|
|||
//
|
||||
// gzip_compression
|
||||
//
|
||||
$do_gzip_compress = FALSE;
|
||||
if ( $board_config['gzip_compress'] )
|
||||
{
|
||||
$phpver = phpversion();
|
||||
|
||||
if ( $phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible') )
|
||||
if ( extension_loaded('zlib') && strstr($HTTP_USER_AGENT,'compatible') && !headers_sent() )
|
||||
{
|
||||
if ( extension_loaded('zlib') )
|
||||
{
|
||||
ob_start('ob_gzhandler');
|
||||
}
|
||||
}
|
||||
else if ( $phpver > '4.0' )
|
||||
{
|
||||
if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') )
|
||||
{
|
||||
if ( extension_loaded('zlib') )
|
||||
{
|
||||
$do_gzip_compress = TRUE;
|
||||
ob_start();
|
||||
ob_implicit_flush(0);
|
||||
|
||||
header("Content-Encoding: gzip");
|
||||
}
|
||||
}
|
||||
ob_start('ob_gzhandler');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,7 +125,16 @@ if ( empty($online_userlist) )
|
|||
{
|
||||
$online_userlist = $lang['None'];
|
||||
}
|
||||
$online_userlist = ( ( isset($forum_id) ) ? $lang['Browsing_forum'] : $lang['Registered_users'] ) . ' ' . $online_userlist;
|
||||
|
||||
if ( empty($forum_id) )
|
||||
{
|
||||
$online_userlist = $lang['Registered_users'] . ' ' . $online_userlist;
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_online = ( $guests_online == 1 ) ? $lang['Browsing_forum_guest'] : $lang['Browsing_forum_guests'];
|
||||
$online_userlist = sprintf($l_online, $online_userlist, $guests_online);
|
||||
}
|
||||
|
||||
$total_online_users = $logged_visible_online + $logged_hidden_online + $guests_online;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ if ( defined('DEBUG') )
|
|||
$mtime = explode(' ', $mtime);
|
||||
$totaltime = ( $mtime[1] + $mtime[0] ) - $starttime;
|
||||
|
||||
$debug_output = sprintf('<br /><br />[ Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . ( ( $board_config['gzip_compress'] ) ? 'On' : 'Off' ) . ' | Load : ' . (( $session->load ) ? $session->load : 'N/A') . ' ]', $totaltime);
|
||||
$debug_output = sprintf('<br /><br />[ Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . ( ( $board_config['gzip_compress'] ) ? 'On' : 'Off' ) . ' | Load : ' . ( ( $session->load ) ? $session->load : 'N/A') . ' ]', $totaltime);
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
|
@ -49,29 +49,6 @@ $template->display('body');
|
|||
//
|
||||
$db->sql_close();
|
||||
|
||||
//
|
||||
// Compress buffered output if required and send to browser
|
||||
//
|
||||
if ( $do_gzip_compress )
|
||||
{
|
||||
//
|
||||
// Borrowed from php.net!
|
||||
//
|
||||
$gzip_contents = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$gzip_size = strlen($gzip_contents);
|
||||
$gzip_crc = crc32($gzip_contents);
|
||||
|
||||
$gzip_contents = gzcompress($gzip_contents, 9);
|
||||
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
|
||||
|
||||
echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
|
||||
echo $gzip_contents;
|
||||
echo pack("V", $gzip_crc);
|
||||
echo pack("V", $gzip_size);
|
||||
}
|
||||
|
||||
exit;
|
||||
|
||||
?>
|
|
@ -268,7 +268,8 @@ class session {
|
|||
|
||||
$sql = "SELECT *
|
||||
FROM " . SESSIONS_TABLE . "
|
||||
WHERE session_time < " . ( $current_time - $board_config['session_length'] );
|
||||
WHERE session_time < " . ( $current_time - $board_config['session_length'] ) . "
|
||||
LIMIT 10";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$del_session_id = '';
|
||||
|
@ -371,47 +372,57 @@ class session {
|
|||
}
|
||||
|
||||
//
|
||||
// Note this doesn't use the prefetch at present and is very
|
||||
// incomplete ... purely for testing ... will be keeping my
|
||||
// eye of 'other products' to ensure these things don't
|
||||
// Will be keeping my eye of 'other products' to ensure these things don't
|
||||
// mysteriously appear elsewhere, think up your own solutions!
|
||||
//
|
||||
class auth {
|
||||
|
||||
var $acl;
|
||||
var $where_sql = '';
|
||||
|
||||
function auth($mode, $userdata, $forum_id = false)
|
||||
class acl
|
||||
{
|
||||
function acl($mode, $userdata, $forum_id = false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
switch( $mode )
|
||||
{
|
||||
case 'admin':
|
||||
$and_sql = "ao.auth_type LIKE 'admin'";
|
||||
break;
|
||||
case 'list':
|
||||
$and_sql = "AND ( ao.auth_option LIKE 'list' OR ao.auth_type LIKE 'admin' )";
|
||||
$and_sql = "ao.auth_option LIKE 'list' OR ao.auth_type LIKE 'admin'";
|
||||
break;
|
||||
case 'read':
|
||||
$and_sql = "AND ( ao.auth_option LIKE 'read' OR ao.auth_type LIKE 'admin' )";
|
||||
$and_sql = "ao.auth_option LIKE 'read' OR ao.auth_type LIKE 'admin'";
|
||||
break;
|
||||
case 'forum':
|
||||
$and_sql = "AND ( ( au.forum_id = $forum_id ) OR ( au.forum_id <> $forum_id AND ( ao.auth_option LIKE 'list' OR ao.auth_type LIKE 'mod' OR ao.auth_type LIKE 'admin' ) ) )";
|
||||
break;
|
||||
case 'admin':
|
||||
$and_sql = "AND ( ao.auth_type LIKE 'admin' )";
|
||||
$and_sql = "( a.forum_id = $forum_id ) OR ( a.forum_id <> $forum_id AND ( ao.auth_option LIKE 'list' OR ao.auth_type LIKE 'mod' OR ao.auth_type LIKE 'admin' ) )";
|
||||
break;
|
||||
case 'listmod':
|
||||
$and_sql = "AND ( ao.auth_option LIKE 'list' OR ao.auth_type LIKE 'mod' OR ao.auth_type LIKE 'admin' )";
|
||||
break;
|
||||
case 'all':
|
||||
$and_sql = '';
|
||||
$and_sql = "ao.auth_option LIKE 'list' OR ao.auth_type LIKE 'mod' OR ao.auth_type LIKE 'admin'";
|
||||
break;
|
||||
}
|
||||
|
||||
$sql = "SELECT au.forum_id, au.auth_allow_deny, ao.auth_type, ao.auth_option
|
||||
FROM " . ACL_PREFETCH_TABLE . " au, " . ACL_OPTIONS_TABLE . " ao
|
||||
WHERE au.user_id = " . $userdata['user_id'] . "
|
||||
AND ao.auth_option_id = au.auth_option_id
|
||||
$and_sql";
|
||||
$sql = "SELECT a.forum_id, a.auth_allow_deny, ao.auth_type, ao.auth_option
|
||||
FROM " . ACL_GROUPS_TABLE . " a, " . ACL_OPTIONS_TABLE . " ao, " . USER_GROUP_TABLE . " ug
|
||||
WHERE ug.user_id = " . $userdata['user_id'] . "
|
||||
AND a.group_id = ug.group_id
|
||||
AND ao.auth_option_id = a.auth_option_id
|
||||
AND ($and_sql)";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
do
|
||||
{
|
||||
$this->acl[$row['forum_id']][$row['auth_type']][$row['auth_option']] = $row['auth_allow_deny'];
|
||||
}
|
||||
while ( $row = $db->sql_fetchrow($result) );
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = "SELECT a.forum_id, a.auth_allow_deny, ao.auth_type, ao.auth_option
|
||||
FROM " . ACL_USERS_TABLE . " a, " . ACL_OPTIONS_TABLE . " ao
|
||||
WHERE a.user_id = " . $userdata['user_id'] . "
|
||||
AND ao.auth_option_id = a.auth_option_id
|
||||
AND ($and_sql)";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ( $row = $db->sql_fetchrow($result) )
|
||||
|
@ -446,14 +457,6 @@ class auth {
|
|||
return $this->get_acl(0, 'admin', $auth_type);
|
||||
}
|
||||
|
||||
function get_acl_user($forum_id, $user_id, $acl = false)
|
||||
{
|
||||
}
|
||||
|
||||
function get_acl_group($forum_id, $group_id, $acl = false)
|
||||
{
|
||||
}
|
||||
|
||||
function set_acl($forum_id, $user_id = false, $group_id = false, $auth = false, $dependencies = array())
|
||||
{
|
||||
global $db;
|
||||
|
@ -463,75 +466,6 @@ class auth {
|
|||
return;
|
||||
}
|
||||
|
||||
$dependencies = array_merge_recursive($dependencies, array(
|
||||
'mod' => array(
|
||||
'forum' => array(
|
||||
'list' => 1,
|
||||
'read' => 1,
|
||||
'post' => 1,
|
||||
'reply' => 1,
|
||||
'edit' => 1,
|
||||
'delete' => 1,
|
||||
'poll' => 1,
|
||||
'vote' => 1,
|
||||
'announce' => 1,
|
||||
'sticky' => 1,
|
||||
'attach' => 1,
|
||||
'download' => 1,
|
||||
'html' => 1,
|
||||
'bbcode' => 1,
|
||||
'smilies' => 1,
|
||||
'img' => 1,
|
||||
'flash' => 1,
|
||||
'sigs' => 1,
|
||||
'search' => 1,
|
||||
'email' => 1,
|
||||
'rate' => 1,
|
||||
'print' => 1,
|
||||
'ignoreflood' => 1,
|
||||
'ignorequeue' => 1
|
||||
),
|
||||
),
|
||||
'admin' => array(
|
||||
'forum' => array(
|
||||
'list' => 1,
|
||||
'read' => 1,
|
||||
'post' => 1,
|
||||
'reply' => 1,
|
||||
'edit' => 1,
|
||||
'delete' => 1,
|
||||
'poll' => 1,
|
||||
'vote' => 1,
|
||||
'announce' => 1,
|
||||
'sticky' => 1,
|
||||
'attach' => 1,
|
||||
'download' => 1,
|
||||
'html' => 1,
|
||||
'bbcode' => 1,
|
||||
'smilies' => 1,
|
||||
'img' => 1,
|
||||
'flash' => 1,
|
||||
'sigs' => 1,
|
||||
'search' => 1,
|
||||
'email' => 1,
|
||||
'rate' => 1,
|
||||
'print' => 1,
|
||||
'ignoreflood' => 1,
|
||||
'ignorequeue' => 1
|
||||
),
|
||||
'mod' => array(
|
||||
'edit' => 1,
|
||||
'delete' => 1,
|
||||
'move' => 1,
|
||||
'lock' => 1,
|
||||
'split' => 1,
|
||||
'merge' => 1,
|
||||
'approve' => 1,
|
||||
'unrate' => 1
|
||||
)
|
||||
)
|
||||
));
|
||||
|
||||
$forum_sql = ( $forum_id ) ? "AND a.forum_id IN ($forum_id, 0)" : '';
|
||||
|
||||
//
|
||||
|
@ -540,12 +474,12 @@ class auth {
|
|||
$sql = ( $user_id !== false ) ? "SELECT a.user_id, o.auth_type, o.auth_option_id, o.auth_option, a.auth_allow_deny FROM " . ACL_USERS_TABLE . " a, " . ACL_OPTIONS_TABLE . " o, " . USERS_TABLE . " u WHERE a.auth_option_id = o.auth_option_id $forum_sql AND u.user_id = a.user_id AND a.user_id = $user_id" : "SELECT ug.user_id, o.auth_type, o.auth_option, a.auth_allow_deny FROM " . USER_GROUP_TABLE . " ug, " . ACL_USERS_TABLE . " a, " . ACL_OPTIONS_TABLE . " o, " . USERS_TABLE . " u WHERE a.auth_option_id = o.auth_option_id $forum_sql AND u.user_id = a.user_id AND a.user_id = ug.user_id AND ug.group_id = $group_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$current_user_auth = array();
|
||||
$user_auth = array();
|
||||
if ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
do
|
||||
{
|
||||
$current_user_auth[$row['user_id']][$row['auth_type']][$row['auth_option_id']] = $row['auth_allow_deny'];
|
||||
$user_auth[$row['user_id']][$row['auth_type']][$row['auth_option_id']] = $row['auth_allow_deny'];
|
||||
}
|
||||
while ( $row = $db->sql_fetchrow($result) );
|
||||
}
|
||||
|
@ -554,89 +488,64 @@ class auth {
|
|||
$sql = ( $group_id !== false ) ? "SELECT a.group_id, o.auth_type, o.auth_option_id, o.auth_option, a.auth_allow_deny FROM " . ACL_GROUPS_TABLE . " a, " . ACL_OPTIONS_TABLE . " o WHERE a.auth_option_id = o.auth_option_id $forum_sql AND a.group_id = $group_id" : "SELECT ug.group_id, o.auth_type, o.auth_option, a.auth_allow_deny FROM " . USER_GROUP_TABLE . " ug, " . ACL_GROUPS_TABLE . " a, " . ACL_OPTIONS_TABLE . " o WHERE a.auth_option_id = o.auth_option_id $forum_sql AND a.group_id = ug.group_id AND ug.user_id = $user_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$current_group_auth = array();
|
||||
$group_auth = array();
|
||||
if ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
do
|
||||
{
|
||||
$current_group_auth[$row['group_id']][$row['auth_type']][$row['auth_option_id']] = $row['auth_allow_deny'];
|
||||
$group_auth[$row['group_id']][$row['auth_type']][$row['auth_option_id']] = $row['auth_allow_deny'];
|
||||
}
|
||||
while ( $row = $db->sql_fetchrow($result) );
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
print_r($current_user_auth);
|
||||
|
||||
foreach ( $auth as $auth_type => $auth_option_ary )
|
||||
{
|
||||
foreach ( $auth_option_ary as $auth_option => $allow )
|
||||
{
|
||||
if ( $user_id !== false )
|
||||
{
|
||||
if ( !empty($current_user_auth) )
|
||||
if ( !empty($user_auth) )
|
||||
{
|
||||
foreach ( $current_user_auth as $user => $user_auth_ary )
|
||||
foreach ( $user_auth as $user => $user_auth_ary )
|
||||
{
|
||||
$user_auth[$user][$auth_type][$auth_option] = $allow;
|
||||
$sql_ary[] = ( !isset($user_auth_ary[$auth_type][$auth_option]) ) ? "INSERT INTO " . ACL_USERS_TABLE . " (user_id, forum_id, auth_option_id, auth_allow_deny) VALUES ($user_id, $forum_id, $auth_option, $allow)" : ( ( $user_auth_ary[$auth_type][$auth_option] != $allow ) ? "UPDATE " . ACL_USERS_TABLE . " SET auth_allow_deny = $allow WHERE user_id = $user_id AND forum_id = $forum_id and auth_option_id = $auth_option" : '' );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$user_auth[$user_id][$auth_type][$auth_option] = $allow;
|
||||
$sql_ary[] = "INSERT INTO " . ACL_USERS_TABLE . " (user_id, forum_id, auth_option_id, auth_allow_deny) VALUES ($user_id, $forum_id, $auth_option, $allow)";
|
||||
}
|
||||
}
|
||||
|
||||
if ( $group_id !== false )
|
||||
{
|
||||
if ( !empty($current_group_auth) )
|
||||
if ( !empty($group_auth) )
|
||||
{
|
||||
foreach ( $current_group_auth as $group => $group_auth_ary )
|
||||
foreach ( $group_auth as $group => $group_auth_ary )
|
||||
{
|
||||
$group_auth[$group][$auth_type][$auth_option] = $allow;
|
||||
$sql_ary[] = ( !isset($group_auth_ary[$auth_type][$auth_option]) ) ? "INSERT INTO " . ACL_GROUPS_TABLE . " (group_id, forum_id, auth_option_id, auth_allow_deny) VALUES ($group_id, $forum_id, $auth_option, $allow)" : ( ( $group_auth_ary[$auth_type][$auth_option] != $allow ) ? "UPDATE " . ACL_GROUPS_TABLE . " SET auth_allow_deny = $allow WHERE group_id = $group_id AND forum_id = $forum_id and auth_option_id = $auth_option" : '' );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$group_auth[$group_id][$auth_type][$auth_option] = $allow;
|
||||
$sql_ary[] = "INSERT INTO " . ACL_GROUPS_TABLE . " (group_id, forum_id, auth_option_id, auth_allow_deny) VALUES ($group_id, $forum_id, $auth_option, $allow)";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print_r($sql_ary);
|
||||
|
||||
//
|
||||
// Need to update prefetch table ... the fun bit
|
||||
//
|
||||
$sql = ( $user_id !== false ) ? "SELECT a.user_id, o.auth_type, o.auth_option, a.auth_allow_deny FROM " . ACL_PREFETCH_TABLE . " a, " . ACL_OPTIONS_TABLE . " o WHERE a.auth_option_id = o.auth_option_id $forum_sql AND a.user_id = $user_id" : "SELECT ug.user_id, o.auth_type, o.auth_option, a.auth_allow_deny FROM " . USER_GROUP_TABLE . " ug, " . ACL_USERS_TABLE . " a, " . ACL_OPTIONS_TABLE . " o WHERE a.auth_option_id = o.auth_option_id $forum_sql AND a.user_id = ug.user_id AND ug.group_id = $group_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$prefetch_auth = array();
|
||||
if ( $row = $db->sql_fetchrow($result) )
|
||||
foreach ( $sql_ary as $sql )
|
||||
{
|
||||
do
|
||||
{
|
||||
$prefetch_auth[$row['user_id']][$row['auth_type']][$row['auth_option']] = $row['auth_allow_deny'];
|
||||
}
|
||||
while ( $row = $db->sql_fetchrow($result) );
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
print_r($prefetch_auth);
|
||||
|
||||
foreach ( $auth as $auth_type => $auth_option_ary )
|
||||
{
|
||||
foreach ( $dependencies[$auth_type] as $dep_sub_type => $dep_sub_type_ary )
|
||||
{
|
||||
foreach ( $dep_sub_type_ary as $dep_sub_option => $dep_sub_allow )
|
||||
{
|
||||
$auth[$dep_sub_type][$dep_sub_option] = $dep_sub_allow;
|
||||
}
|
||||
}
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
unset($current_group_auth);
|
||||
unset($current_user_auth);
|
||||
unset($group_auth);
|
||||
unset($user_auth);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
512
phpBB/index.php
512
phpBB/index.php
|
@ -28,32 +28,17 @@ include($phpbb_root_path . 'common.'.$phpEx);
|
|||
// Start session management
|
||||
//
|
||||
$userdata = $session->start();
|
||||
$acl = new auth('list', $userdata);
|
||||
$acl = new acl('list', $userdata);
|
||||
|
||||
$session->configure($userdata);
|
||||
//
|
||||
// End session management
|
||||
//
|
||||
|
||||
//
|
||||
// Configure style, language, etc.
|
||||
//
|
||||
$session->configure($userdata);
|
||||
|
||||
$viewcat = ( !empty($HTTP_GET_VARS['c']) ) ? intval($HTTP_GET_VARS['c']) : -1;
|
||||
$forum_id = ( !empty($HTTP_GET_VARS['f']) ) ? intval($HTTP_GET_VARS['f']) : 0;
|
||||
|
||||
if ( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
|
||||
{
|
||||
$mark_read = ( isset($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : $HTTP_GET_VARS['mark'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$mark_read = '';
|
||||
}
|
||||
|
||||
//
|
||||
// Handle marking posts
|
||||
//
|
||||
if ( $mark_read == 'forums' )
|
||||
if ( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
|
||||
{
|
||||
if ( $userdata['user_id'] != ANONYMOUS )
|
||||
{
|
||||
|
@ -74,6 +59,11 @@ if ( $mark_read == 'forums' )
|
|||
$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array();
|
||||
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array();
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
$forum_id = ( !empty($HTTP_GET_VARS['f']) ) ? "WHERE f2.forum_id = " . intval($HTTP_GET_VARS['f']) : '';
|
||||
|
||||
//
|
||||
// If you don't use these stats on your index you may want to consider
|
||||
// removing them
|
||||
|
@ -83,46 +73,27 @@ $total_users = $board_config['num_users'];
|
|||
$newest_user = $board_config['newest_username'];
|
||||
$newest_uid = $board_config['newest_user_id'];
|
||||
|
||||
if ( $total_posts == 0 )
|
||||
{
|
||||
$l_total_post_s = $lang['Posted_articles_zero_total'];
|
||||
}
|
||||
else if ( $total_posts == 1 )
|
||||
{
|
||||
$l_total_post_s = $lang['Posted_article_total'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_total_post_s = $lang['Posted_articles_total'];
|
||||
}
|
||||
|
||||
if ( $total_users == 0 )
|
||||
{
|
||||
$l_total_user_s = $lang['Registered_users_zero_total'];
|
||||
}
|
||||
else if ( $total_users == 1 )
|
||||
{
|
||||
$l_total_user_s = $lang['Registered_user_total'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_total_user_s = $lang['Registered_users_total'];
|
||||
}
|
||||
$l_total_post_s = ( $total_posts > 1 ) ? $lang['Posted_articles_total'] : ( ( $total_posts == 0 ) ? $lang['Posted_articles_zero_total'] : $lang['Posted_article_total'] );
|
||||
$l_total_user_s = ( $total_users > 1 ) ? $lang['Registered_users_total'] : ( ( $total_users == 1 ) ? $lang['Registered_user_total'] : $lang['Registered_users_zero_total'] );
|
||||
|
||||
|
||||
/*
|
||||
switch ( SQL_LAYER )
|
||||
{
|
||||
case 'oracle':
|
||||
break;
|
||||
|
||||
default:
|
||||
$sql = "SELECT f1.*, p.post_time, p.post_username, u.username, u.user_id
|
||||
FROM ((( " . FORUMS_TABLE . " f1
|
||||
LEFT JOIN " . FORUMS_TABLE . " f2
|
||||
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f2.forum_last_post_id )
|
||||
LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
|
||||
WHERE f1.forum_left_id BETWEEN f2.forum_left_id AND f2.forum_right_id
|
||||
/* $sql = "SELECT f1.*, u.username, u.user_id
|
||||
FROM ( " . FORUMS_TABLE . " f1
|
||||
LEFT JOIN " . USERS_TABLE . " u ON u.user_id = f1.forum_last_poster_id )
|
||||
$forum_id
|
||||
ORDER BY f1.forum_id";*/
|
||||
|
||||
$sql = "SELECT f1.*, u.username, u.user_id
|
||||
FROM (( " . FORUMS_TABLE . " f1
|
||||
LEFT JOIN " . FORUMS_TABLE . " f2 ON f1.left_id > f2.left_id AND f1.left_id < f2.right_id )
|
||||
LEFT JOIN " . USERS_TABLE . " u ON u.user_id = f1.forum_last_poster_id )
|
||||
$forum_id
|
||||
ORDER BY f2.forum_id";
|
||||
break;
|
||||
}
|
||||
|
@ -131,404 +102,113 @@ $result = $db->sql_query($sql);
|
|||
$forum_data = array();
|
||||
if ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
$last_forum_right_id = 0;
|
||||
do
|
||||
{
|
||||
$forum_data[] = $row;
|
||||
}
|
||||
while ( $row = $db->sql_fetchrow($result) );
|
||||
|
||||
$total_forums = sizeof($forum_data);
|
||||
}
|
||||
|
||||
if ( $total_forums > 1 )
|
||||
{
|
||||
$last_forum_right_id = 0;
|
||||
for( $i = 0; $i < $total_forums; $i++)
|
||||
{
|
||||
$row_forum_id = $forum_data[$i]['forum_id'];
|
||||
$row_forum_id = $row['forum_id'];
|
||||
|
||||
//
|
||||
// A non-postable forum on the index is treated as a category
|
||||
//
|
||||
if ( $forum_data[$i]['forum_status'] == 2 || $row_forum_id == $forum_id )
|
||||
if ( ( $row['forum_status'] == 2 || $row_forum_id == $forum_id ) && $row['right_id'] - $row['left_id'] > 1 )
|
||||
{
|
||||
$template->assign_block_vars('catrow', array(
|
||||
'CAT_ID' => $forum_id,
|
||||
'CAT_DESC' => $forum_data[$i]['forum_name'],
|
||||
'U_VIEWCAT' => "index.$phpEx?$SID&" . POST_FORUM_URL . "=$forum_id")
|
||||
);
|
||||
'CAT_DESC' => $row['forum_name'],
|
||||
|
||||
$current_parent = $row_forum_id;
|
||||
'U_VIEWCAT' => "index.$phpEx?$SID&f=$row_forum_id")
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $forum_data[$i]['parent_id'] == $current_parent )
|
||||
if ( $acl->get_acl($row_forum_id, 'forum', 'list') )
|
||||
{
|
||||
if ( $acl->get_acl($row_forum_id, 'forum', 'list') )
|
||||
if ( $row['forum_status'] == FORUM_LOCKED )
|
||||
{
|
||||
if ( $forum_data[$i]['forum_status'] == FORUM_LOCKED )
|
||||
$folder_image = $theme['forum_locked'];
|
||||
$folder_alt = $lang['Forum_locked'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$unread_topics = false;
|
||||
if ( $userdata['user_id'] != ANONYMOUS )
|
||||
{
|
||||
$folder_image = $theme['forum_locked'];
|
||||
$folder_alt = $lang['Forum_locked'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$unread_topics = false;
|
||||
if ( $userdata['user_id'] != ANONYMOUS )
|
||||
if ( $row['post_time'] > $last_visit )
|
||||
{
|
||||
if ( !empty($new_topic_data[$row_forum_id]) )
|
||||
$unread_topics = true;
|
||||
|
||||
if ( !empty($tracking_forums[$row_forum_id]) )
|
||||
{
|
||||
$forum_last_post_time = 0;
|
||||
|
||||
while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$row_forum_id]) )
|
||||
if ( $tracking_forums[$row_forum_id] > $last_visit )
|
||||
{
|
||||
if ( empty($tracking_topics[$check_topic_id]) )
|
||||
{
|
||||
$unread_topics = true;
|
||||
$forum_last_post_time = max($check_post_time, $forum_last_post_time);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $tracking_topics[$check_topic_id] < $check_post_time )
|
||||
{
|
||||
$unread_topics = true;
|
||||
$forum_last_post_time = max($check_post_time, $forum_last_post_time);
|
||||
}
|
||||
}
|
||||
$unread_topics = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !empty($tracking_forums[$row_forum_id]) )
|
||||
if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
|
||||
{
|
||||
if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $last_visit )
|
||||
{
|
||||
if ( $tracking_forums[$row_forum_id] > $forum_last_post_time )
|
||||
{
|
||||
$unread_topics = false;
|
||||
}
|
||||
$unread_topics = false;
|
||||
}
|
||||
|
||||
if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
|
||||
{
|
||||
if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time )
|
||||
{
|
||||
$unread_topics = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$folder_image = ( $unread_topics ) ? $theme['forum_new'] : $theme['forum'];
|
||||
$folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts'];
|
||||
}
|
||||
|
||||
$posts = $forum_data[$i]['forum_posts'];
|
||||
$topics = $forum_data[$i]['forum_topics'];
|
||||
|
||||
if ( $forum_data[$i]['forum_last_post_id'] )
|
||||
{
|
||||
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$i]['post_time'], $board_config['board_timezone']);
|
||||
|
||||
$last_post = $last_post_time . '<br />';
|
||||
|
||||
$last_post .= ( $forum_data[$i]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$i]['post_username'] != '' ) ? $forum_data[$i]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . "profile.$phpEx$SID&mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$i]['user_id'] . '">' . $forum_data[$i]['username'] . '</a> ';
|
||||
|
||||
$last_post .= '<a href="' . "viewtopic.$phpEx$SID&" . POST_POST_URL . '=' . $forum_data[$i]['forum_last_post_id'] . '#' . $forum_data[$i]['forum_last_post_id'] . '"><img src="' . $theme['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$last_post = $lang['No_Posts'];
|
||||
}
|
||||
|
||||
if ( count($forum_moderators[$row_forum_id]) > 0 )
|
||||
{
|
||||
$l_moderators = ( count($forum_moderators[$row_forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
|
||||
$moderator_list = implode(', ', $forum_moderators[$row_forum_id]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_moderators = ' ';
|
||||
$moderator_list = ' ';
|
||||
}
|
||||
|
||||
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
|
||||
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
|
||||
|
||||
$template->assign_block_vars('catrow.forumrow', array(
|
||||
'ROW_COLOR' => '#' . $row_color,
|
||||
'ROW_CLASS' => $row_class,
|
||||
'FORUM_FOLDER_IMG' => $folder_image,
|
||||
'FORUM_NAME' => $forum_data[$i]['forum_name'],
|
||||
'FORUM_DESC' => $forum_data[$i]['forum_desc'],
|
||||
'POSTS' => $forum_data[$i]['forum_posts'],
|
||||
'TOPICS' => $forum_data[$i]['forum_topics'],
|
||||
'LAST_POST' => $last_post,
|
||||
'MODERATORS' => $moderator_list,
|
||||
|
||||
'L_MODERATOR' => $l_moderators,
|
||||
'L_FORUM_FOLDER_ALT' => $folder_alt,
|
||||
|
||||
'U_VIEWFORUM' => "viewforum.$phpEx$SID&" . POST_FORUM_URL . "=$row_forum_id")
|
||||
);
|
||||
$folder_image = ( $unread_topics ) ? $theme['forum_new'] : $theme['forum'];
|
||||
$folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts'];
|
||||
}
|
||||
|
||||
$posts = $row['forum_posts'];
|
||||
$topics = $row['forum_topics'];
|
||||
|
||||
if ( $row['forum_last_post_id'] )
|
||||
{
|
||||
$last_post_time = create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone']);
|
||||
|
||||
$last_post = $last_post_time . '<br />';
|
||||
|
||||
$last_post .= ( $row['user_id'] == ANONYMOUS ) ? ( ($row['post_username'] != '' ) ? $row['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . "profile.$phpEx$SID&mode=viewprofile&u=" . $row['user_id'] . '">' . $row['username'] . '</a> ';
|
||||
|
||||
$last_post .= '<a href="' . "viewtopic.$phpEx$SID&f=$row_forum_id&p=" . $forum_data[$j]['forum_last_post_id'] . '#' . $forum_data[$j]['forum_last_post_id'] . '">' . create_img($theme['goto_post_latest'], $lang['View_latest_post']) . '</a>';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$last_post = $lang['No_Posts'];
|
||||
}
|
||||
|
||||
if ( count($forum_moderators[$row_forum_id]) > 0 )
|
||||
{
|
||||
$l_moderators = ( count($forum_moderators[$row_forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
|
||||
$moderator_list = implode(', ', $forum_moderators[$row_forum_id]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_moderators = ' ';
|
||||
$moderator_list = ' ';
|
||||
}
|
||||
|
||||
$template->assign_block_vars('catrow.forumrow', array(
|
||||
'FORUM_FOLDER_IMG' => create_img($folder_image, $folder_alt),
|
||||
'FORUM_NAME' => $row['forum_name'],
|
||||
'FORUM_DESC' => $row['forum_desc'],
|
||||
'POSTS' => $row['forum_posts'],
|
||||
'TOPICS' => $row['forum_topics'],
|
||||
'LAST_POST' => $last_post,
|
||||
'MODERATORS' => $moderator_list,
|
||||
|
||||
'L_MODERATOR' => $l_moderators,
|
||||
'L_FORUM_FOLDER_ALT' => $folder_alt,
|
||||
|
||||
'U_VIEWFORUM' => "viewforum.$phpEx$SID&f=$row_forum_id")
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
while ( $row = $db->sql_fetchrow($result) );
|
||||
|
||||
$template->assign_var_from_handle('SUB_FORUM', 'forum');
|
||||
}
|
||||
*/
|
||||
|
||||
//
|
||||
// Start page proper
|
||||
//
|
||||
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
|
||||
FROM " . CATEGORIES_TABLE . " c
|
||||
ORDER BY c.cat_order";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ( $category_rows[] = $db->sql_fetchrow($result) );
|
||||
|
||||
if ( ( $total_categories = count($category_rows) ) )
|
||||
{
|
||||
//
|
||||
// Define appropriate SQL
|
||||
//
|
||||
switch ( SQL_LAYER )
|
||||
{
|
||||
case 'oracle':
|
||||
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
|
||||
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
|
||||
WHERE p.post_id = f.forum_last_post_id(+)
|
||||
AND u.user_id = p.poster_id(+)
|
||||
ORDER BY f.cat_id, f.forum_order";
|
||||
break;
|
||||
|
||||
default:
|
||||
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
|
||||
FROM (( " . FORUMS_TABLE . " f
|
||||
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
|
||||
LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
|
||||
ORDER BY f.cat_id, f.forum_order";
|
||||
break;
|
||||
}
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$forum_data = array();
|
||||
while ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
$forum_data[] = $row;
|
||||
}
|
||||
|
||||
//
|
||||
// Obtain a list of topic ids which contain
|
||||
// posts made since user last visited
|
||||
//
|
||||
/* if ( $userdata['user_id'] != ANONYMOUS )
|
||||
{
|
||||
$sql = "SELECT t.forum_id, t.topic_id, p.post_time
|
||||
FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
|
||||
WHERE p.post_id = t.topic_last_post_id
|
||||
AND p.post_time > " . $userdata['user_lastvisit'] . "
|
||||
AND t.topic_moved_id = 0";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$new_topic_data = array();
|
||||
while( $topic_data = $db->sql_fetchrow($result) )
|
||||
{
|
||||
$new_topic_data[$topic_data['forum_id']][$topic_data['topic_id']] = $topic_data['post_time'];
|
||||
}
|
||||
}
|
||||
*/
|
||||
//
|
||||
// Obtain list of moderators of each forum
|
||||
// First users, then groups ... broken into two queries
|
||||
//
|
||||
$forum_moderators = array();
|
||||
get_moderators($forum_moderators);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
|
||||
'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
|
||||
'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . "profile.$phpEx$SID&mode=viewprofile&u=$newest_uid" . '">', $newest_user, '</a>'),
|
||||
|
||||
'FORUM_IMG' => create_img($theme['forum'], $lang['No_new_posts']),
|
||||
'FORUM_NEW_IMG' => create_img($theme['forum_new'], $lang['New_posts']),
|
||||
'FORUM_LOCKED_IMG' => create_img($theme['forum_locked'], $lang['No_new_posts_locked']),
|
||||
|
||||
'L_FORUM' => $lang['Forum'],
|
||||
'L_TOPICS' => $lang['Topics'],
|
||||
'L_REPLIES' => $lang['Replies'],
|
||||
'L_VIEWS' => $lang['Views'],
|
||||
'L_POSTS' => $lang['Posts'],
|
||||
'L_LASTPOST' => $lang['Last_Post'],
|
||||
'L_NO_NEW_POSTS' => $lang['No_new_posts'],
|
||||
'L_NEW_POSTS' => $lang['New_posts'],
|
||||
'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'],
|
||||
'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'],
|
||||
'L_ONLINE_EXPLAIN' => $lang['Online_explain'],
|
||||
|
||||
'L_VIEW_MODERATORS' => $lang['View_moderators'],
|
||||
'L_FORUM_LOCKED' => $lang['Forum_is_locked'],
|
||||
'L_MARK_FORUMS_READ' => $lang['Mark_all_forums'],
|
||||
'L_LEGEND' => $lang['Legend'],
|
||||
'L_NO_FORUMS' => $lang['No_forums'],
|
||||
|
||||
'S_LEGEND' => $legend,
|
||||
|
||||
'U_MARK_READ' => "index.$phpEx$SID&mark=forums")
|
||||
);
|
||||
|
||||
//
|
||||
// Okay, let's build the index
|
||||
//
|
||||
for($i = 0; $i < $total_categories; $i++)
|
||||
{
|
||||
$cat_id = $category_rows[$i]['cat_id'];
|
||||
|
||||
//
|
||||
// Should we display this category/forum set?
|
||||
//
|
||||
$display_forums = false;
|
||||
for($j = 0; $j < sizeof($forum_data); $j++)
|
||||
{
|
||||
if ( $acl->get_acl($forum_data[$j]['forum_id'], 'forum', 'list') && $forum_data[$j]['cat_id'] == $cat_id )
|
||||
{
|
||||
$display_forums = true;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Yes, we should, so first dump out the category
|
||||
// title, then, if appropriate the forum list
|
||||
//
|
||||
if ( $display_forums )
|
||||
{
|
||||
$template->assign_block_vars('catrow', array(
|
||||
'CAT_ID' => $cat_id,
|
||||
'CAT_DESC' => $category_rows[$i]['cat_title'],
|
||||
'U_VIEWCAT' => "index.$phpEx$SID&c=$cat_id",
|
||||
'HAVE_FORUMS' => true)
|
||||
);
|
||||
|
||||
if ( $viewcat == $cat_id || $viewcat == -1 )
|
||||
{
|
||||
for($j = 0; $j < sizeof($forum_data); $j++)
|
||||
{
|
||||
if ( $forum_data[$j]['cat_id'] == $cat_id )
|
||||
{
|
||||
$row_forum_id = $forum_data[$j]['forum_id'];
|
||||
|
||||
if ( $acl->get_acl($row_forum_id, 'forum', 'list') )
|
||||
{
|
||||
if ( $forum_data[$j]['forum_status'] == FORUM_LOCKED )
|
||||
{
|
||||
$folder_image = $theme['forum_locked'];
|
||||
$folder_alt = $lang['Forum_locked'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$unread_topics = false;
|
||||
if ( $userdata['user_id'] != ANONYMOUS )
|
||||
{
|
||||
if ( !empty($new_topic_data[$row_forum_id]) )
|
||||
{
|
||||
$forum_last_post_time = 0;
|
||||
|
||||
foreach ( $new_topic_data[$row_forum_id] as $check_topic_id => $check_post_time )
|
||||
{
|
||||
if ( empty($tracking_topics[$check_topic_id]) )
|
||||
{
|
||||
$unread_topics = true;
|
||||
$forum_last_post_time = max($check_post_time, $forum_last_post_time);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $tracking_topics[$check_topic_id] < $check_post_time )
|
||||
{
|
||||
$unread_topics = true;
|
||||
$forum_last_post_time = max($check_post_time, $forum_last_post_time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !empty($tracking_forums[$row_forum_id]) )
|
||||
{
|
||||
if ( $tracking_forums[$row_forum_id] > $forum_last_post_time )
|
||||
{
|
||||
$unread_topics = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
|
||||
{
|
||||
if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time )
|
||||
{
|
||||
$unread_topics = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$folder_image = ( $unread_topics ) ? $theme['forum_new'] : $theme['forum'];
|
||||
$folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts'];
|
||||
}
|
||||
|
||||
$posts = $forum_data[$j]['forum_posts'];
|
||||
$topics = $forum_data[$j]['forum_topics'];
|
||||
|
||||
if ( $forum_data[$j]['forum_last_post_id'] )
|
||||
{
|
||||
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
|
||||
|
||||
$last_post = $last_post_time . '<br />';
|
||||
|
||||
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . "profile.$phpEx$SID&mode=viewprofile&u=" . $forum_data[$j]['user_id'] . '">' . $forum_data[$j]['username'] . '</a> ';
|
||||
|
||||
$last_post .= '<a href="' . "viewtopic.$phpEx$SID&f=$row_forum_id&p=" . $forum_data[$j]['forum_last_post_id'] . '#' . $forum_data[$j]['forum_last_post_id'] . '">' . create_img($theme['goto_post_latest'], $lang['View_latest_post']) . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$last_post = $lang['No_Posts'];
|
||||
}
|
||||
|
||||
if ( count($forum_moderators[$row_forum_id]) > 0 )
|
||||
{
|
||||
$l_moderators = ( count($forum_moderators[$row_forum_id]) == 1 ) ? $lang['Moderator'] . ':' : $lang['Moderators'] . ':' ;
|
||||
$moderator_list = implode(', ', $forum_moderators[$row_forum_id]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_moderators = ' ';
|
||||
$moderator_list = ' ';
|
||||
}
|
||||
|
||||
$template->assign_block_vars('catrow.forumrow', array(
|
||||
'ROW_COUNT' => $i,
|
||||
'FORUM_FOLDER_IMG' => create_img($folder_image, $folder_alt),
|
||||
'FORUM_NAME' => $forum_data[$j]['forum_name'],
|
||||
'FORUM_DESC' => $forum_data[$j]['forum_desc'],
|
||||
'POSTS' => $forum_data[$j]['forum_posts'],
|
||||
'TOPICS' => $forum_data[$j]['forum_topics'],
|
||||
'LAST_POST' => $last_post,
|
||||
'MODERATORS' => $moderator_list,
|
||||
|
||||
'FORUM_IMG' => $forum_data[$j]['forum_image'],
|
||||
|
||||
'L_MODERATOR' => $l_moderators,
|
||||
'L_FORUM_FOLDER_ALT' => $folder_alt,
|
||||
|
||||
'U_VIEWFORUM' => "viewforum.$phpEx$SID&f=$row_forum_id")
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // for ... categories
|
||||
|
||||
}// if ... total_categories
|
||||
|
||||
//
|
||||
// Start output of page
|
||||
|
|
|
@ -219,7 +219,7 @@ $lang['Restore_Error_no_file'] = 'No file was uploaded';
|
|||
$lang['Permissions'] = 'Permissions';
|
||||
$lang['Permissions_explain'] = 'Here you can alter which users and groups can access which forums. Permissions can be set for individual operations such as; reading, posting, voting, etc via the <i>Advanced</i> form. This page only applies to forum permissions. To assign moderators or define administrators please use the appropriate page (see left hand side menu).';
|
||||
|
||||
$lang['Permissions_extra_explain'] = 'Permissions are based on a; PERMIT, ALLOW, DENY, PREVENT system. By default users and groups are set to DENY access to all operations, to do anything users or groups have to be granted ALLOW access. When conflicts exist, e.g. a user having ALLOW permissions to a function belongs to a group that is set to DENY such a function the user setting takes precidence, i.e. in this case the user would be ALLOWed access to this function. Similarly a user denied access to a function will be denied even if they belong to a group that grants them access.';
|
||||
$lang['Permissions_extra_explain'] = 'Permissions are based on a; PERMIT, ALLOW, DENY, PREVENT system. By default users and groups are set to DENY access to all operations, to do anything users or groups have to be granted ALLOW access. When conflicts exist, e.g. a user having ALLOW permissions to a function belongs to a group that is set to DENY such a function the user setting takes precidence, i.e. in this case the user would be ALLOWed access to this function. Similarly a user denied access to a function will be denied even if they belong to a group that grants them access. If a user belongs to two groups one of which grants an ALLOW while another is set to DENY the user will be denied access.';
|
||||
$lang['Permissions_extra2_explain'] = 'There may be times when you want to deny (or allow) access to a group no matter what their individual user settings are, this is what PERMIT and PREVENT are for. By setting a user (or more likely a group) to one of these will PERMIT (ALLOW) or PREVENT (DENY) access to a function no matter what their user settings are. You may find this useful for things such as "banned" groups, etc. doing away with any need to check for individual user permissions.';
|
||||
|
||||
$lang['Moderators'] = 'Moderators';
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
|
|
|
@ -124,7 +124,8 @@ $lang['GUESTS'] = 'GUESTS';
|
|||
// Global Header strings
|
||||
//
|
||||
$lang['Registered_users'] = 'Registered Users:';
|
||||
$lang['Browsing_forum'] = 'Users browsing this forum:';
|
||||
$lang['Browsing_forum_guest'] = 'Users browsing this forum: %s and %d guest';
|
||||
$lang['Browsing_forum_guests'] = 'Users browsing this forum: %s and %d guests';
|
||||
$lang['Online_users_zero_total'] = 'In total there are <b>0</b> users online :: ';
|
||||
$lang['Online_users_total'] = 'In total there are <b>%d</b> users online :: ';
|
||||
$lang['Online_user_total'] = 'In total there is <b>%d</b> user online :: ';
|
||||
|
|
|
@ -30,7 +30,7 @@ include($phpbb_root_path . 'common.'.$phpEx);
|
|||
// Set page ID for session management
|
||||
//
|
||||
$userdata = $session->start();
|
||||
$acl = new auth('list', $userdata);
|
||||
$acl = new acl('list', $userdata);
|
||||
|
||||
$session->configure($userdata);
|
||||
//
|
||||
|
|
|
@ -28,25 +28,45 @@ include($phpbb_root_path . 'common.'.$phpEx);
|
|||
// Start session management
|
||||
//
|
||||
$userdata = $session->start();
|
||||
$acl = new auth('list', $userdata);
|
||||
$acl = new acl('list', $userdata);
|
||||
|
||||
$session->configure($userdata);
|
||||
//
|
||||
// End session management
|
||||
//
|
||||
|
||||
//
|
||||
// Configure style, language, etc.
|
||||
//
|
||||
$session->configure($userdata);
|
||||
|
||||
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
|
||||
$form = ( !empty($HTTP_GET_VARS['form']) ) ? $HTTP_GET_VARS['form'] : 0;
|
||||
$field = ( isset($HTTP_GET_VARS['field']) ) ? $HTTP_GET_VARS['field'] : 'username';
|
||||
|
||||
$sort_by = ( !empty($HTTP_POST_VARS['sort_by']) ) ? intval($HTTP_POST_VARS['sort_by']) : ( ( !empty($HTTP_GET_VARS['sort_by']) ) ? $HTTP_GET_VARS['sort_by'] : '4' );
|
||||
$sort_order = ( !empty($HTTP_POST_VARS['sort_order']) ) ? $HTTP_POST_VARS['sort_order'] : ( ( !empty($HTTP_GET_VARS['sort_order']) ) ? $HTTP_GET_VARS['sort_order'] : 'd' );
|
||||
|
||||
$username = ( !empty($HTTP_POST_VARS['username']) ) ? $HTTP_POST_VARS['username'] : ( ( !empty($HTTP_GET_VARS['username']) ) ? $HTTP_GET_VARS['username'] : '' );
|
||||
$email = ( !empty($HTTP_POST_VARS['email']) ) ? $HTTP_POST_VARS['email'] : ( ( !empty($HTTP_GET_VARS['email']) ) ? $HTTP_GET_VARS['email'] : '' );
|
||||
$icq = ( !empty($HTTP_POST_VARS['icq']) ) ? intval($HTTP_POST_VARS['icq']) : ( ( !empty($HTTP_GET_VARS['icq']) ) ? $HTTP_GET_VARS['icq'] : '' );
|
||||
$aim = ( !empty($HTTP_POST_VARS['aim']) ) ? $HTTP_POST_VARS['aim'] : ( ( !empty($HTTP_GET_VARS['aim']) ) ? $HTTP_GET_VARS['aim'] : '' );
|
||||
$yahoo = ( !empty($HTTP_POST_VARS['yahoo']) ) ? $HTTP_POST_VARS['yahoo'] : ( ( !empty($HTTP_GET_VARS['yahoo']) ) ? $HTTP_GET_VARS['yahoo'] : '' );
|
||||
$msn = ( !empty($HTTP_POST_VARS['msn']) ) ? $HTTP_POST_VARS['msn'] : ( ( !empty($HTTP_GET_VARS['msn']) ) ? $HTTP_GET_VARS['msn'] : '' );
|
||||
|
||||
$joined_select = ( !empty($HTTP_POST_VARS['joined_select']) ) ? $HTTP_POST_VARS['joined_select'] : ( ( !empty($HTTP_GET_VARS['joined_select']) ) ? $HTTP_GET_VARS['joined_select'] : 'lt' );
|
||||
$active_select = ( !empty($HTTP_POST_VARS['active_select']) ) ? $HTTP_POST_VARS['active_select'] : ( ( !empty($HTTP_GET_VARS['active_select']) ) ? $HTTP_GET_VARS['active_select'] : 'lt' );
|
||||
$count_select = ( !empty($HTTP_POST_VARS['count_select']) ) ? $HTTP_POST_VARS['count_select'] : ( ( !empty($HTTP_GET_VARS['count_select']) ) ? $HTTP_GET_VARS['count_select'] : 'eq' );
|
||||
$joined = ( !empty($HTTP_POST_VARS['joined']) ) ? explode('-', $HTTP_POST_VARS['joined']) : ( ( !empty($HTTP_GET_VARS['joined']) ) ? explode('-', $HTTP_GET_VARS['joined']) : array() );
|
||||
$active = ( !empty($HTTP_POST_VARS['active']) ) ? explode('-', $HTTP_POST_VARS['active']) : ( ( !empty($HTTP_GET_VARS['active']) ) ? explode('-', $HTTP_GET_VARS['active']) : array() );
|
||||
$count = ( !empty($HTTP_POST_VARS['count']) ) ? intval($HTTP_POST_VARS['count']) : ( ( !empty($HTTP_GET_VARS['count']) ) ? $HTTP_GET_VARS['count'] : '' );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ( isset($HTTP_POST_VARS['order']) )
|
||||
{
|
||||
$sort_order = ($HTTP_POST_VARS['order'] == 'ASC') ? 'ASC' : 'DESC';
|
||||
$sort_order = ($HTTP_POST_VARS['order'] == 'a') ? 'ASC' : 'DESC';
|
||||
}
|
||||
else if ( isset($HTTP_GET_VARS['order']) )
|
||||
{
|
||||
$sort_order = ($HTTP_GET_VARS['order'] == 'ASC') ? 'ASC' : 'DESC';
|
||||
$sort_order = ($HTTP_GET_VARS['order'] == 'a') ? 'ASC' : 'DESC';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -68,12 +88,12 @@ for($i = 0; $i < count($mode_types_text); $i++)
|
|||
$select_sort_mode .= '</select>';
|
||||
|
||||
$select_sort_order = '<select name="order">';
|
||||
$select_sort_order .= ( $sort_order == 'ASC' ) ? '<option value="ASC" selected="selected">' . $lang['Sort_Ascending'] . '</option><option value="DESC">' . $lang['Sort_Descending'] . '</option>' : '<option value="ASC">' . $lang['Sort_Ascending'] . '</option><option value="DESC" selected="selected">' . $lang['Sort_Descending'] . '</option>';
|
||||
$select_sort_order .= ( $sort_order == 'a' ) ? '<option value="a" selected="selected">' . $lang['Sort_Ascending'] . '</option><option value="d">' . $lang['Sort_Descending'] . '</option>' : '<option value="a">' . $lang['Sort_Ascending'] . '</option><option value="d" selected="selected">' . $lang['Sort_Descending'] . '</option>';
|
||||
$select_sort_order .= '</select>';
|
||||
|
||||
if ( $mode != 'topten' || $board_config['topics_per_page'] < 10 )
|
||||
{
|
||||
$pagination = generate_pagination("memberlist.$phpEx?mode=$mode&order=$sort_order", $board_config['num_users'], $board_config['topics_per_page'], $start). ' ';
|
||||
$pagination = generate_pagination("memberlist.$phpEx$SID&mode=$mode&order=$sort_order", $board_config['num_users'], $board_config['topics_per_page'], $start). ' ';
|
||||
$total_members = $board_config['num_users'];
|
||||
}
|
||||
else
|
||||
|
@ -273,7 +293,7 @@ $page_title = $lang['Memberlist'];
|
|||
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
|
||||
|
||||
$template->set_filenames(array(
|
||||
'body' => 'memberlist_body.html')
|
||||
'body' => ( $mode == 'searchuser') ? 'search_username.html' : 'memberlist_body.html')
|
||||
);
|
||||
make_jumpbox('viewforum.'.$phpEx);
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ else
|
|||
// Start session management
|
||||
//
|
||||
$userdata = $session->start();
|
||||
$acl = new auth('forum', $userdata, $forum_id);
|
||||
$acl = new acl('forum', $userdata, $forum_id);
|
||||
//
|
||||
// End session management
|
||||
//
|
||||
|
|
|
@ -104,7 +104,7 @@ if ( isset($HTTP_POST_VARS['cancel']) )
|
|||
// Start session management
|
||||
//
|
||||
$userdata = $session->start();
|
||||
$acl = new auth('list', $userdata);
|
||||
$acl = new acl('list', $userdata);
|
||||
//
|
||||
// End session management
|
||||
//
|
||||
|
|
|
@ -82,7 +82,7 @@ if ( $cancel )
|
|||
// Start session management
|
||||
//
|
||||
$userdata = $session->start();
|
||||
$acl = new auth('list', $userdata);
|
||||
$acl = new acl('list', $userdata);
|
||||
//
|
||||
// End session management
|
||||
//
|
||||
|
|
|
@ -29,7 +29,7 @@ include($phpbb_root_path . 'common.'.$phpEx);
|
|||
// Start session management
|
||||
//
|
||||
$userdata = $session->start();
|
||||
$acl = new auth('list', $userdata);
|
||||
$acl = new acl('list', $userdata);
|
||||
//
|
||||
// End session management
|
||||
//
|
||||
|
|
|
@ -30,7 +30,7 @@ include($phpbb_root_path . 'includes/functions_posting.'.$phpEx);
|
|||
// Start session management
|
||||
//
|
||||
$userdata = $session->start();
|
||||
$acl = new auth('read', $userdata);
|
||||
$acl = new acl('read', $userdata);
|
||||
//
|
||||
// End session management
|
||||
//
|
||||
|
|
|
@ -82,7 +82,7 @@ if ( !($forum_data = $db->sql_fetchrow($result)) )
|
|||
//
|
||||
// Configure style, language, etc.
|
||||
//
|
||||
$acl = new auth('forum', $userdata, $forum_id);
|
||||
$acl = new acl('forum', $userdata, $forum_id);
|
||||
$userdata['user_style'] = ( $forum_data['forum_style'] ) ? $forum_data['user_style'] : $userdata['user_style'];
|
||||
$session->configure($userdata);
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ include($phpbb_root_path . 'common.'.$phpEx);
|
|||
// Start session management
|
||||
//
|
||||
$userdata = $session->start();
|
||||
$acl = new auth('list', $userdata);
|
||||
$acl = new acl('list', $userdata);
|
||||
//
|
||||
// End session management
|
||||
//
|
||||
|
|
|
@ -165,7 +165,7 @@ if ( !(extract($db->sql_fetchrow($result))) )
|
|||
$userdata['user_style'] = ( $default_style ) ? $default_style : $userdata['user_style'];
|
||||
$session->configure($userdata);
|
||||
|
||||
$acl = new auth('forum', $userdata, $forum_id);
|
||||
$acl = new acl('forum', $userdata, $forum_id);
|
||||
|
||||
//
|
||||
// Start auth check
|
||||
|
|
Loading…
Add table
Reference in a new issue