mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 05:18:52 +00:00
$auth-> to phpbb::$acl->
git-svn-id: file:///svn/phpbb/trunk@9335 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
794c574969
commit
95b69cfa7f
52 changed files with 499 additions and 499 deletions
|
@ -19,7 +19,7 @@ include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
|||
|
||||
// Start session management
|
||||
phpbb::$user->session_begin(false);
|
||||
$auth->acl(phpbb::$user->data);
|
||||
phpbb::$acl->init(phpbb::$user->data);
|
||||
phpbb::$user->setup();
|
||||
|
||||
// Set custom template for admin area
|
||||
|
|
|
@ -18,7 +18,7 @@ include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
|||
|
||||
// Do not update users last page entry
|
||||
phpbb::$user->session_begin(false);
|
||||
$auth->acl(phpbb::$user->data);
|
||||
phpbb::$acl->init(phpbb::$user->data);
|
||||
|
||||
$cron_type = request_var('cron_type', '');
|
||||
$use_shutdown_function = (@function_exists('register_shutdown_function')) ? true : false;
|
||||
|
|
|
@ -19,7 +19,7 @@ include(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT);
|
|||
|
||||
// Start session management
|
||||
phpbb::$user->session_begin();
|
||||
$auth->acl(phpbb::$user->data);
|
||||
phpbb::$acl->init(phpbb::$user->data);
|
||||
phpbb::$user->setup();
|
||||
|
||||
$bots = array(
|
||||
|
|
|
@ -29,7 +29,7 @@ include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
|||
|
||||
// Start session management
|
||||
phpbb::$user->session_begin();
|
||||
$auth->acl(phpbb::$user->data);
|
||||
phpbb::$acl->init(phpbb::$user->data);
|
||||
phpbb::$user->setup();
|
||||
|
||||
$search_type = phpbb::$config['search_type'];
|
||||
|
|
|
@ -89,7 +89,7 @@ $thumbnail = request_var('t', false);
|
|||
|
||||
// Start session management, do not update session page.
|
||||
phpbb::$user->session_begin(false);
|
||||
$auth->acl(phpbb::$user->data);
|
||||
phpbb::$acl->init(phpbb::$user->data);
|
||||
phpbb::$user->setup('viewtopic');
|
||||
|
||||
if (!$download_id)
|
||||
|
@ -124,9 +124,9 @@ $row = array();
|
|||
if ($attachment['is_orphan'])
|
||||
{
|
||||
// We allow admins having attachment permissions to see orphan attachments...
|
||||
$own_attachment = ($auth->acl_get('a_attach') || $attachment['poster_id'] == phpbb::$user->data['user_id']) ? true : false;
|
||||
$own_attachment = (phpbb::$acl->acl_get('a_attach') || $attachment['poster_id'] == phpbb::$user->data['user_id']) ? true : false;
|
||||
|
||||
if (!$own_attachment || ($attachment['in_message'] && !$auth->acl_get('u_pm_download')) || (!$attachment['in_message'] && !$auth->acl_get('u_download')))
|
||||
if (!$own_attachment || ($attachment['in_message'] && !phpbb::$acl->acl_get('u_pm_download')) || (!$attachment['in_message'] && !phpbb::$acl->acl_get('u_download')))
|
||||
{
|
||||
trigger_error('ERROR_NO_ATTACHMENT');
|
||||
}
|
||||
|
@ -148,9 +148,9 @@ else
|
|||
$db->sql_freeresult($result);
|
||||
|
||||
// Global announcement?
|
||||
$f_download = (!$row) ? $auth->acl_getf_global('f_download') : $auth->acl_get('f_download', $row['forum_id']);
|
||||
$f_download = (!$row) ? phpbb::$acl->acl_getf_global('f_download') : phpbb::$acl->acl_get('f_download', $row['forum_id']);
|
||||
|
||||
if ($auth->acl_get('u_download') && $f_download)
|
||||
if (phpbb::$acl->acl_get('u_download') && $f_download)
|
||||
{
|
||||
if ($row && $row['forum_password'])
|
||||
{
|
||||
|
@ -166,7 +166,7 @@ else
|
|||
else
|
||||
{
|
||||
$row['forum_id'] = false;
|
||||
if (!$auth->acl_get('u_pm_download'))
|
||||
if (!phpbb::$acl->acl_get('u_pm_download'))
|
||||
{
|
||||
header('HTTP/1.0 403 forbidden');
|
||||
trigger_error('SORRY_AUTH_VIEW_ATTACH');
|
||||
|
|
|
@ -18,7 +18,7 @@ include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
|||
|
||||
// Start session management
|
||||
phpbb::$user->session_begin();
|
||||
$auth->acl(phpbb::$user->data);
|
||||
phpbb::$acl->init(phpbb::$user->data);
|
||||
phpbb::$user->setup();
|
||||
|
||||
$mode = request_var('mode', '');
|
||||
|
|
|
@ -142,10 +142,10 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl =
|
|||
$right = $row['right_id'];
|
||||
$disabled = false;
|
||||
|
||||
if ($acl && !$auth->acl_gets($acl, $row['forum_id']))
|
||||
if ($acl && !phpbb::$acl->acl_gets($acl, $row['forum_id']))
|
||||
{
|
||||
// List permission?
|
||||
if ($auth->acl_get('f_list', $row['forum_id']))
|
||||
if (phpbb::$acl->acl_get('f_list', $row['forum_id']))
|
||||
{
|
||||
$disabled = true;
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ function get_forum_list($acl_list = 'f_list', $id_only = true, $postable_only =
|
|||
continue;
|
||||
}
|
||||
|
||||
if ($acl_list == '' || ($acl_list != '' && $auth->acl_gets($acl_list, $row['forum_id'])))
|
||||
if ($acl_list == '' || ($acl_list != '' && phpbb::$acl->acl_gets($acl_list, $row['forum_id'])))
|
||||
{
|
||||
$rowset[] = ($id_only) ? $row['forum_id'] : $row;
|
||||
}
|
||||
|
@ -2104,7 +2104,7 @@ function cache_moderators()
|
|||
$hold_ary = $ug_id_ary = $sql_ary = array();
|
||||
|
||||
// Grab all users having moderative options...
|
||||
$hold_ary = $auth->acl_user_raw_data(false, 'm_%', false);
|
||||
$hold_ary = phpbb::$acl->acl_user_raw_data(false, 'm_%', false);
|
||||
|
||||
// Add users?
|
||||
if (sizeof($hold_ary))
|
||||
|
@ -2185,7 +2185,7 @@ function cache_moderators()
|
|||
}
|
||||
|
||||
// Now to the groups...
|
||||
$hold_ary = $auth->acl_group_raw_data(false, 'm_%', false);
|
||||
$hold_ary = phpbb::$acl->acl_group_raw_data(false, 'm_%', false);
|
||||
|
||||
if (sizeof($hold_ary))
|
||||
{
|
||||
|
@ -2569,7 +2569,7 @@ function update_foes($group_id = false, $user_id = false)
|
|||
|
||||
// update foes for everyone
|
||||
$perms = array();
|
||||
foreach ($auth->acl_get_list(false, array('a_', 'm_'), false) as $forum_id => $forum_ary)
|
||||
foreach (phpbb::$acl->acl_get_list(false, array('a_', 'm_'), false) as $forum_id => $forum_ary)
|
||||
{
|
||||
foreach ($forum_ary as $auth_option => $user_ary)
|
||||
{
|
||||
|
|
|
@ -507,7 +507,7 @@ function generate_forum_rules(&$forum_data)
|
|||
*/
|
||||
function generate_forum_nav(&$forum_data)
|
||||
{
|
||||
if (!$auth->acl_get('f_list', $forum_data['forum_id']))
|
||||
if (!phpbb::$acl->acl_get('f_list', $forum_data['forum_id']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -523,7 +523,7 @@ function generate_forum_nav(&$forum_data)
|
|||
list($parent_name, $parent_type) = array_values($parent_data);
|
||||
|
||||
// Skip this parent if the user does not have the permission to view it
|
||||
if (!$auth->acl_get('f_list', $parent_forum_id))
|
||||
if (!phpbb::$acl->acl_get('f_list', $parent_forum_id))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -725,18 +725,18 @@ function get_moderators(&$forum_moderators, $forum_id = false)
|
|||
*/
|
||||
function gen_forum_auth_level($mode, $forum_id, $forum_status)
|
||||
{
|
||||
$locked = ($forum_status == ITEM_LOCKED && !$auth->acl_get('m_edit', $forum_id)) ? true : false;
|
||||
$locked = ($forum_status == ITEM_LOCKED && !phpbb::$acl->acl_get('m_edit', $forum_id)) ? true : false;
|
||||
|
||||
$rules = array(
|
||||
($auth->acl_get('f_post', $forum_id) && !$locked) ? phpbb::$user->lang['RULES_POST_CAN'] : phpbb::$user->lang['RULES_POST_CANNOT'],
|
||||
($auth->acl_get('f_reply', $forum_id) && !$locked) ? phpbb::$user->lang['RULES_REPLY_CAN'] : phpbb::$user->lang['RULES_REPLY_CANNOT'],
|
||||
(phpbb::$user->is_registered && $auth->acl_gets('f_edit', 'm_edit', $forum_id) && !$locked) ? phpbb::$user->lang['RULES_EDIT_CAN'] : phpbb::$user->lang['RULES_EDIT_CANNOT'],
|
||||
(phpbb::$user->is_registered && $auth->acl_gets('f_delete', 'm_delete', $forum_id) && !$locked) ? phpbb::$user->lang['RULES_DELETE_CAN'] : phpbb::$user->lang['RULES_DELETE_CANNOT'],
|
||||
(phpbb::$acl->acl_get('f_post', $forum_id) && !$locked) ? phpbb::$user->lang['RULES_POST_CAN'] : phpbb::$user->lang['RULES_POST_CANNOT'],
|
||||
(phpbb::$acl->acl_get('f_reply', $forum_id) && !$locked) ? phpbb::$user->lang['RULES_REPLY_CAN'] : phpbb::$user->lang['RULES_REPLY_CANNOT'],
|
||||
(phpbb::$user->is_registered && phpbb::$acl->acl_gets('f_edit', 'm_edit', $forum_id) && !$locked) ? phpbb::$user->lang['RULES_EDIT_CAN'] : phpbb::$user->lang['RULES_EDIT_CANNOT'],
|
||||
(phpbb::$user->is_registered && phpbb::$acl->acl_gets('f_delete', 'm_delete', $forum_id) && !$locked) ? phpbb::$user->lang['RULES_DELETE_CAN'] : phpbb::$user->lang['RULES_DELETE_CANNOT'],
|
||||
);
|
||||
|
||||
if (phpbb::$config['allow_attachments'])
|
||||
{
|
||||
$rules[] = ($auth->acl_get('f_attach', $forum_id) && $auth->acl_get('u_attach') && !$locked) ? phpbb::$user->lang['RULES_ATTACH_CAN'] : phpbb::$user->lang['RULES_ATTACH_CANNOT'];
|
||||
$rules[] = (phpbb::$acl->acl_get('f_attach', $forum_id) && phpbb::$acl->acl_get('u_attach') && !$locked) ? phpbb::$user->lang['RULES_ATTACH_CAN'] : phpbb::$user->lang['RULES_ATTACH_CANNOT'];
|
||||
}
|
||||
|
||||
foreach ($rules as $rule)
|
||||
|
@ -894,7 +894,7 @@ function display_user_activity(&$userdata)
|
|||
$forum_ary = array();
|
||||
|
||||
// Do not include those forums the user is not having read access to...
|
||||
$forum_read_ary = $auth->acl_getf('!f_read');
|
||||
$forum_read_ary = phpbb::$acl->acl_getf('!f_read');
|
||||
|
||||
foreach ($forum_read_ary as $forum_id => $not_allowed)
|
||||
{
|
||||
|
|
|
@ -295,7 +295,7 @@ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
|
|||
// We do not have a special post global announcement permission
|
||||
$auth_key = ($auth_key == 'global') ? 'announce' : $auth_key;
|
||||
|
||||
if ($auth->acl_get('f_' . $auth_key, $forum_id))
|
||||
if (phpbb::$acl->acl_get('f_' . $auth_key, $forum_id))
|
||||
{
|
||||
$toggle = true;
|
||||
|
||||
|
@ -323,8 +323,8 @@ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
|
|||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_TOPIC_TYPE_STICKY' => ($auth->acl_get('f_sticky', $forum_id)),
|
||||
'S_TOPIC_TYPE_ANNOUNCE' => ($auth->acl_get('f_announce', $forum_id)))
|
||||
'S_TOPIC_TYPE_STICKY' => (phpbb::$acl->acl_get('f_sticky', $forum_id)),
|
||||
'S_TOPIC_TYPE_ANNOUNCE' => (phpbb::$acl->acl_get('f_announce', $forum_id)))
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -395,13 +395,13 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
|
|||
$filedata['thumbnail'] = ($cat_id == ATTACHMENT_CATEGORY_IMAGE && phpbb::$config['img_create_thumbnail']) ? 1 : 0;
|
||||
|
||||
// Check Image Size, if it is an image
|
||||
if (!$auth->acl_get('a_') && !$auth->acl_get('m_', $forum_id) && $cat_id == ATTACHMENT_CATEGORY_IMAGE)
|
||||
if (!phpbb::$acl->acl_get('a_') && !phpbb::$acl->acl_get('m_', $forum_id) && $cat_id == ATTACHMENT_CATEGORY_IMAGE)
|
||||
{
|
||||
$file->upload->set_allowed_dimensions(0, 0, phpbb::$config['img_max_width'], phpbb::$config['img_max_height']);
|
||||
}
|
||||
|
||||
// Admins and mods are allowed to exceed the allowed filesize
|
||||
if (!$auth->acl_get('a_') && !$auth->acl_get('m_', $forum_id))
|
||||
if (!phpbb::$acl->acl_get('a_') && !phpbb::$acl->acl_get('m_', $forum_id))
|
||||
{
|
||||
if (!empty($extensions[$file->get('extension')]['max_filesize']))
|
||||
{
|
||||
|
@ -865,9 +865,9 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0)
|
|||
|
||||
if (isset($topic_rows[$draft['topic_id']])
|
||||
&& (
|
||||
($topic_rows[$draft['topic_id']]['forum_id'] && $auth->acl_get('f_read', $topic_rows[$draft['topic_id']]['forum_id']))
|
||||
($topic_rows[$draft['topic_id']]['forum_id'] && phpbb::$acl->acl_get('f_read', $topic_rows[$draft['topic_id']]['forum_id']))
|
||||
||
|
||||
(!$topic_rows[$draft['topic_id']]['forum_id'] && $auth->acl_getf_global('f_read'))
|
||||
(!$topic_rows[$draft['topic_id']]['forum_id'] && phpbb::$acl->acl_getf_global('f_read'))
|
||||
))
|
||||
{
|
||||
$topic_forum_id = ($topic_rows[$draft['topic_id']]['forum_id']) ? $topic_rows[$draft['topic_id']]['forum_id'] : $forum_id;
|
||||
|
@ -878,7 +878,7 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0)
|
|||
|
||||
$insert_url = append_sid('posting', 'f=' . $topic_forum_id . '&t=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id']);
|
||||
}
|
||||
else if ($draft['forum_id'] && $auth->acl_get('f_read', $draft['forum_id']))
|
||||
else if ($draft['forum_id'] && phpbb::$acl->acl_get('f_read', $draft['forum_id']))
|
||||
{
|
||||
$link_forum = true;
|
||||
$view_url = append_sid('viewforum', 'f=' . $draft['forum_id']);
|
||||
|
@ -920,7 +920,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
|||
$sql = 'SELECT p.post_id
|
||||
FROM ' . POSTS_TABLE . ' p' . "
|
||||
WHERE p.topic_id = $topic_id
|
||||
" . ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND p.post_approved = 1' : '') . '
|
||||
" . ((!phpbb::$acl->acl_get('m_approve', $forum_id)) ? 'AND p.post_approved = 1' : '') . '
|
||||
' . (($mode == 'post_review') ? " AND p.post_id > $cur_post_id" : '') . '
|
||||
ORDER BY p.post_time ';
|
||||
$sql .= ($mode == 'post_review') ? 'ASC' : 'DESC';
|
||||
|
@ -978,7 +978,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
|||
|
||||
// Grab extensions
|
||||
$extensions = $attachments = array();
|
||||
if ($has_attachments && $auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id))
|
||||
if ($has_attachments && phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $forum_id))
|
||||
{
|
||||
$extensions = phpbb_cache::obtain_extensions_forum($forum_id);
|
||||
|
||||
|
@ -1014,7 +1014,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
|||
|
||||
$decoded_message = false;
|
||||
|
||||
if ($show_quote_button && $auth->acl_get('f_reply', $forum_id))
|
||||
if ($show_quote_button && phpbb::$acl->acl_get('f_reply', $forum_id))
|
||||
{
|
||||
$decoded_message = $message;
|
||||
decode_message($decoded_message, $row['bbcode_uid']);
|
||||
|
@ -1053,8 +1053,8 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
|||
'DECODED_MESSAGE' => $decoded_message,
|
||||
'POST_ID' => $row['post_id'],
|
||||
'U_MINI_POST' => append_sid('viewtopic', 'p=' . $row['post_id']) . '#p' . $row['post_id'],
|
||||
'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? append_sid('mcp', 'i=main&mode=post_details&f=' . $forum_id . '&p=' . $row['post_id'], true, phpbb::$user->session_id) : '',
|
||||
'POSTER_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '')
|
||||
'U_MCP_DETAILS' => (phpbb::$acl->acl_get('m_info', $forum_id)) ? append_sid('mcp', 'i=main&mode=post_details&f=' . $forum_id . '&p=' . $row['post_id'], true, phpbb::$user->session_id) : '',
|
||||
'POSTER_QUOTE' => ($show_quote_button && phpbb::$acl->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '')
|
||||
);
|
||||
|
||||
// Display not already displayed Attachments for this post, we already parsed them. ;)
|
||||
|
@ -1182,7 +1182,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
|
|||
}
|
||||
|
||||
// Make sure users are allowed to read the forum
|
||||
foreach ($auth->acl_get_list(array_keys($notify_rows), 'f_read', $forum_id) as $forum_id => $forum_ary)
|
||||
foreach (phpbb::$acl->acl_get_list(array_keys($notify_rows), 'f_read', $forum_id) as $forum_id => $forum_ary)
|
||||
{
|
||||
foreach ($forum_ary as $auth_option => $user_ary)
|
||||
{
|
||||
|
@ -1444,7 +1444,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
|
|||
$sql = 'SELECT MAX(post_id) as last_post_id
|
||||
FROM ' . POSTS_TABLE . "
|
||||
WHERE topic_id = $topic_id " .
|
||||
((!$auth->acl_get('m_approve', $forum_id)) ? 'AND post_approved = 1' : '');
|
||||
((!phpbb::$acl->acl_get('m_approve', $forum_id)) ? 'AND post_approved = 1' : '');
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -1457,7 +1457,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
|
|||
$sql = 'SELECT post_id
|
||||
FROM ' . POSTS_TABLE . "
|
||||
WHERE topic_id = $topic_id " .
|
||||
((!$auth->acl_get('m_approve', $forum_id)) ? 'AND post_approved = 1' : '') . '
|
||||
((!phpbb::$acl->acl_get('m_approve', $forum_id)) ? 'AND post_approved = 1' : '') . '
|
||||
AND post_time > ' . $data['post_time'] . '
|
||||
ORDER BY post_time ASC';
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
|
@ -1579,7 +1579,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
$post_approval = 1;
|
||||
|
||||
// Check the permissions for post approval, as well as the queue trigger where users are put on approval with a post count lower than specified. Moderators are not affected.
|
||||
if (((phpbb::$config['enable_queue_trigger'] && phpbb::$user->data['user_posts'] < phpbb::$config['queue_trigger_posts']) || !$auth->acl_get('f_noapprove', $data['forum_id'])) && !$auth->acl_get('m_approve', $data['forum_id']))
|
||||
if (((phpbb::$config['enable_queue_trigger'] && phpbb::$user->data['user_posts'] < phpbb::$config['queue_trigger_posts']) || !phpbb::$acl->acl_get('f_noapprove', $data['forum_id'])) && !phpbb::$acl->acl_get('m_approve', $data['forum_id']))
|
||||
{
|
||||
$post_approval = 0;
|
||||
}
|
||||
|
@ -1610,7 +1610,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
'post_attachment' => (!empty($data['attachment_data'])) ? 1 : 0,
|
||||
'bbcode_bitfield' => $data['bbcode_bitfield'],
|
||||
'bbcode_uid' => $data['bbcode_uid'],
|
||||
'post_postcount' => ($auth->acl_get('f_postcount', $data['forum_id'])) ? 1 : 0,
|
||||
'post_postcount' => (phpbb::$acl->acl_get('f_postcount', $data['forum_id'])) ? 1 : 0,
|
||||
'post_edit_locked' => $data['post_edit_locked']
|
||||
);
|
||||
break;
|
||||
|
@ -1628,7 +1628,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
// If normal edit display edit info
|
||||
|
||||
// Display edit info if edit reason given or user is editing his post, which is not the last within the topic.
|
||||
if ($data['post_edit_reason'] || (!$auth->acl_get('m_edit', $data['forum_id']) && ($post_mode == 'edit' || $post_mode == 'edit_first_post')))
|
||||
if ($data['post_edit_reason'] || (!phpbb::$acl->acl_get('m_edit', $data['forum_id']) && ($post_mode == 'edit' || $post_mode == 'edit_first_post')))
|
||||
{
|
||||
$data['post_edit_reason'] = truncate_string($data['post_edit_reason'], 255, 255, false);
|
||||
|
||||
|
@ -1640,7 +1640,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
|
||||
$sql_data[POSTS_TABLE]['stat'][] = 'post_edit_count = post_edit_count + 1';
|
||||
}
|
||||
else if (!$data['post_edit_reason'] && $mode == 'edit' && $auth->acl_get('m_edit', $data['forum_id']))
|
||||
else if (!$data['post_edit_reason'] && $mode == 'edit' && phpbb::$acl->acl_get('m_edit', $data['forum_id']))
|
||||
{
|
||||
$sql_data[POSTS_TABLE]['sql'] = array(
|
||||
'post_edit_reason' => '',
|
||||
|
@ -1718,7 +1718,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
);
|
||||
}
|
||||
|
||||
$sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id']) && $post_approval) ? ', user_posts = user_posts + 1' : '');
|
||||
$sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . ((phpbb::$acl->acl_get('f_postcount', $data['forum_id']) && $post_approval) ? ', user_posts = user_posts + 1' : '');
|
||||
|
||||
if ($topic_type != POST_GLOBAL)
|
||||
{
|
||||
|
@ -1732,7 +1732,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
|
||||
case 'reply':
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = 'topic_replies_real = topic_replies_real + 1, topic_bumped = 0, topic_bumper = 0' . (($post_approval) ? ', topic_replies = topic_replies + 1' : '') . ((!empty($data['attachment_data']) || (isset($data['topic_attachment']) && $data['topic_attachment'])) ? ', topic_attachment = 1' : '');
|
||||
$sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id']) && $post_approval) ? ', user_posts = user_posts + 1' : '');
|
||||
$sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . ((phpbb::$acl->acl_get('f_postcount', $data['forum_id']) && $post_approval) ? ', user_posts = user_posts + 1' : '');
|
||||
|
||||
if ($post_approval && $topic_type != POST_GLOBAL)
|
||||
{
|
||||
|
@ -1785,7 +1785,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
set_config('num_posts', phpbb::$config['num_posts'] - ($topic_row['topic_replies'] + 1), true);
|
||||
|
||||
// Only decrement this post, since this is the one non-approved now
|
||||
if ($auth->acl_get('f_postcount', $data['forum_id']))
|
||||
if (phpbb::$acl->acl_get('f_postcount', $data['forum_id']))
|
||||
{
|
||||
$sql_data[USERS_TABLE]['stat'][] = 'user_posts = user_posts - 1';
|
||||
}
|
||||
|
@ -1804,7 +1804,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
|
||||
set_config('num_posts', phpbb::$config['num_posts'] - 1, true);
|
||||
|
||||
if ($auth->acl_get('f_postcount', $data['forum_id']))
|
||||
if (phpbb::$acl->acl_get('f_postcount', $data['forum_id']))
|
||||
{
|
||||
$sql_data[USERS_TABLE]['stat'][] = 'user_posts = user_posts - 1';
|
||||
}
|
||||
|
|
|
@ -1313,7 +1313,7 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
|
|||
{
|
||||
// We need to check the PM status of group members (do they want to receive PM's?)
|
||||
// Only check if not a moderator or admin, since they are allowed to override this user setting
|
||||
$sql_allow_pm = (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) ? ' AND u.user_allow_pm = 1' : '';
|
||||
$sql_allow_pm = (!phpbb::$acl->acl_gets('a_', 'm_') && !phpbb::$acl->acl_getf_global('m_')) ? ' AND u.user_allow_pm = 1' : '';
|
||||
|
||||
$sql = 'SELECT u.user_type, ug.group_id, ug.user_id
|
||||
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . ' ug
|
||||
|
@ -1743,7 +1743,7 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
|
|||
|
||||
$decoded_message = false;
|
||||
|
||||
if ($in_post_mode && $auth->acl_get('u_sendpm') && $author_id != ANONYMOUS && $author_id != phpbb::$user->data['user_id'])
|
||||
if ($in_post_mode && phpbb::$acl->acl_get('u_sendpm') && $author_id != ANONYMOUS && $author_id != phpbb::$user->data['user_id'])
|
||||
{
|
||||
$decoded_message = $message;
|
||||
decode_message($decoded_message, $row['bbcode_uid']);
|
||||
|
@ -1787,8 +1787,8 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
|
|||
|
||||
'MSG_ID' => $row['msg_id'],
|
||||
'U_VIEW_MESSAGE' => "$url&f=$folder_id&p=" . $row['msg_id'],
|
||||
'U_QUOTE' => (!$in_post_mode && $auth->acl_get('u_sendpm') && $author_id != ANONYMOUS && $author_id != phpbb::$user->data['user_id']) ? "$url&mode=compose&action=quote&f=" . $folder_id . "&p=" . $row['msg_id'] : '',
|
||||
'U_POST_REPLY_PM' => ($author_id != phpbb::$user->data['user_id'] && $author_id != ANONYMOUS && $auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $row['msg_id'] : '')
|
||||
'U_QUOTE' => (!$in_post_mode && phpbb::$acl->acl_get('u_sendpm') && $author_id != ANONYMOUS && $author_id != phpbb::$user->data['user_id']) ? "$url&mode=compose&action=quote&f=" . $folder_id . "&p=" . $row['msg_id'] : '',
|
||||
'U_POST_REPLY_PM' => ($author_id != phpbb::$user->data['user_id'] && $author_id != ANONYMOUS && phpbb::$acl->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $row['msg_id'] : '')
|
||||
);
|
||||
unset($rowset[$id]);
|
||||
$prev_id = $id;
|
||||
|
|
|
@ -43,7 +43,7 @@ class custom_profile
|
|||
|
||||
case 'profile':
|
||||
// Show hidden fields to moderators/admins
|
||||
if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
|
||||
if (!phpbb::$acl->acl_gets('a_', 'm_') && !phpbb::$acl->acl_getf_global('m_'))
|
||||
{
|
||||
$sql_where .= ' AND f.field_hide = 0';
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ class custom_profile
|
|||
FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f
|
||||
WHERE l.lang_id = ' . phpbb::$user->get_iso_lang_id() . '
|
||||
AND f.field_active = 1 ' .
|
||||
((!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) ? ' AND f.field_hide = 0 ' : '') . '
|
||||
((!phpbb::$acl->acl_gets('a_', 'm_') && !phpbb::$acl->acl_getf_global('m_')) ? ' AND f.field_hide = 0 ' : '') . '
|
||||
AND f.field_no_view = 0
|
||||
AND l.field_id = f.field_id
|
||||
ORDER BY f.field_order';
|
||||
|
@ -270,7 +270,7 @@ class custom_profile
|
|||
|
||||
case 'profile':
|
||||
// Show hidden fields to moderators/admins
|
||||
if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
|
||||
if (!phpbb::$acl->acl_gets('a_', 'm_') && !phpbb::$acl->acl_getf_global('m_'))
|
||||
{
|
||||
$sql_where .= ' AND f.field_hide = 0';
|
||||
}
|
||||
|
|
|
@ -632,7 +632,7 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
|
|||
phpbb::$db->sql_query($sql);
|
||||
}
|
||||
|
||||
$auth->acl_clear_prefetch(array_keys($sql_statements));
|
||||
phpbb::$acl->acl_clear_prefetch(array_keys($sql_statements));
|
||||
}
|
||||
|
||||
if ($deactivated)
|
||||
|
@ -2098,7 +2098,7 @@ function avatar_process_user(&$error, $custom_userdata = false)
|
|||
}
|
||||
|
||||
$data['user_id'] = $userdata['user_id'];
|
||||
$change_avatar = ($custom_userdata === false) ? $auth->acl_get('u_chgavatar') : true;
|
||||
$change_avatar = ($custom_userdata === false) ? phpbb::$acl->acl_get('u_chgavatar') : true;
|
||||
$avatar_select = basename(request_var('avatar_select', ''));
|
||||
|
||||
// Can we upload?
|
||||
|
@ -2565,7 +2565,7 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
|
|||
phpbb::$db->sql_transaction('commit');
|
||||
|
||||
// Clear permissions cache of relevant users
|
||||
$auth->acl_clear_prefetch($user_id_ary);
|
||||
phpbb::$acl->acl_clear_prefetch($user_id_ary);
|
||||
|
||||
if (!$group_name)
|
||||
{
|
||||
|
@ -2688,7 +2688,7 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
|
|||
phpbb::$db->sql_query($sql);
|
||||
|
||||
// Clear permissions cache of relevant users
|
||||
$auth->acl_clear_prefetch($user_id_ary);
|
||||
phpbb::$acl->acl_clear_prefetch($user_id_ary);
|
||||
|
||||
if (!$group_name)
|
||||
{
|
||||
|
@ -2907,7 +2907,7 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
|
|||
}
|
||||
|
||||
// Clear permissions cache of relevant users
|
||||
$auth->acl_clear_prefetch($user_id_ary);
|
||||
phpbb::$acl->acl_clear_prefetch($user_id_ary);
|
||||
|
||||
add_log('admin', $log, $group_name, implode(', ', $username_ary));
|
||||
|
||||
|
@ -3157,7 +3157,7 @@ function group_memberships($group_id_ary = false, $user_id_ary = false, $return_
|
|||
*/
|
||||
function group_update_listings($group_id)
|
||||
{
|
||||
$hold_ary = $auth->acl_group_raw_data($group_id, array('a_', 'm_'));
|
||||
$hold_ary = phpbb::$acl->acl_group_raw_data($group_id, array('a_', 'm_'));
|
||||
|
||||
if (!sizeof($hold_ary))
|
||||
{
|
||||
|
|
|
@ -1322,7 +1322,7 @@ class parse_message extends bbcode_firstpass
|
|||
|
||||
if ($submit && in_array($mode, array('post', 'reply', 'quote', 'edit')) && $upload_file)
|
||||
{
|
||||
if ($num_attachments < $cfg['max_attachments'] || $auth->acl_get('a_') || $auth->acl_get('m_', $forum_id))
|
||||
if ($num_attachments < $cfg['max_attachments'] || phpbb::$acl->acl_get('a_') || phpbb::$acl->acl_get('m_', $forum_id))
|
||||
{
|
||||
$filedata = upload_attachment($form_name, $forum_id, false, '', $is_message);
|
||||
$error = $filedata['error'];
|
||||
|
@ -1424,7 +1424,7 @@ class parse_message extends bbcode_firstpass
|
|||
}
|
||||
else if (($add_file || $preview) && $upload_file)
|
||||
{
|
||||
if ($num_attachments < $cfg['max_attachments'] || $auth->acl_gets('m_', 'a_', $forum_id))
|
||||
if ($num_attachments < $cfg['max_attachments'] || phpbb::$acl->acl_gets('m_', 'a_', $forum_id))
|
||||
{
|
||||
$filedata = upload_attachment($form_name, $forum_id, false, '', $is_message);
|
||||
$error = array_merge($error, $filedata['error']);
|
||||
|
|
|
@ -20,7 +20,7 @@ require(PHPBB_ROOT_PATH . 'includes/functions_module.' . PHP_EXT);
|
|||
|
||||
// Start session management
|
||||
phpbb::$user->session_begin();
|
||||
$auth->acl(phpbb::$user->data);
|
||||
phpbb::$acl->init(phpbb::$user->data);
|
||||
phpbb::$user->setup('mcp');
|
||||
|
||||
$module = new p_master();
|
||||
|
@ -105,7 +105,7 @@ else if ($topic_id)
|
|||
}
|
||||
|
||||
// If the user doesn't have any moderator powers (globally or locally) he can't access the mcp
|
||||
if (!$auth->acl_getf_global('m_'))
|
||||
if (!phpbb::$acl->acl_getf_global('m_'))
|
||||
{
|
||||
// Except he is using one of the quickmod tools for users
|
||||
$user_quickmod_actions = array(
|
||||
|
@ -117,7 +117,7 @@ if (!$auth->acl_getf_global('m_'))
|
|||
);
|
||||
|
||||
$allow_user = false;
|
||||
if ($quickmod && isset($user_quickmod_actions[$action]) && phpbb::$user->is_registered && $auth->acl_gets($user_quickmod_actions[$action], $forum_id))
|
||||
if ($quickmod && isset($user_quickmod_actions[$action]) && phpbb::$user->is_registered && phpbb::$acl->acl_gets($user_quickmod_actions[$action], $forum_id))
|
||||
{
|
||||
$topic_info = get_topic_data(array($topic_id));
|
||||
if ($topic_info[$topic_id]['topic_poster'] == phpbb::$user->data['user_id'])
|
||||
|
@ -133,7 +133,7 @@ if (!$auth->acl_getf_global('m_'))
|
|||
}
|
||||
|
||||
// if the user cannot read the forum he tries to access then we won't allow mcp access either
|
||||
if ($forum_id && !$auth->acl_get('f_read', $forum_id))
|
||||
if ($forum_id && !phpbb::$acl->acl_get('f_read', $forum_id))
|
||||
{
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
@ -400,7 +400,7 @@ function get_topic_data($topic_ids, $acl_list = false, $read_tracking = false)
|
|||
|
||||
$rowset[$row['topic_id']] = $row;
|
||||
|
||||
if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
|
||||
if ($acl_list && !phpbb::$acl->acl_gets($acl_list, $row['forum_id']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -412,7 +412,7 @@ function get_topic_data($topic_ids, $acl_list = false, $read_tracking = false)
|
|||
|
||||
foreach ($cache_topic_ids as $id)
|
||||
{
|
||||
if (!$acl_list || $auth->acl_gets($acl_list, $rowset[$id]['forum_id']))
|
||||
if (!$acl_list || phpbb::$acl->acl_gets($acl_list, $rowset[$id]['forum_id']))
|
||||
{
|
||||
$topics[$id] = $rowset[$id];
|
||||
}
|
||||
|
@ -481,12 +481,12 @@ function get_post_data($post_ids, $acl_list = false, $read_tracking = false)
|
|||
$row['forum_id'] = request_var('f', 0);
|
||||
}
|
||||
|
||||
if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
|
||||
if ($acl_list && !phpbb::$acl->acl_gets($acl_list, $row['forum_id']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!$row['post_approved'] && !$auth->acl_get('m_approve', $row['forum_id']))
|
||||
if (!$row['post_approved'] && !phpbb::$acl->acl_get('m_approve', $row['forum_id']))
|
||||
{
|
||||
// Moderators without the permission to approve post should at least not see them. ;)
|
||||
continue;
|
||||
|
@ -534,12 +534,12 @@ function get_forum_data($forum_id, $acl_list = 'f_list', $read_tracking = false)
|
|||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
|
||||
if ($acl_list && !phpbb::$acl->acl_gets($acl_list, $row['forum_id']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($auth->acl_get('m_approve', $row['forum_id']))
|
||||
if (phpbb::$acl->acl_get('m_approve', $row['forum_id']))
|
||||
{
|
||||
$row['forum_topics'] = $row['forum_topics_real'];
|
||||
}
|
||||
|
@ -574,7 +574,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
|
|||
AND topic_type NOT IN (" . POST_ANNOUNCE . ', ' . POST_GLOBAL . ")
|
||||
AND topic_last_post_time >= $min_time";
|
||||
|
||||
if (!$auth->acl_get('m_approve', $forum_id))
|
||||
if (!phpbb::$acl->acl_get('m_approve', $forum_id))
|
||||
{
|
||||
$sql .= 'AND topic_approved = 1';
|
||||
}
|
||||
|
@ -590,7 +590,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
|
|||
$where_sql topic_id = $topic_id
|
||||
AND post_time >= $min_time";
|
||||
|
||||
if (!$auth->acl_get('m_approve', $forum_id))
|
||||
if (!phpbb::$acl->acl_get('m_approve', $forum_id))
|
||||
{
|
||||
$sql .= 'AND post_approved = 1';
|
||||
}
|
||||
|
@ -688,7 +688,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
|
|||
$limit_days = array(0 => phpbb::$user->lang['ALL_TOPICS'], 1 => phpbb::$user->lang['1_DAY'], 7 => phpbb::$user->lang['7_DAYS'], 14 => phpbb::$user->lang['2_WEEKS'], 30 => phpbb::$user->lang['1_MONTH'], 90 => phpbb::$user->lang['3_MONTHS'], 180 => phpbb::$user->lang['6_MONTHS'], 365 => phpbb::$user->lang['1_YEAR']);
|
||||
$sort_by_text = array('a' => phpbb::$user->lang['AUTHOR'], 't' => phpbb::$user->lang['POST_TIME'], 'tt' => phpbb::$user->lang['TOPIC_TIME'], 'r' => phpbb::$user->lang['REPLIES'], 's' => phpbb::$user->lang['SUBJECT'], 'v' => phpbb::$user->lang['VIEWS']);
|
||||
|
||||
$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'tt' => 't.topic_time', 'r' => (($auth->acl_get('m_approve', $forum_id)) ? 't.topic_replies_real' : 't.topic_replies'), 's' => 't.topic_title', 'v' => 't.topic_views');
|
||||
$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'tt' => 't.topic_time', 'r' => ((phpbb::$acl->acl_get('m_approve', $forum_id)) ? 't.topic_replies_real' : 't.topic_replies'), 's' => 't.topic_title', 'v' => 't.topic_views');
|
||||
$limit_time_sql = ($min_time) ? "AND t.topic_last_post_time >= $min_time" : '';
|
||||
break;
|
||||
|
||||
|
@ -771,12 +771,12 @@ function check_ids(&$ids, $table, $sql_id, $acl_list = false, $single_forum = fa
|
|||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if ($acl_list && $row['forum_id'] && !$auth->acl_gets($acl_list, $row['forum_id']))
|
||||
if ($acl_list && $row['forum_id'] && !phpbb::$acl->acl_gets($acl_list, $row['forum_id']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($acl_list && !$row['forum_id'] && !$auth->acl_getf_global($acl_list))
|
||||
if ($acl_list && !$row['forum_id'] && !phpbb::$acl->acl_getf_global($acl_list))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ include(PHPBB_ROOT_PATH . 'includes/functions_display.' . PHP_EXT);
|
|||
|
||||
// Start session management
|
||||
phpbb::$user->session_begin();
|
||||
$auth->acl(phpbb::$user->data);
|
||||
phpbb::$acl->init(phpbb::$user->data);
|
||||
phpbb::$user->setup(array('memberlist', 'groups'));
|
||||
|
||||
// Grab data
|
||||
|
@ -43,7 +43,7 @@ switch ($mode)
|
|||
|
||||
default:
|
||||
// Can this user view profiles/memberlist?
|
||||
if (!$auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
|
||||
if (!phpbb::$acl->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
|
||||
{
|
||||
if (phpbb::$user->data['user_id'] != ANONYMOUS)
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ switch ($mode)
|
|||
$page_title = phpbb::$user->lang['THE_TEAM'];
|
||||
$template_html = 'memberlist_leaders.html';
|
||||
|
||||
$user_ary = $auth->acl_get_list(false, array('a_', 'm_'), false);
|
||||
$user_ary = phpbb::$acl->acl_get_list(false, array('a_', 'm_'), false);
|
||||
|
||||
$admin_id_ary = $global_mod_id_ary = $mod_id_ary = $forum_id_ary = array();
|
||||
foreach ($user_ary as $forum_id => $forum_ary)
|
||||
|
@ -205,7 +205,7 @@ switch ($mode)
|
|||
{
|
||||
if (isset($forums[$forum_id]))
|
||||
{
|
||||
if ($auth->acl_get('f_list', $forum_id))
|
||||
if (phpbb::$acl->acl_get('f_list', $forum_id))
|
||||
{
|
||||
$s_forum_select .= '<option value="">' . $forums[$forum_id] . '</option>';
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ switch ($mode)
|
|||
}
|
||||
|
||||
// The person is moderating several "public" forums, therefore the person should be listed, but not giving the real group name if hidden.
|
||||
if ($row['group_type'] == GROUP_HIDDEN && !$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $row['ug_user_id'] != phpbb::$user->data['user_id'])
|
||||
if ($row['group_type'] == GROUP_HIDDEN && !phpbb::$acl->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $row['ug_user_id'] != phpbb::$user->data['user_id'])
|
||||
{
|
||||
$group_name = phpbb::$user->lang['GROUP_UNDISCLOSED'];
|
||||
$u_group = '';
|
||||
|
@ -251,7 +251,7 @@ switch ($mode)
|
|||
'RANK_IMG_SRC' => $rank_img_src,
|
||||
|
||||
'U_GROUP' => $u_group,
|
||||
'U_PM' => (phpbb::$config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($row['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid('ucp', 'i=pm&mode=compose&u=' . $row['user_id']) : '',
|
||||
'U_PM' => (phpbb::$config['allow_privmsg'] && phpbb::$acl->acl_get('u_sendpm') && ($row['user_allow_pm'] || phpbb::$acl->acl_gets('a_', 'm_') || phpbb::$acl->acl_getf_global('m_'))) ? append_sid('ucp', 'i=pm&mode=compose&u=' . $row['user_id']) : '',
|
||||
|
||||
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
|
@ -271,7 +271,7 @@ switch ($mode)
|
|||
$page_title = phpbb::$user->lang['IM_USER'];
|
||||
$template_html = 'memberlist_im.html';
|
||||
|
||||
if (!$auth->acl_get('u_sendim'))
|
||||
if (!phpbb::$acl->acl_get('u_sendim'))
|
||||
{
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
@ -416,7 +416,7 @@ switch ($mode)
|
|||
|
||||
// a_user admins and founder are able to view inactive users and bots to be able to manage them more easily
|
||||
// Normal users are able to see at least users having only changed their profile settings but not yet reactivated.
|
||||
if (!$auth->acl_get('a_user') && !phpbb::$user->is_founder)
|
||||
if (!phpbb::$acl->acl_get('a_user') && !phpbb::$user->is_founder)
|
||||
{
|
||||
if ($member['user_type'] == phpbb::USER_IGNORE)
|
||||
{
|
||||
|
@ -434,7 +434,7 @@ switch ($mode)
|
|||
$sql = 'SELECT g.group_id, g.group_name, g.group_type
|
||||
FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . " ug
|
||||
WHERE ug.user_id = $user_id
|
||||
AND g.group_id = ug.group_id" . ((!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' AND g.group_type <> ' . GROUP_HIDDEN : '') . '
|
||||
AND g.group_id = ug.group_id" . ((!phpbb::$acl->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' AND g.group_type <> ' . GROUP_HIDDEN : '') . '
|
||||
AND ug.user_pending = 0
|
||||
ORDER BY g.group_type, g.group_name';
|
||||
$result = $db->sql_query($sql);
|
||||
|
@ -528,7 +528,7 @@ switch ($mode)
|
|||
}
|
||||
|
||||
// If the user has m_approve permission or a_user permission, then list then display unapproved posts
|
||||
if ($auth->acl_getf_global('m_approve') || $auth->acl_get('a_user'))
|
||||
if (phpbb::$acl->acl_getf_global('m_approve') || phpbb::$acl->acl_get('a_user'))
|
||||
{
|
||||
$sql = 'SELECT COUNT(post_id) as posts_in_queue
|
||||
FROM ' . POSTS_TABLE . '
|
||||
|
@ -569,10 +569,10 @@ switch ($mode)
|
|||
'S_GROUP_OPTIONS' => $group_options,
|
||||
'S_CUSTOM_FIELDS' => (isset($profile_fields['row']) && sizeof($profile_fields['row'])) ? true : false,
|
||||
|
||||
'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid(phpbb::$base_config['admin_folder'] . '/index', 'i=users&mode=overview&u=' . $user_id, true, phpbb::$user->session_id) : '',
|
||||
'U_USER_BAN' => ($auth->acl_get('m_ban') && $user_id != phpbb::$user->data['user_id']) ? append_sid('mcp', 'i=ban&mode=user&u=' . $user_id, true, phpbb::$user->session_id) : '',
|
||||
'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && phpbb::$user->data['user_id'] != $user_id) ? append_sid('ucp', "mode=switch_perm&u={$user_id}") : '',
|
||||
'U_MCP_QUEUE' => ($auth->acl_getf_global('m_approve')) ? append_sid('mcp', 'i=queue', true, phpbb::$user->session_id) : '',
|
||||
'U_USER_ADMIN' => (phpbb::$acl->acl_get('a_user')) ? append_sid(phpbb::$base_config['admin_folder'] . '/index', 'i=users&mode=overview&u=' . $user_id, true, phpbb::$user->session_id) : '',
|
||||
'U_USER_BAN' => (phpbb::$acl->acl_get('m_ban') && $user_id != phpbb::$user->data['user_id']) ? append_sid('mcp', 'i=ban&mode=user&u=' . $user_id, true, phpbb::$user->session_id) : '',
|
||||
'U_SWITCH_PERMISSIONS' => (phpbb::$acl->acl_get('a_switchperm') && phpbb::$user->data['user_id'] != $user_id) ? append_sid('ucp', "mode=switch_perm&u={$user_id}") : '',
|
||||
'U_MCP_QUEUE' => (phpbb::$acl->acl_getf_global('m_approve')) ? append_sid('mcp', 'i=queue', true, phpbb::$user->session_id) : '',
|
||||
|
||||
'S_ZEBRA' => (phpbb::$user->data['user_id'] != $user_id && phpbb::$user->data['is_registered'] && $zebra_enabled) ? true : false,
|
||||
'U_ADD_FRIEND' => (!$friend) ? append_sid('ucp', 'i=zebra&add=' . urlencode(htmlspecialchars_decode($member['username']))) : '',
|
||||
|
@ -645,7 +645,7 @@ switch ($mode)
|
|||
trigger_error('EMAIL_DISABLED');
|
||||
}
|
||||
|
||||
if (!$auth->acl_get('u_sendemail'))
|
||||
if (!phpbb::$acl->acl_get('u_sendemail'))
|
||||
{
|
||||
trigger_error('NO_EMAIL');
|
||||
}
|
||||
|
@ -683,7 +683,7 @@ switch ($mode)
|
|||
}
|
||||
|
||||
// Can we send email to this user?
|
||||
if (!$row['user_allow_viewemail'] && !$auth->acl_get('a_user'))
|
||||
if (!$row['user_allow_viewemail'] && !phpbb::$acl->acl_get('a_user'))
|
||||
{
|
||||
trigger_error('NO_EMAIL');
|
||||
}
|
||||
|
@ -705,12 +705,12 @@ switch ($mode)
|
|||
|
||||
if ($row['forum_id'])
|
||||
{
|
||||
if (!$auth->acl_get('f_read', $row['forum_id']))
|
||||
if (!phpbb::$acl->acl_get('f_read', $row['forum_id']))
|
||||
{
|
||||
trigger_error('SORRY_AUTH_READ');
|
||||
}
|
||||
|
||||
if (!$auth->acl_get('f_email', $row['forum_id']))
|
||||
if (!phpbb::$acl->acl_get('f_email', $row['forum_id']))
|
||||
{
|
||||
trigger_error('NO_EMAIL');
|
||||
}
|
||||
|
@ -718,12 +718,12 @@ switch ($mode)
|
|||
else
|
||||
{
|
||||
// If global announcement, we need to check if the user is able to at least read and email in one forum...
|
||||
if (!$auth->acl_getf_global('f_read'))
|
||||
if (!phpbb::$acl->acl_getf_global('f_read'))
|
||||
{
|
||||
trigger_error('SORRY_AUTH_READ');
|
||||
}
|
||||
|
||||
if (!$auth->acl_getf_global('f_email'))
|
||||
if (!phpbb::$acl->acl_getf_global('f_email'))
|
||||
{
|
||||
trigger_error('NO_EMAIL');
|
||||
}
|
||||
|
@ -903,7 +903,7 @@ switch ($mode)
|
|||
// Sorting
|
||||
$sort_key_text = array('a' => phpbb::$user->lang['SORT_USERNAME'], 'b' => phpbb::$user->lang['SORT_LOCATION'], 'c' => phpbb::$user->lang['SORT_JOINED'], 'd' => phpbb::$user->lang['SORT_POST_COUNT'], 'e' => phpbb::$user->lang['SORT_EMAIL'], 'f' => phpbb::$user->lang['WEBSITE'], 'g' => phpbb::$user->lang['ICQ'], 'h' => phpbb::$user->lang['AIM'], 'i' => phpbb::$user->lang['MSNM'], 'j' => phpbb::$user->lang['YIM'], 'k' => phpbb::$user->lang['JABBER']);
|
||||
|
||||
if ($auth->acl_get('u_viewonline'))
|
||||
if (phpbb::$acl->acl_get('u_viewonline'))
|
||||
{
|
||||
$sort_key_text['l'] = phpbb::$user->lang['SORT_LAST_ACTIVE'];
|
||||
}
|
||||
|
@ -911,7 +911,7 @@ switch ($mode)
|
|||
|
||||
$sort_key_sql = array('a' => 'u.username_clean', 'b' => 'u.user_from', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'e' => 'u.user_email', 'f' => 'u.user_website', 'g' => 'u.user_icq', 'h' => 'u.user_aim', 'i' => 'u.user_msnm', 'j' => 'u.user_yim', 'k' => 'u.user_jabber');
|
||||
|
||||
if ($auth->acl_get('u_viewonline'))
|
||||
if (phpbb::$acl->acl_get('u_viewonline'))
|
||||
{
|
||||
$sort_key_sql['l'] = 'u.user_lastvisit';
|
||||
}
|
||||
|
@ -948,7 +948,7 @@ switch ($mode)
|
|||
// We validate form and field here, only id/class allowed
|
||||
$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
|
||||
$field = (!preg_match('/^[a-z0-9_-]+$/i', $field)) ? '' : $field;
|
||||
if (($mode == 'searchuser' || sizeof(array_intersect(phpbb_request::variable_names(phpbb_request::GET), $search_params)) > 0) && (phpbb::$config['load_search'] || $auth->acl_get('a_')))
|
||||
if (($mode == 'searchuser' || sizeof(array_intersect(phpbb_request::variable_names(phpbb_request::GET), $search_params)) > 0) && (phpbb::$config['load_search'] || phpbb::$acl->acl_get('a_')))
|
||||
{
|
||||
$username = request_var('username', '', true);
|
||||
$email = strtolower(request_var('email', ''));
|
||||
|
@ -1001,7 +1001,7 @@ switch ($mode)
|
|||
$sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->any_char, $jabber)) . ' ' : '';
|
||||
$sql_where .= (is_numeric($count)) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : '';
|
||||
$sql_where .= (sizeof($joined) > 1) ? " AND u.user_regdate " . $find_key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, intval($joined[1]), intval($joined[2]), intval($joined[0])) : '';
|
||||
$sql_where .= ($auth->acl_get('u_viewonline') && sizeof($active) > 1) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : '';
|
||||
$sql_where .= (phpbb::$acl->acl_get('u_viewonline') && sizeof($active) > 1) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : '';
|
||||
$sql_where .= ($search_group_id) ? " AND u.user_id = ug.user_id AND ug.group_id = $search_group_id AND ug.user_pending = 0 " : '';
|
||||
|
||||
if ($search_group_id)
|
||||
|
@ -1009,7 +1009,7 @@ switch ($mode)
|
|||
$sql_from = ', ' . USER_GROUP_TABLE . ' ug ';
|
||||
}
|
||||
|
||||
if ($ipdomain && $auth->acl_getf_global('m_info'))
|
||||
if ($ipdomain && phpbb::$acl->acl_getf_global('m_info'))
|
||||
{
|
||||
if (strspn($ipdomain, 'abcdefghijklmnopqrstuvwxyz'))
|
||||
{
|
||||
|
@ -1036,7 +1036,7 @@ switch ($mode)
|
|||
}
|
||||
else
|
||||
{
|
||||
$ip_forums = array_keys($auth->acl_getf('m_info', true));
|
||||
$ip_forums = array_keys(phpbb::$acl->acl_getf('m_info', true));
|
||||
|
||||
$sql = 'SELECT DISTINCT poster_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
|
@ -1113,7 +1113,7 @@ switch ($mode)
|
|||
$group_row['l_group_type'] = 'HIDDEN';
|
||||
|
||||
// Check for membership or special permissions
|
||||
if (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $group_row['user_id'] != phpbb::$user->data['user_id'])
|
||||
if (!phpbb::$acl->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $group_row['user_id'] != phpbb::$user->data['user_id'])
|
||||
{
|
||||
trigger_error('NO_GROUP');
|
||||
}
|
||||
|
@ -1159,7 +1159,7 @@ switch ($mode)
|
|||
'RANK_IMG' => $rank_img,
|
||||
'RANK_IMG_SRC' => $rank_img_src,
|
||||
|
||||
'U_PM' => ($auth->acl_get('u_sendpm') && $auth->acl_get('u_masspm_group') && $group_row['group_receive_pm'] && phpbb::$config['allow_privmsg'] && phpbb::$config['allow_mass_pm']) ? append_sid('ucp', 'i=pm&mode=compose&g=' . $group_id) : '',)
|
||||
'U_PM' => (phpbb::$acl->acl_get('u_sendpm') && phpbb::$acl->acl_get('u_masspm_group') && $group_row['group_receive_pm'] && phpbb::$config['allow_privmsg'] && phpbb::$config['allow_mass_pm']) ? append_sid('ucp', 'i=pm&mode=compose&g=' . $group_id) : '',)
|
||||
);
|
||||
|
||||
$sql_select = ', ug.group_leader';
|
||||
|
@ -1265,7 +1265,7 @@ switch ($mode)
|
|||
unset($search_params, $sort_params);
|
||||
|
||||
// Some search user specific data
|
||||
if ($mode == 'searchuser' && (phpbb::$config['load_search'] || $auth->acl_get('a_')))
|
||||
if ($mode == 'searchuser' && (phpbb::$config['load_search'] || phpbb::$acl->acl_get('a_')))
|
||||
{
|
||||
$group_selected = request_var('search_group_id', 0);
|
||||
$s_group_select = '<option value="0"' . ((!$group_selected) ? ' selected="selected"' : '') . '> </option>';
|
||||
|
@ -1275,7 +1275,7 @@ switch ($mode)
|
|||
* @todo add this to a separate function (function is responsible for returning the groups the user is able to see based on the users group membership)
|
||||
*/
|
||||
|
||||
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
|
||||
if (phpbb::$acl->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
|
||||
{
|
||||
$sql = 'SELECT group_id, group_name, group_type
|
||||
FROM ' . GROUPS_TABLE;
|
||||
|
@ -1333,7 +1333,7 @@ switch ($mode)
|
|||
'COUNT' => $count,
|
||||
'IP' => $ipdomain,
|
||||
|
||||
'S_IP_SEARCH_ALLOWED' => ($auth->acl_getf_global('m_info')) ? true : false,
|
||||
'S_IP_SEARCH_ALLOWED' => (phpbb::$acl->acl_getf_global('m_info')) ? true : false,
|
||||
'S_IN_SEARCH_POPUP' => ($form && $field) ? true : false,
|
||||
'S_SEARCH_USER' => true,
|
||||
'S_FORM_NAME' => $form,
|
||||
|
@ -1485,7 +1485,7 @@ switch ($mode)
|
|||
'JABBER_IMG' => phpbb::$user->img('icon_contact_jabber', 'JABBER'),
|
||||
'SEARCH_IMG' => phpbb::$user->img('icon_user_search', 'SEARCH'),
|
||||
|
||||
'U_FIND_MEMBER' => (phpbb::$config['load_search'] || $auth->acl_get('a_')) ? append_sid('memberlist', 'mode=searchuser' . (($start) ? "&start=$start" : '') . (!empty($params) ? '&' . implode('&', $params) : '')) : '',
|
||||
'U_FIND_MEMBER' => (phpbb::$config['load_search'] || phpbb::$acl->acl_get('a_')) ? append_sid('memberlist', 'mode=searchuser' . (($start) ? "&start=$start" : '') . (!empty($params) ? '&' . implode('&', $params) : '')) : '',
|
||||
'U_HIDE_FIND_MEMBER' => ($mode == 'searchuser') ? $u_hide_find_member : '',
|
||||
'U_SORT_USERNAME' => $sort_url . '&sk=a&sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_FROM' => $sort_url . '&sk=b&sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
|
@ -1498,12 +1498,12 @@ switch ($mode)
|
|||
'U_SORT_AIM' => $sort_url . '&sk=h&sd=' . (($sort_key == 'h' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_MSN' => $sort_url . '&sk=i&sd=' . (($sort_key == 'i' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_YIM' => $sort_url . '&sk=j&sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_ACTIVE' => ($auth->acl_get('u_viewonline')) ? $sort_url . '&sk=l&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a') : '',
|
||||
'U_SORT_ACTIVE' => (phpbb::$acl->acl_get('u_viewonline')) ? $sort_url . '&sk=l&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a') : '',
|
||||
'U_SORT_RANK' => $sort_url . '&sk=m&sd=' . (($sort_key == 'm' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_LIST_CHAR' => $sort_url . '&sk=a&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
|
||||
'S_SHOW_GROUP' => ($mode == 'group') ? true : false,
|
||||
'S_VIEWONLINE' => $auth->acl_get('u_viewonline'),
|
||||
'S_VIEWONLINE' => phpbb::$acl->acl_get('u_viewonline'),
|
||||
'S_LEADERS_SET' => $leaders_set,
|
||||
'S_MODE_SELECT' => $s_sort_key,
|
||||
'S_ORDER_SELECT' => $s_sort_dir,
|
||||
|
@ -1533,9 +1533,9 @@ function show_profile($data)
|
|||
$rank_title = $rank_img = $rank_img_src = '';
|
||||
get_user_rank($user_id, $data['user_rank'], $data['user_posts'], $rank_title, $rank_img, $rank_img_src);
|
||||
|
||||
if (!empty($data['user_allow_viewemail']) || $auth->acl_get('a_email'))
|
||||
if (!empty($data['user_allow_viewemail']) || phpbb::$acl->acl_get('a_email'))
|
||||
{
|
||||
$email = (phpbb::$config['board_email_form'] && phpbb::$config['email_enable']) ? append_sid('memberlist', 'mode=email&u=' . $user_id) : ((phpbb::$config['board_hide_emails'] && !$auth->acl_get('a_email')) ? '' : 'mailto:' . $data['user_email']);
|
||||
$email = (phpbb::$config['board_email_form'] && phpbb::$config['email_enable']) ? append_sid('memberlist', 'mode=email&u=' . $user_id) : ((phpbb::$config['board_hide_emails'] && !phpbb::$acl->acl_get('a_email')) ? '' : 'mailto:' . $data['user_email']);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1545,14 +1545,14 @@ function show_profile($data)
|
|||
if (phpbb::$config['load_onlinetrack'])
|
||||
{
|
||||
$update_time = phpbb::$config['load_online_time'] * 60;
|
||||
$online = (time() - $update_time < $data['session_time'] && ((isset($data['session_viewonline']) && $data['session_viewonline']) || $auth->acl_get('u_viewonline'))) ? true : false;
|
||||
$online = (time() - $update_time < $data['session_time'] && ((isset($data['session_viewonline']) && $data['session_viewonline']) || phpbb::$acl->acl_get('u_viewonline'))) ? true : false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$online = false;
|
||||
}
|
||||
|
||||
if ($data['user_allow_viewonline'] || $auth->acl_get('u_viewonline'))
|
||||
if ($data['user_allow_viewonline'] || phpbb::$acl->acl_get('u_viewonline'))
|
||||
{
|
||||
$last_visit = (!empty($data['session_time'])) ? $data['session_time'] : $data['user_lastvisit'];
|
||||
}
|
||||
|
@ -1609,17 +1609,17 @@ function show_profile($data)
|
|||
'ICQ_STATUS_IMG' => (!empty($data['user_icq'])) ? '<img src="http://web.icq.com/whitepages/online?icq=' . $data['user_icq'] . '&img=5" width="18" height="18" />' : '',
|
||||
'S_JABBER_ENABLED' => (phpbb::$config['jab_enable']) ? true : false,
|
||||
|
||||
'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid('search', "author_id=$user_id&sr=posts") : '',
|
||||
'U_NOTES' => $auth->acl_getf_global('m_') ? append_sid('mcp', 'i=notes&mode=user_notes&u=' . $user_id, true, phpbb::$user->session_id) : '',
|
||||
'U_WARN' => $auth->acl_get('m_warn') ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $user_id, true, phpbb::$user->session_id) : '',
|
||||
'U_PM' => (phpbb::$config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($data['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid('ucp', 'i=pm&mode=compose&u=' . $user_id) : '',
|
||||
'U_SEARCH_USER' => (phpbb::$acl->acl_get('u_search')) ? append_sid('search', "author_id=$user_id&sr=posts") : '',
|
||||
'U_NOTES' => phpbb::$acl->acl_getf_global('m_') ? append_sid('mcp', 'i=notes&mode=user_notes&u=' . $user_id, true, phpbb::$user->session_id) : '',
|
||||
'U_WARN' => phpbb::$acl->acl_get('m_warn') ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $user_id, true, phpbb::$user->session_id) : '',
|
||||
'U_PM' => (phpbb::$config['allow_privmsg'] && phpbb::$acl->acl_get('u_sendpm') && ($data['user_allow_pm'] || phpbb::$acl->acl_gets('a_', 'm_') || phpbb::$acl->acl_getf_global('m_'))) ? append_sid('ucp', 'i=pm&mode=compose&u=' . $user_id) : '',
|
||||
'U_EMAIL' => $email,
|
||||
'U_WWW' => (!empty($data['user_website'])) ? $data['user_website'] : '',
|
||||
'U_ICQ' => ($data['user_icq']) ? 'http://www.icq.com/people/webmsg.php?to=' . urlencode($data['user_icq']) : '',
|
||||
'U_AIM' => ($data['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', 'mode=contact&action=aim&u=' . $user_id) : '',
|
||||
'U_AIM' => ($data['user_aim'] && phpbb::$acl->acl_get('u_sendim')) ? append_sid('memberlist', 'mode=contact&action=aim&u=' . $user_id) : '',
|
||||
'U_YIM' => ($data['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($data['user_yim']) . '&.src=pg' : '',
|
||||
'U_MSN' => ($data['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', 'mode=contact&action=msnm&u=' . $user_id) : '',
|
||||
'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', 'mode=contact&action=jabber&u=' . $user_id) : '',
|
||||
'U_MSN' => ($data['user_msnm'] && phpbb::$acl->acl_get('u_sendim')) ? append_sid('memberlist', 'mode=contact&action=msnm&u=' . $user_id) : '',
|
||||
'U_JABBER' => ($data['user_jabber'] && phpbb::$acl->acl_get('u_sendim')) ? append_sid('memberlist', 'mode=contact&action=jabber&u=' . $user_id) : '',
|
||||
'LOCATION' => ($data['user_from']) ? $data['user_from'] : '',
|
||||
|
||||
'USER_ICQ' => $data['user_icq'],
|
||||
|
|
|
@ -785,7 +785,7 @@ class acp_attachments
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!$auth->acl_get('f_list', $row['forum_id']))
|
||||
if (!phpbb::$acl->acl_get('f_list', $row['forum_id']))
|
||||
{
|
||||
// if the user does not have permissions to list this forum skip
|
||||
continue;
|
||||
|
@ -962,11 +962,11 @@ class acp_attachments
|
|||
|
||||
$template->assign_block_vars('upload', array(
|
||||
'FILE_INFO' => sprintf(phpbb::$user->lang['UPLOADING_FILE_TO'], $row['real_filename'], $post_row['post_id']),
|
||||
'S_DENIED' => (!$auth->acl_get('f_attach', $post_row['forum_id'])) ? true : false,
|
||||
'L_DENIED' => (!$auth->acl_get('f_attach', $post_row['forum_id'])) ? sprintf(phpbb::$user->lang['UPLOAD_DENIED_FORUM'], $forum_names[$row['forum_id']]) : '')
|
||||
'S_DENIED' => (!phpbb::$acl->acl_get('f_attach', $post_row['forum_id'])) ? true : false,
|
||||
'L_DENIED' => (!phpbb::$acl->acl_get('f_attach', $post_row['forum_id'])) ? sprintf(phpbb::$user->lang['UPLOAD_DENIED_FORUM'], $forum_names[$row['forum_id']]) : '')
|
||||
);
|
||||
|
||||
if (!$auth->acl_get('f_attach', $post_row['forum_id']))
|
||||
if (!phpbb::$acl->acl_get('f_attach', $post_row['forum_id']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ class acp_forums
|
|||
|
||||
case 'delete':
|
||||
|
||||
if (!$auth->acl_get('a_forumdel'))
|
||||
if (!phpbb::$acl->acl_get('a_forumdel'))
|
||||
{
|
||||
trigger_error(phpbb::$user->lang['NO_PERMISSION_FORUM_DELETE'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ class acp_forums
|
|||
|
||||
case 'add':
|
||||
|
||||
if (!$auth->acl_get('a_forumadd'))
|
||||
if (!phpbb::$acl->acl_get('a_forumadd'))
|
||||
{
|
||||
trigger_error(phpbb::$user->lang['NO_PERMISSION_FORUM_ADD'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ class acp_forums
|
|||
break;
|
||||
}
|
||||
|
||||
$auth->acl_clear_prefetch();
|
||||
phpbb::$acl->acl_clear_prefetch();
|
||||
phpbb::$acm->destroy_sql(FORUMS_TABLE);
|
||||
|
||||
trigger_error(phpbb::$user->lang['FORUM_DELETED'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id));
|
||||
|
@ -181,7 +181,7 @@ class acp_forums
|
|||
|
||||
// Copy permissions?
|
||||
if ($forum_perm_from && !empty($forum_perm_from) && $forum_perm_from != $forum_data['forum_id'] &&
|
||||
(($action != 'edit') || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
|
||||
(($action != 'edit') || empty($forum_id) || (phpbb::$acl->acl_get('a_fauth') && phpbb::$acl->acl_get('a_authusers') && phpbb::$acl->acl_get('a_authgroups') && phpbb::$acl->acl_get('a_mauth'))))
|
||||
{
|
||||
// if we edit a forum delete current permissions first
|
||||
if ($action == 'edit')
|
||||
|
@ -243,7 +243,7 @@ class acp_forums
|
|||
cache_moderators();
|
||||
}
|
||||
|
||||
$auth->acl_clear_prefetch();
|
||||
phpbb::$acl->acl_clear_prefetch();
|
||||
phpbb::$acm->destroy_sql(FORUMS_TABLE);
|
||||
|
||||
$acl_url = '&mode=setting_forum_local&forum_id[]=' . $forum_data['forum_id'];
|
||||
|
@ -251,13 +251,13 @@ class acp_forums
|
|||
$message = ($action == 'add') ? phpbb::$user->lang['FORUM_CREATED'] : phpbb::$user->lang['FORUM_UPDATED'];
|
||||
|
||||
// Redirect to permissions
|
||||
if ($auth->acl_get('a_fauth'))
|
||||
if (phpbb::$acl->acl_get('a_fauth'))
|
||||
{
|
||||
$message .= '<br /><br />' . sprintf(phpbb::$user->lang['REDIRECT_ACL'], '<a href="' . append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'i=permissions' . $acl_url) . '">', '</a>');
|
||||
}
|
||||
|
||||
// redirect directly to permission settings screen if authed
|
||||
if ($action == 'add' && !$forum_perm_from && $auth->acl_get('a_fauth'))
|
||||
if ($action == 'add' && !$forum_perm_from && phpbb::$acl->acl_get('a_fauth'))
|
||||
{
|
||||
meta_refresh(4, append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'i=permissions' . $acl_url));
|
||||
}
|
||||
|
@ -681,7 +681,7 @@ class acp_forums
|
|||
'S_PRUNE_STICKY' => ($forum_data['forum_flags'] & FORUM_FLAG_PRUNE_STICKY) ? true : false,
|
||||
'S_DISPLAY_ACTIVE_TOPICS' => ($forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS) ? true : false,
|
||||
'S_ENABLE_POST_REVIEW' => ($forum_data['forum_flags'] & FORUM_FLAG_POST_REVIEW) ? true : false,
|
||||
'S_CAN_COPY_PERMISSIONS' => ($action != 'edit' || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))) ? true : false,
|
||||
'S_CAN_COPY_PERMISSIONS' => ($action != 'edit' || empty($forum_id) || (phpbb::$acl->acl_get('a_fauth') && phpbb::$acl->acl_get('a_authusers') && phpbb::$acl->acl_get('a_authgroups') && phpbb::$acl->acl_get('a_mauth'))) ? true : false,
|
||||
));
|
||||
|
||||
return;
|
||||
|
|
|
@ -195,7 +195,7 @@ class acp_groups
|
|||
switch ($action)
|
||||
{
|
||||
case 'delete':
|
||||
if (!$auth->acl_get('a_groupdel'))
|
||||
if (!phpbb::$acl->acl_get('a_groupdel'))
|
||||
{
|
||||
trigger_error(phpbb::$user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ class acp_groups
|
|||
trigger_error(phpbb::$user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if ($action == 'add' && !$auth->acl_get('a_groupadd'))
|
||||
if ($action == 'add' && !phpbb::$acl->acl_get('a_groupadd'))
|
||||
{
|
||||
trigger_error(phpbb::$user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
@ -416,7 +416,7 @@ class acp_groups
|
|||
// If the user has the a_authgroups permission and at least one additional permission ability set the permissions are fully transferred.
|
||||
// We do not limit on one auth category because this can lead to incomplete permissions being tricky to fix for the admin, roles being assigned or added non-default permissions.
|
||||
// Since the user only has the option to copy permissions from non leader managed groups this seems to be a good compromise.
|
||||
if ($group_perm_from && $action == 'add' && $auth->acl_get('a_authgroups') && $auth->acl_gets('a_aauth', 'a_fauth', 'a_mauth', 'a_uauth'))
|
||||
if ($group_perm_from && $action == 'add' && phpbb::$acl->acl_get('a_authgroups') && phpbb::$acl->acl_gets('a_aauth', 'a_fauth', 'a_mauth', 'a_uauth'))
|
||||
{
|
||||
$sql = 'SELECT group_founder_manage
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
|
@ -455,7 +455,7 @@ class acp_groups
|
|||
// Now insert the data
|
||||
$db->sql_multi_insert(ACL_GROUPS_TABLE, $groups_sql_ary);
|
||||
|
||||
$auth->acl_clear_prefetch();
|
||||
phpbb::$acl->acl_clear_prefetch();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -543,7 +543,7 @@ class acp_groups
|
|||
$template->assign_vars(array(
|
||||
'S_EDIT' => true,
|
||||
'S_ADD_GROUP' => ($action == 'add') ? true : false,
|
||||
'S_GROUP_PERM' => ($action == 'add' && $auth->acl_get('a_authgroups') && $auth->acl_gets('a_aauth', 'a_fauth', 'a_mauth', 'a_uauth')) ? true : false,
|
||||
'S_GROUP_PERM' => ($action == 'add' && phpbb::$acl->acl_get('a_authgroups') && phpbb::$acl->acl_gets('a_aauth', 'a_fauth', 'a_mauth', 'a_uauth')) ? true : false,
|
||||
'S_INCLUDE_SWATCH' => true,
|
||||
'S_CAN_UPLOAD' => $can_upload,
|
||||
'S_ERROR' => (sizeof($error)) ? true : false,
|
||||
|
@ -701,7 +701,7 @@ class acp_groups
|
|||
|
||||
$template->assign_vars(array(
|
||||
'U_ACTION' => $this->u_action,
|
||||
'S_GROUP_ADD' => ($auth->acl_get('a_groupadd')) ? true : false)
|
||||
'S_GROUP_ADD' => (phpbb::$acl->acl_get('a_groupadd')) ? true : false)
|
||||
);
|
||||
|
||||
// Get us all the groups
|
||||
|
@ -757,7 +757,7 @@ class acp_groups
|
|||
$template->assign_block_vars('groups', array(
|
||||
'U_LIST' => "{$this->u_action}&action=list&g=$group_id",
|
||||
'U_EDIT' => "{$this->u_action}&action=edit&g=$group_id",
|
||||
'U_DELETE' => ($auth->acl_get('a_groupdel')) ? "{$this->u_action}&action=delete&g=$group_id" : '',
|
||||
'U_DELETE' => (phpbb::$acl->acl_get('a_groupdel')) ? "{$this->u_action}&action=delete&g=$group_id" : '',
|
||||
|
||||
'S_GROUP_SPECIAL' => ($row['group_type'] == GROUP_SPECIAL) ? true : false,
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ class acp_inactive
|
|||
{
|
||||
if (confirm_box(true))
|
||||
{
|
||||
if (!$auth->acl_get('a_userdel'))
|
||||
if (!phpbb::$acl->acl_get('a_userdel'))
|
||||
{
|
||||
trigger_error(phpbb::$user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ class acp_logs
|
|||
$this->log_type = constant('LOG_' . strtoupper($mode));
|
||||
|
||||
// Delete entries if requested and able
|
||||
if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
|
||||
if (($deletemark || $deleteall) && phpbb::$acl->acl_get('a_clearlogs'))
|
||||
{
|
||||
if (confirm_box(true))
|
||||
{
|
||||
|
@ -133,7 +133,7 @@ class acp_logs
|
|||
'S_LIMIT_DAYS' => $s_limit_days,
|
||||
'S_SORT_KEY' => $s_sort_key,
|
||||
'S_SORT_DIR' => $s_sort_dir,
|
||||
'S_CLEARLOGS' => $auth->acl_get('a_clearlogs'),
|
||||
'S_CLEARLOGS' => phpbb::$acl->acl_get('a_clearlogs'),
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ class acp_permissions
|
|||
|
||||
$this->tpl_name = 'permission_trace';
|
||||
|
||||
if ($user_id && isset($auth_admin->acl_options['id'][$permission]) && $auth->acl_get('a_viewauth'))
|
||||
if ($user_id && isset($auth_admin->acl_options['id'][$permission]) && phpbb::$acl->acl_get('a_viewauth'))
|
||||
{
|
||||
$this->page_title = sprintf(phpbb::$user->lang['TRACE_PERMISSION'], phpbb::$user->lang['acl_' . $permission]['lang']);
|
||||
$this->permission_trace($user_id, $forum_id, $permission);
|
||||
|
@ -429,8 +429,8 @@ class acp_permissions
|
|||
|
||||
'S_SELECT_VICTIM' => true,
|
||||
'S_ALLOW_ALL_SELECT' => (sizeof($forum_id) > 5) ? false : true,
|
||||
'S_CAN_SELECT_USER' => ($auth->acl_get('a_authusers')) ? true : false,
|
||||
'S_CAN_SELECT_GROUP' => ($auth->acl_get('a_authgroups')) ? true : false,
|
||||
'S_CAN_SELECT_USER' => (phpbb::$acl->acl_get('a_authusers')) ? true : false,
|
||||
'S_CAN_SELECT_GROUP' => (phpbb::$acl->acl_get('a_authgroups')) ? true : false,
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields)
|
||||
);
|
||||
|
||||
|
@ -543,7 +543,7 @@ class acp_permissions
|
|||
$s_dropdown_options = '';
|
||||
foreach ($options as $setting)
|
||||
{
|
||||
if (!$auth->acl_get('a_' . str_replace('_', '', $setting) . 'auth'))
|
||||
if (!phpbb::$acl->acl_get('a_' . str_replace('_', '', $setting) . 'auth'))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -611,7 +611,7 @@ class acp_permissions
|
|||
$ug_type = (sizeof($user_id)) ? 'user' : 'group';
|
||||
|
||||
// Check the permission setting again
|
||||
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
|
||||
if (!phpbb::$acl->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !phpbb::$acl->acl_get('a_auth' . $ug_type . 's'))
|
||||
{
|
||||
trigger_error(phpbb::$user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
@ -692,7 +692,7 @@ class acp_permissions
|
|||
$ug_type = (sizeof($user_id)) ? 'user' : 'group';
|
||||
|
||||
// Check the permission setting again
|
||||
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
|
||||
if (!phpbb::$acl->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !phpbb::$acl->acl_get('a_auth' . $ug_type . 's'))
|
||||
{
|
||||
trigger_error(phpbb::$user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
@ -791,7 +791,7 @@ class acp_permissions
|
|||
$ug_type = (sizeof($user_id)) ? 'user' : 'group';
|
||||
|
||||
// Check the permission setting again
|
||||
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
|
||||
if (!phpbb::$acl->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !phpbb::$acl->acl_get('a_auth' . $ug_type . 's'))
|
||||
{
|
||||
trigger_error(phpbb::$user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
@ -941,7 +941,7 @@ class acp_permissions
|
|||
if (sizeof($groups))
|
||||
{
|
||||
// Get group auth settings
|
||||
$hold_ary = $auth->acl_group_raw_data(array_keys($groups), $permission, $forum_id);
|
||||
$hold_ary = phpbb::$acl->acl_group_raw_data(array_keys($groups), $permission, $forum_id);
|
||||
|
||||
foreach ($hold_ary as $group_id => $forum_ary)
|
||||
{
|
||||
|
@ -983,7 +983,7 @@ class acp_permissions
|
|||
}
|
||||
|
||||
// Get user specific permission... globally or for this forum
|
||||
$hold_ary = $auth->acl_user_raw_data($user_id, $permission, $forum_id);
|
||||
$hold_ary = phpbb::$acl->acl_user_raw_data($user_id, $permission, $forum_id);
|
||||
$auth_setting = (!sizeof($hold_ary)) ? phpbb::ACL_NO : $hold_ary[$user_id][$forum_id][$permission];
|
||||
|
||||
switch ($auth_setting)
|
||||
|
@ -1016,7 +1016,7 @@ class acp_permissions
|
|||
'S_TOTAL_NEVER' => ($total == phpbb::ACL_NEVER) ? true : false)
|
||||
);
|
||||
|
||||
if ($forum_id != 0 && isset($auth->acl_options['global'][$permission]))
|
||||
if ($forum_id != 0 && isset(phpbb::$acl->acl_options['global'][$permission]))
|
||||
{
|
||||
if ($user_id != phpbb::$user->data['user_id'])
|
||||
{
|
||||
|
@ -1026,7 +1026,7 @@ class acp_permissions
|
|||
}
|
||||
else
|
||||
{
|
||||
$auth_setting = $auth->acl_get($permission);
|
||||
$auth_setting = phpbb::$acl->acl_get($permission);
|
||||
}
|
||||
|
||||
if ($auth_setting)
|
||||
|
|
|
@ -108,7 +108,7 @@ class acp_prune
|
|||
|
||||
do
|
||||
{
|
||||
if (!$auth->acl_get('f_list', $row['forum_id']))
|
||||
if (!phpbb::$acl->acl_get('f_list', $row['forum_id']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ class acp_prune
|
|||
$template->assign_block_vars('users', array(
|
||||
'USERNAME' => $usernames[$user_id],
|
||||
'U_PROFILE' => append_sid('memberlist', 'mode=viewprofile&u=' . $user_id),
|
||||
'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'i=users&mode=overview&u=' . $user_id, true, phpbb::$user->session_id) : '',
|
||||
'U_USER_ADMIN' => (phpbb::$acl->acl_get('a_user')) ? append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'i=users&mode=overview&u=' . $user_id, true, phpbb::$user->session_id) : '',
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -174,7 +174,7 @@ class acp_users
|
|||
// You can't delete the founder
|
||||
if ($delete && $user_row['user_type'] != phpbb::USER_FOUNDER)
|
||||
{
|
||||
if (!$auth->acl_get('a_userdel'))
|
||||
if (!phpbb::$acl->acl_get('a_userdel'))
|
||||
{
|
||||
trigger_error(phpbb::$user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
|
||||
}
|
||||
|
@ -806,7 +806,7 @@ class acp_users
|
|||
}
|
||||
|
||||
// Let the users permissions being updated
|
||||
$auth->acl_clear_prefetch($user_id);
|
||||
phpbb::$acl->acl_clear_prefetch($user_id);
|
||||
|
||||
add_log('admin', 'LOG_USER_USER_UPDATE', $data['username']);
|
||||
|
||||
|
@ -914,9 +914,9 @@ class acp_users
|
|||
|
||||
'U_SHOW_IP' => $this->u_action . "&u=$user_id&ip=" . (($ip == 'ip') ? 'hostname' : 'ip'),
|
||||
'U_WHOIS' => $this->u_action . "&action=whois&user_ip={$user_row['user_ip']}",
|
||||
'U_MCP_QUEUE' => ($auth->acl_getf_global('m_approve')) ? append_sid('mcp', 'i=queue', true, phpbb::$user->session_id) : '',
|
||||
'U_MCP_QUEUE' => (phpbb::$acl->acl_getf_global('m_approve')) ? append_sid('mcp', 'i=queue', true, phpbb::$user->session_id) : '',
|
||||
|
||||
'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && phpbb::$user->data['user_id'] != $user_row['user_id']) ? append_sid('ucp', "mode=switch_perm&u={$user_row['user_id']}") : '',
|
||||
'U_SWITCH_PERMISSIONS' => (phpbb::$acl->acl_get('a_switchperm') && phpbb::$user->data['user_id'] != $user_row['user_id']) ? append_sid('ucp', "mode=switch_perm&u={$user_row['user_id']}") : '',
|
||||
|
||||
'POSTS_IN_QUEUE' => $user_row['posts_in_queue'],
|
||||
'USER' => $user_row['username'],
|
||||
|
@ -948,7 +948,7 @@ class acp_users
|
|||
$sort_dir = request_var('sd', 'd');
|
||||
|
||||
// Delete entries if requested and able
|
||||
if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
|
||||
if (($deletemark || $deleteall) && phpbb::$acl->acl_get('a_clearlogs'))
|
||||
{
|
||||
if (!check_form_key($form_name))
|
||||
{
|
||||
|
@ -1017,7 +1017,7 @@ class acp_users
|
|||
'S_LIMIT_DAYS' => $s_limit_days,
|
||||
'S_SORT_KEY' => $s_sort_key,
|
||||
'S_SORT_DIR' => $s_sort_dir,
|
||||
'S_CLEARLOGS' => $auth->acl_get('a_clearlogs'))
|
||||
'S_CLEARLOGS' => phpbb::$acl->acl_get('a_clearlogs'))
|
||||
);
|
||||
|
||||
foreach ($log_data as $row)
|
||||
|
|
|
@ -148,7 +148,7 @@ class mcp_ban
|
|||
'U_FIND_USERNAME' => append_sid('memberlist', 'mode=searchuser&form=mcp_ban&field=ban'),
|
||||
));
|
||||
|
||||
if ($mode === 'email' && !$auth->acl_get('a_user'))
|
||||
if ($mode === 'email' && !phpbb::$acl->acl_get('a_user'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -110,21 +110,21 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
'LAST_POST_IMG' => phpbb::$user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
|
||||
'NEWEST_POST_IMG' => phpbb::$user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
|
||||
|
||||
'S_CAN_REPORT' => $auth->acl_get('m_report', $forum_id),
|
||||
'S_CAN_DELETE' => $auth->acl_get('m_delete', $forum_id),
|
||||
'S_CAN_MERGE' => $auth->acl_get('m_merge', $forum_id),
|
||||
'S_CAN_MOVE' => $auth->acl_get('m_move', $forum_id),
|
||||
'S_CAN_FORK' => $auth->acl_get('m_', $forum_id),
|
||||
'S_CAN_LOCK' => $auth->acl_get('m_lock', $forum_id),
|
||||
'S_CAN_SYNC' => $auth->acl_get('m_', $forum_id),
|
||||
'S_CAN_APPROVE' => $auth->acl_get('m_approve', $forum_id),
|
||||
'S_CAN_REPORT' => phpbb::$acl->acl_get('m_report', $forum_id),
|
||||
'S_CAN_DELETE' => phpbb::$acl->acl_get('m_delete', $forum_id),
|
||||
'S_CAN_MERGE' => phpbb::$acl->acl_get('m_merge', $forum_id),
|
||||
'S_CAN_MOVE' => phpbb::$acl->acl_get('m_move', $forum_id),
|
||||
'S_CAN_FORK' => phpbb::$acl->acl_get('m_', $forum_id),
|
||||
'S_CAN_LOCK' => phpbb::$acl->acl_get('m_lock', $forum_id),
|
||||
'S_CAN_SYNC' => phpbb::$acl->acl_get('m_', $forum_id),
|
||||
'S_CAN_APPROVE' => phpbb::$acl->acl_get('m_approve', $forum_id),
|
||||
'S_MERGE_SELECT' => ($merge_select) ? true : false,
|
||||
'S_CAN_MAKE_NORMAL' => $auth->acl_gets('f_sticky', 'f_announce', $forum_id),
|
||||
'S_CAN_MAKE_STICKY' => $auth->acl_get('f_sticky', $forum_id),
|
||||
'S_CAN_MAKE_ANNOUNCE' => $auth->acl_get('f_announce', $forum_id),
|
||||
'S_CAN_MAKE_NORMAL' => phpbb::$acl->acl_gets('f_sticky', 'f_announce', $forum_id),
|
||||
'S_CAN_MAKE_STICKY' => phpbb::$acl->acl_get('f_sticky', $forum_id),
|
||||
'S_CAN_MAKE_ANNOUNCE' => phpbb::$acl->acl_get('f_announce', $forum_id),
|
||||
|
||||
'U_VIEW_FORUM' => append_sid('viewforum', 'f=' . $forum_id),
|
||||
'U_VIEW_FORUM_LOGS' => ($auth->acl_gets('a_', 'm_', $forum_id) && $module->loaded('logs')) ? append_sid('mcp', 'i=logs&mode=forum_logs&f=' . $forum_id) : '',
|
||||
'U_VIEW_FORUM_LOGS' => (phpbb::$acl->acl_gets('a_', 'm_', $forum_id) && $module->loaded('logs')) ? append_sid('mcp', 'i=logs&mode=forum_logs&f=' . $forum_id) : '',
|
||||
|
||||
'S_MCP_ACTION' => $url . "&i=$id&forum_action=$action&mode=$mode&start=$start" . (($merge_select) ? $selected_ids : ''),
|
||||
|
||||
|
@ -151,7 +151,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
$sql = "SELECT t.topic_id
|
||||
FROM " . TOPICS_TABLE . " t
|
||||
WHERE t.forum_id IN($forum_id, 0)
|
||||
" . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1') . "
|
||||
" . ((phpbb::$acl->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1') . "
|
||||
$limit_time_sql
|
||||
ORDER BY t.topic_type DESC, $sort_order_sql";
|
||||
$result = $db->sql_query_limit($sql, $topics_per_page, $start);
|
||||
|
@ -200,7 +200,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
|
||||
$row = &$topic_rows[$topic_id];
|
||||
|
||||
$replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
|
||||
$replies = (phpbb::$acl->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
|
||||
|
||||
if ($row['topic_status'] == ITEM_MOVED)
|
||||
{
|
||||
|
@ -217,12 +217,12 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
|
||||
$topic_title = censor_text($row['topic_title']);
|
||||
|
||||
$topic_unapproved = (!$row['topic_approved'] && $auth->acl_get('m_approve', $row['forum_id'])) ? true : false;
|
||||
$posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $row['forum_id'])) ? true : false;
|
||||
$topic_unapproved = (!$row['topic_approved'] && phpbb::$acl->acl_get('m_approve', $row['forum_id'])) ? true : false;
|
||||
$posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && phpbb::$acl->acl_get('m_approve', $row['forum_id'])) ? true : false;
|
||||
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? $url . '&i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . '&t=' . $row['topic_id'] : '';
|
||||
|
||||
$topic_row = array(
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['topic_attachment']) ? phpbb::$user->img('icon_topic_attach', 'TOTAL_ATTACHMENTS') : '',
|
||||
'ATTACH_ICON_IMG' => (phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $row['forum_id']) && $row['topic_attachment']) ? phpbb::$user->img('icon_topic_attach', 'TOTAL_ATTACHMENTS') : '',
|
||||
'TOPIC_FOLDER_IMG' => phpbb::$user->img($folder_img, $folder_alt),
|
||||
'TOPIC_FOLDER_IMG_SRC' => phpbb::$user->img($folder_img, $folder_alt, 'src'),
|
||||
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
|
||||
|
@ -242,13 +242,13 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
|
||||
'TOPIC_TYPE' => $topic_type,
|
||||
'TOPIC_TITLE' => $topic_title,
|
||||
'REPLIES' => ($auth->acl_get('m_approve', $row['forum_id'])) ? $row['topic_replies_real'] : $row['topic_replies'],
|
||||
'REPLIES' => (phpbb::$acl->acl_get('m_approve', $row['forum_id'])) ? $row['topic_replies_real'] : $row['topic_replies'],
|
||||
'LAST_POST_TIME' => phpbb::$user->format_date($row['topic_last_post_time']),
|
||||
'FIRST_POST_TIME' => phpbb::$user->format_date($row['topic_time']),
|
||||
'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
|
||||
'LAST_VIEW_TIME' => phpbb::$user->format_date($row['topic_last_view_time']),
|
||||
|
||||
'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && empty($row['topic_moved_id']) && $auth->acl_get('m_report', $row['forum_id'])) ? true : false,
|
||||
'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && empty($row['topic_moved_id']) && phpbb::$acl->acl_get('m_report', $row['forum_id'])) ? true : false,
|
||||
'S_TOPIC_UNAPPROVED' => $topic_unapproved,
|
||||
'S_POSTS_UNAPPROVED' => $posts_unapproved,
|
||||
'S_UNREAD_TOPIC' => $unread_topic,
|
||||
|
@ -258,7 +258,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
{
|
||||
$topic_row = array_merge($topic_row, array(
|
||||
'U_VIEW_TOPIC' => append_sid('viewtopic', "t={$row['topic_moved_id']}"),
|
||||
'U_DELETE_TOPIC' => ($auth->acl_get('m_delete', $forum_id)) ? append_sid('mcp', "i=$id&f=$forum_id&topic_id_list[]={$row['topic_id']}&mode=forum_view&action=delete_topic") : '',
|
||||
'U_DELETE_TOPIC' => (phpbb::$acl->acl_get('m_delete', $forum_id)) ? append_sid('mcp', "i=$id&f=$forum_id&topic_id_list[]={$row['topic_id']}&mode=forum_view&action=delete_topic") : '',
|
||||
'S_MOVED_TOPIC' => true,
|
||||
'TOPIC_ID' => $row['topic_moved_id'],
|
||||
));
|
||||
|
@ -279,7 +279,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
'S_SELECT_TOPIC' => ($merge_select && !in_array($row['topic_id'], $source_topic_ids)) ? true : false,
|
||||
'U_SELECT_TOPIC' => $u_select_topic,
|
||||
'U_MCP_QUEUE' => $u_mcp_queue,
|
||||
'U_MCP_REPORT' => ($auth->acl_get('m_report', $forum_id)) ? append_sid('mcp', 'i=main&mode=topic_view&t=' . $row['topic_id'] . '&action=reports') : '',
|
||||
'U_MCP_REPORT' => (phpbb::$acl->acl_get('m_report', $forum_id)) ? append_sid('mcp', 'i=main&mode=topic_view&t=' . $row['topic_id'] . '&action=reports') : '',
|
||||
'TOPIC_ID' => $row['topic_id'],
|
||||
'S_TOPIC_CHECKED' => ($topic_id_list && in_array($row['topic_id'], $topic_id_list)) ? true : false,
|
||||
));
|
||||
|
|
|
@ -101,7 +101,7 @@ class mcp_logs
|
|||
}
|
||||
|
||||
// Delete entries if requested and able
|
||||
if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
|
||||
if (($deletemark || $deleteall) && phpbb::$acl->acl_get('a_clearlogs'))
|
||||
{
|
||||
if (confirm_box(true))
|
||||
{
|
||||
|
@ -174,7 +174,7 @@ class mcp_logs
|
|||
'L_TITLE' => phpbb::$user->lang['MCP_LOGS'],
|
||||
|
||||
'U_POST_ACTION' => $this->u_action,
|
||||
'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,
|
||||
'S_CLEAR_ALLOWED' => (phpbb::$acl->acl_get('a_clearlogs')) ? true : false,
|
||||
'S_SELECT_SORT_DIR' => $s_sort_dir,
|
||||
'S_SELECT_SORT_KEY' => $s_sort_key,
|
||||
'S_SELECT_SORT_DAYS' => $s_limit_days,
|
||||
|
|
|
@ -558,7 +558,7 @@ function mcp_move_topic($topic_ids)
|
|||
{
|
||||
$additional_msg = phpbb::$user->lang['FORUM_NOT_POSTABLE'];
|
||||
}
|
||||
else if (!$auth->acl_get('f_post', $to_forum_id))
|
||||
else if (!phpbb::$acl->acl_get('f_post', $to_forum_id))
|
||||
{
|
||||
$additional_msg = phpbb::$user->lang['USER_CANNOT_POST'];
|
||||
}
|
||||
|
@ -956,7 +956,7 @@ function mcp_fork_topic($topic_ids)
|
|||
{
|
||||
$additional_msg = phpbb::$user->lang['FORUM_NOT_POSTABLE'];
|
||||
}
|
||||
else if (!$auth->acl_get('f_post', $to_forum_id))
|
||||
else if (!phpbb::$acl->acl_get('f_post', $to_forum_id))
|
||||
{
|
||||
$additional_msg = phpbb::$user->lang['USER_CANNOT_POST'];
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ class mcp_notes
|
|||
$usernote = utf8_normalize_nfc(request_var('usernote', '', true));
|
||||
|
||||
// Handle any actions
|
||||
if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
|
||||
if (($deletemark || $deleteall) && phpbb::$acl->acl_get('a_clearlogs'))
|
||||
{
|
||||
$where_sql = '';
|
||||
if ($deletemark && $marked)
|
||||
|
@ -209,7 +209,7 @@ class mcp_notes
|
|||
|
||||
$template->assign_vars(array(
|
||||
'U_POST_ACTION' => $this->u_action,
|
||||
'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,
|
||||
'S_CLEAR_ALLOWED' => (phpbb::$acl->acl_get('a_clearlogs')) ? true : false,
|
||||
'S_SELECT_SORT_DIR' => $s_sort_dir,
|
||||
'S_SELECT_SORT_KEY' => $s_sort_key,
|
||||
'S_SELECT_SORT_DAYS' => $s_limit_days,
|
||||
|
|
|
@ -44,7 +44,7 @@ function mcp_post_details($id, $mode, $action)
|
|||
{
|
||||
case 'whois':
|
||||
|
||||
if ($auth->acl_get('m_info', $post_info['forum_id']))
|
||||
if (phpbb::$acl->acl_get('m_info', $post_info['forum_id']))
|
||||
{
|
||||
$ip = request_var('ip', '');
|
||||
include(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT);
|
||||
|
@ -88,7 +88,7 @@ function mcp_post_details($id, $mode, $action)
|
|||
trigger_error('NO_USER');
|
||||
}
|
||||
|
||||
if ($auth->acl_get('m_chgposter', $post_info['forum_id']))
|
||||
if (phpbb::$acl->acl_get('m_chgposter', $post_info['forum_id']))
|
||||
{
|
||||
if (check_form_key('mcp_post_details'))
|
||||
{
|
||||
|
@ -136,7 +136,7 @@ function mcp_post_details($id, $mode, $action)
|
|||
$message = bbcode_nl2br($message);
|
||||
$message = smiley_text($message);
|
||||
|
||||
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
||||
if ($post_info['post_attachment'] && phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $post_info['forum_id']))
|
||||
{
|
||||
$extensions = phpbb_cache::obtain_extensions_forum($post_info['forum_id']);
|
||||
|
||||
|
@ -178,23 +178,23 @@ function mcp_post_details($id, $mode, $action)
|
|||
'U_POST_ACTION' => "$url&i=$id&mode=post_details", // Use this for action parameters
|
||||
'U_APPROVE_ACTION' => append_sid('mcp', "i=queue&p=$post_id&f={$post_info['forum_id']}"),
|
||||
|
||||
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
|
||||
'S_CAN_CHGPOSTER' => $auth->acl_get('m_chgposter', $post_info['forum_id']),
|
||||
'S_CAN_LOCK_POST' => $auth->acl_get('m_lock', $post_info['forum_id']),
|
||||
'S_CAN_DELETE_POST' => $auth->acl_get('m_delete', $post_info['forum_id']),
|
||||
'S_CAN_VIEWIP' => phpbb::$acl->acl_get('m_info', $post_info['forum_id']),
|
||||
'S_CAN_CHGPOSTER' => phpbb::$acl->acl_get('m_chgposter', $post_info['forum_id']),
|
||||
'S_CAN_LOCK_POST' => phpbb::$acl->acl_get('m_lock', $post_info['forum_id']),
|
||||
'S_CAN_DELETE_POST' => phpbb::$acl->acl_get('m_delete', $post_info['forum_id']),
|
||||
|
||||
'S_POST_REPORTED' => ($post_info['post_reported']) ? true : false,
|
||||
'S_POST_UNAPPROVED' => (!$post_info['post_approved']) ? true : false,
|
||||
'S_POST_LOCKED' => ($post_info['post_edit_locked']) ? true : false,
|
||||
'S_USER_NOTES' => true,
|
||||
'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,
|
||||
'S_CLEAR_ALLOWED' => (phpbb::$acl->acl_get('a_clearlogs')) ? true : false,
|
||||
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid('posting', "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
||||
'U_EDIT' => (phpbb::$acl->acl_get('m_edit', $post_info['forum_id'])) ? append_sid('posting', "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
||||
'U_FIND_USERNAME' => append_sid('memberlist', 'mode=searchuser&form=mcp_chgposter&field=username&select_single=true'),
|
||||
'U_MCP_APPROVE' => append_sid('mcp', 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_MCP_REPORT' => append_sid('mcp', 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_MCP_USER_NOTES' => append_sid('mcp', 'i=notes&mode=user_notes&u=' . $post_info['user_id']),
|
||||
'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '',
|
||||
'U_MCP_WARN_USER' => (phpbb::$acl->acl_get('m_warn')) ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '',
|
||||
'U_VIEW_POST' => append_sid('viewtopic', 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
|
||||
'U_VIEW_TOPIC' => append_sid('viewtopic', 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']),
|
||||
|
||||
|
@ -216,11 +216,11 @@ function mcp_post_details($id, $mode, $action)
|
|||
'POST_SUBJECT' => $post_info['post_subject'],
|
||||
'POST_DATE' => phpbb::$user->format_date($post_info['post_time']),
|
||||
'POST_IP' => $post_info['poster_ip'],
|
||||
'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
|
||||
'POST_IPADDR' => (phpbb::$acl->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
|
||||
'POST_ID' => $post_info['post_id'],
|
||||
|
||||
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? "$url&i=$id&mode=$mode&lookup={$post_info['poster_ip']}#ip" : '',
|
||||
'U_WHOIS' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid('mcp', "i=$id&mode=$mode&action=whois&p=$post_id&ip={$post_info['poster_ip']}") : '',
|
||||
'U_LOOKUP_IP' => (phpbb::$acl->acl_get('m_info', $post_info['forum_id'])) ? "$url&i=$id&mode=$mode&lookup={$post_info['poster_ip']}#ip" : '',
|
||||
'U_WHOIS' => (phpbb::$acl->acl_get('m_info', $post_info['forum_id'])) ? append_sid('mcp', "i=$id&mode=$mode&action=whois&p=$post_id&ip={$post_info['poster_ip']}") : '',
|
||||
));
|
||||
|
||||
// Get User Notes
|
||||
|
@ -244,7 +244,7 @@ function mcp_post_details($id, $mode, $action)
|
|||
}
|
||||
|
||||
// Get Reports
|
||||
if ($auth->acl_get('m_', $post_info['forum_id']))
|
||||
if (phpbb::$acl->acl_get('m_', $post_info['forum_id']))
|
||||
{
|
||||
$sql = 'SELECT r.*, re.*, u.user_id, u.username
|
||||
FROM ' . REPORTS_TABLE . ' r, ' . USERS_TABLE . ' u, ' . REPORTS_REASONS_TABLE . " re
|
||||
|
@ -284,7 +284,7 @@ function mcp_post_details($id, $mode, $action)
|
|||
}
|
||||
|
||||
// Get IP
|
||||
if ($auth->acl_get('m_info', $post_info['forum_id']))
|
||||
if (phpbb::$acl->acl_get('m_info', $post_info['forum_id']))
|
||||
{
|
||||
$rdns_ip_num = request_var('rdns', '');
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ class mcp_queue
|
|||
$message = bbcode_nl2br($message);
|
||||
$message = smiley_text($message);
|
||||
|
||||
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
||||
if ($post_info['post_attachment'] && phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $post_info['forum_id']))
|
||||
{
|
||||
$extensions = phpbb_cache::obtain_extensions_forum($post_info['forum_id']);
|
||||
|
||||
|
@ -180,17 +180,17 @@ class mcp_queue
|
|||
$template->assign_vars(array(
|
||||
'S_MCP_QUEUE' => true,
|
||||
'U_APPROVE_ACTION' => append_sid('mcp', "i=queue&p=$post_id&f=$forum_id"),
|
||||
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
|
||||
'S_CAN_VIEWIP' => phpbb::$acl->acl_get('m_info', $post_info['forum_id']),
|
||||
'S_POST_REPORTED' => $post_info['post_reported'],
|
||||
'S_POST_UNAPPROVED' => !$post_info['post_approved'],
|
||||
'S_POST_LOCKED' => $post_info['post_edit_locked'],
|
||||
'S_USER_NOTES' => true,
|
||||
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid('posting', "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
||||
'U_EDIT' => (phpbb::$acl->acl_get('m_edit', $post_info['forum_id'])) ? append_sid('posting', "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
||||
'U_MCP_APPROVE' => append_sid('mcp', 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_MCP_REPORT' => append_sid('mcp', 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_MCP_USER_NOTES' => append_sid('mcp', 'i=notes&mode=user_notes&u=' . $post_info['user_id']),
|
||||
'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '',
|
||||
'U_MCP_WARN_USER' => (phpbb::$acl->acl_get('m_warn')) ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '',
|
||||
'U_VIEW_POST' => $post_url,
|
||||
'U_VIEW_TOPIC' => $topic_url,
|
||||
|
||||
|
@ -212,10 +212,10 @@ class mcp_queue
|
|||
'POST_SUBJECT' => $post_info['post_subject'],
|
||||
'POST_DATE' => phpbb::$user->format_date($post_info['post_time']),
|
||||
'POST_IP' => $post_info['poster_ip'],
|
||||
'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
|
||||
'POST_IPADDR' => (phpbb::$acl->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
|
||||
'POST_ID' => $post_info['post_id'],
|
||||
|
||||
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid('mcp', 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id . '&lookup=' . $post_info['poster_ip']) . '#ip' : '',
|
||||
'U_LOOKUP_IP' => (phpbb::$acl->acl_get('m_info', $post_info['forum_id'])) ? append_sid('mcp', 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id . '&lookup=' . $post_info['poster_ip']) . '#ip' : '',
|
||||
));
|
||||
|
||||
break;
|
||||
|
|
|
@ -146,7 +146,7 @@ class mcp_reports
|
|||
$message = bbcode_nl2br($message);
|
||||
$message = smiley_text($message);
|
||||
|
||||
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
||||
if ($post_info['post_attachment'] && phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $post_info['forum_id']))
|
||||
{
|
||||
$extensions = phpbb_cache::obtain_extensions_forum($post_info['forum_id']);
|
||||
|
||||
|
@ -186,19 +186,19 @@ class mcp_reports
|
|||
$template->assign_vars(array(
|
||||
'S_MCP_REPORT' => true,
|
||||
'S_CLOSE_ACTION' => append_sid('mcp', 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
|
||||
'S_CAN_VIEWIP' => phpbb::$acl->acl_get('m_info', $post_info['forum_id']),
|
||||
'S_POST_REPORTED' => $post_info['post_reported'],
|
||||
'S_POST_UNAPPROVED' => !$post_info['post_approved'],
|
||||
'S_POST_LOCKED' => $post_info['post_edit_locked'],
|
||||
'S_USER_NOTES' => true,
|
||||
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid('posting', "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
||||
'U_EDIT' => (phpbb::$acl->acl_get('m_edit', $post_info['forum_id'])) ? append_sid('posting', "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
||||
'U_MCP_APPROVE' => append_sid('mcp', 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_MCP_REPORT' => append_sid('mcp', 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_MCP_REPORTER_NOTES' => append_sid('mcp', 'i=notes&mode=user_notes&u=' . $report['user_id']),
|
||||
'U_MCP_USER_NOTES' => append_sid('mcp', 'i=notes&mode=user_notes&u=' . $post_info['user_id']),
|
||||
'U_MCP_WARN_REPORTER' => ($auth->acl_get('m_warn')) ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $report['user_id']) : '',
|
||||
'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '',
|
||||
'U_MCP_WARN_REPORTER' => (phpbb::$acl->acl_get('m_warn')) ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $report['user_id']) : '',
|
||||
'U_MCP_WARN_USER' => (phpbb::$acl->acl_get('m_warn')) ? append_sid('mcp', 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '',
|
||||
'U_VIEW_FORUM' => append_sid('viewforum', 'f=' . $post_info['forum_id']),
|
||||
'U_VIEW_POST' => append_sid('viewtopic', 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
|
||||
'U_VIEW_TOPIC' => append_sid('viewtopic', 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']),
|
||||
|
@ -229,10 +229,10 @@ class mcp_reports
|
|||
'POST_SUBJECT' => ($post_info['post_subject']) ? $post_info['post_subject'] : phpbb::$user->lang['NO_SUBJECT'],
|
||||
'POST_DATE' => phpbb::$user->format_date($post_info['post_time']),
|
||||
'POST_IP' => $post_info['poster_ip'],
|
||||
'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
|
||||
'POST_IPADDR' => (phpbb::$acl->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
|
||||
'POST_ID' => $post_info['post_id'],
|
||||
|
||||
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&r=' . $report_id . '&p=' . $post_id . '&f=' . $forum_id . '&lookup=' . $post_info['poster_ip'] . '#ip' : '',
|
||||
'U_LOOKUP_IP' => (phpbb::$acl->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&r=' . $report_id . '&p=' . $post_id . '&f=' . $forum_id . '&lookup=' . $post_info['poster_ip'] . '#ip' : '',
|
||||
));
|
||||
|
||||
$this->tpl_name = 'mcp_post';
|
||||
|
|
|
@ -73,7 +73,7 @@ function mcp_topic_view($id, $mode, $action)
|
|||
}
|
||||
|
||||
// Approve posts?
|
||||
if ($action == 'approve' && $auth->acl_get('m_approve', $topic_info['forum_id']))
|
||||
if ($action == 'approve' && phpbb::$acl->acl_get('m_approve', $topic_info['forum_id']))
|
||||
{
|
||||
include(PHPBB_ROOT_PATH . 'includes/mcp/mcp_queue.' . PHP_EXT);
|
||||
include_once(PHPBB_ROOT_PATH . 'includes/functions_posting.' . PHP_EXT);
|
||||
|
@ -127,7 +127,7 @@ function mcp_topic_view($id, $mode, $action)
|
|||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . '
|
||||
p.topic_id = ' . $topic_id . ' ' .
|
||||
((!$auth->acl_get('m_approve', $topic_info['forum_id'])) ? ' AND p.post_approved = 1 ' : '') . '
|
||||
((!phpbb::$acl->acl_get('m_approve', $topic_info['forum_id'])) ? ' AND p.post_approved = 1 ' : '') . '
|
||||
AND p.poster_id = u.user_id ' .
|
||||
$limit_time_sql . '
|
||||
ORDER BY ' . $sort_order_sql;
|
||||
|
@ -172,7 +172,7 @@ function mcp_topic_view($id, $mode, $action)
|
|||
$extensions = phpbb_cache::obtain_extensions_forum($topic_info['forum_id']);
|
||||
|
||||
// Get attachments...
|
||||
if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $topic_info['forum_id']))
|
||||
if (phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $topic_info['forum_id']))
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
|
@ -235,8 +235,8 @@ function mcp_topic_view($id, $mode, $action)
|
|||
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
|
||||
|
||||
'U_POST_DETAILS' => "$url&i=$id&p={$row['post_id']}&mode=post_details" . (($forum_id) ? "&f=$forum_id" : ''),
|
||||
'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid('mcp', 'i=queue&mode=approve_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '',
|
||||
'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid('mcp', 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '')
|
||||
'U_MCP_APPROVE' => (phpbb::$acl->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid('mcp', 'i=queue&mode=approve_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '',
|
||||
'U_MCP_REPORT' => (phpbb::$acl->acl_get('m_report', $topic_info['forum_id'])) ? append_sid('mcp', 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '')
|
||||
);
|
||||
|
||||
// Display not already displayed Attachments for this post, we already parsed them. ;)
|
||||
|
@ -256,7 +256,7 @@ function mcp_topic_view($id, $mode, $action)
|
|||
// Display topic icons for split topic
|
||||
$s_topic_icons = false;
|
||||
|
||||
if ($auth->acl_get('m_split', $topic_info['forum_id']))
|
||||
if (phpbb::$acl->acl_get('m_split', $topic_info['forum_id']))
|
||||
{
|
||||
include_once(PHPBB_ROOT_PATH . 'includes/functions_posting.' . PHP_EXT);
|
||||
$s_topic_icons = posting_gen_topic_icons('', $icon_id);
|
||||
|
@ -274,7 +274,7 @@ function mcp_topic_view($id, $mode, $action)
|
|||
{
|
||||
$to_topic_info = $to_topic_info[$to_topic_id];
|
||||
|
||||
if (!$to_topic_info['enable_icons'] || $auth->acl_get('!f_icons', $topic_info['forum_id']))
|
||||
if (!$to_topic_info['enable_icons'] || phpbb::$acl->acl_get('!f_icons', $topic_info['forum_id']))
|
||||
{
|
||||
$s_topic_icons = false;
|
||||
}
|
||||
|
@ -303,12 +303,12 @@ function mcp_topic_view($id, $mode, $action)
|
|||
|
||||
'S_MCP_ACTION' => "$url&i=$id&mode=$mode&action=$action&start=$start",
|
||||
'S_FORUM_SELECT' => ($to_forum_id) ? make_forum_select($to_forum_id, false, false, true, true, true) : make_forum_select($topic_info['forum_id'], false, false, true, true, true),
|
||||
'S_CAN_SPLIT' => ($auth->acl_get('m_split', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_MERGE' => ($auth->acl_get('m_merge', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_DELETE' => ($auth->acl_get('m_delete', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_APPROVE' => ($has_unapproved_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_LOCK' => ($auth->acl_get('m_lock', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_SPLIT' => (phpbb::$acl->acl_get('m_split', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_MERGE' => (phpbb::$acl->acl_get('m_merge', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_DELETE' => (phpbb::$acl->acl_get('m_delete', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_APPROVE' => ($has_unapproved_posts && phpbb::$acl->acl_get('m_approve', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_LOCK' => (phpbb::$acl->acl_get('m_lock', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_REPORT' => (phpbb::$acl->acl_get('m_report', $topic_info['forum_id'])) ? true : false,
|
||||
'S_REPORT_VIEW' => ($action == 'reports') ? true : false,
|
||||
'S_MERGE_VIEW' => ($action == 'merge') ? true : false,
|
||||
'S_SPLIT_VIEW' => ($action == 'split') ? true : false,
|
||||
|
@ -442,7 +442,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
|||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
// If split from selected post (split_beyond), we split the unapproved items too.
|
||||
if (!$row['post_approved'] && !$auth->acl_get('m_approve', $row['forum_id']))
|
||||
if (!$row['post_approved'] && !phpbb::$acl->acl_get('m_approve', $row['forum_id']))
|
||||
{
|
||||
// continue;
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ class mcp_warn
|
|||
|
||||
$template->assign_vars(array(
|
||||
'U_POST_ACTION' => $this->u_action,
|
||||
'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,
|
||||
'S_CLEAR_ALLOWED' => (phpbb::$acl->acl_get('a_clearlogs')) ? true : false,
|
||||
'S_SELECT_SORT_DIR' => $s_sort_dir,
|
||||
'S_SELECT_SORT_KEY' => $s_sort_key,
|
||||
'S_SELECT_SORT_DAYS' => $s_limit_days,
|
||||
|
|
|
@ -78,7 +78,7 @@ class ucp_groups
|
|||
trigger_error(phpbb::$user->lang['ALREADY_DEFAULT_GROUP'] . $return_page);
|
||||
}
|
||||
|
||||
if (!$auth->acl_get('u_chggrp'))
|
||||
if (!phpbb::$acl->acl_get('u_chggrp'))
|
||||
{
|
||||
trigger_error(phpbb::$user->lang['NOT_AUTHORISED'] . $return_page);
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ class ucp_groups
|
|||
case 'resign':
|
||||
|
||||
// User tries to resign from default group but is not allowed to change it?
|
||||
if ($group_id == phpbb::$user->data['group_id'] && !$auth->acl_get('u_chggrp'))
|
||||
if ($group_id == phpbb::$user->data['group_id'] && !phpbb::$acl->acl_get('u_chggrp'))
|
||||
{
|
||||
trigger_error(phpbb::$user->lang['NOT_RESIGN_FROM_DEFAULT_GROUP'] . $return_page);
|
||||
}
|
||||
|
@ -341,7 +341,7 @@ class ucp_groups
|
|||
$db->sql_freeresult($result);
|
||||
|
||||
// Hide hidden groups unless user is an admin with group privileges
|
||||
$sql_and = ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? '<> ' . GROUP_SPECIAL : 'NOT IN (' . GROUP_SPECIAL . ', ' . GROUP_HIDDEN . ')';
|
||||
$sql_and = (phpbb::$acl->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? '<> ' . GROUP_SPECIAL : 'NOT IN (' . GROUP_SPECIAL . ', ' . GROUP_HIDDEN . ')';
|
||||
|
||||
$sql = 'SELECT group_id, group_name, group_colour, group_desc, group_desc_uid, group_desc_bitfield, group_desc_options, group_type, group_founder_manage
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
|
@ -380,7 +380,7 @@ class ucp_groups
|
|||
'GROUP_NAME' => ($row['group_type'] == GROUP_SPECIAL) ? phpbb::$user->lang['G_' . $row['group_name']] : $row['group_name'],
|
||||
'GROUP_DESC' => ($row['group_type'] <> GROUP_SPECIAL) ? generate_text_for_display($row['group_desc'], $row['group_desc_uid'], $row['group_desc_bitfield'], $row['group_desc_options']) : phpbb::$user->lang['GROUP_IS_SPECIAL'],
|
||||
'GROUP_SPECIAL' => ($row['group_type'] <> GROUP_SPECIAL) ? false : true,
|
||||
'GROUP_CLOSED' => ($row['group_type'] <> GROUP_CLOSED || $auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? false : true,
|
||||
'GROUP_CLOSED' => ($row['group_type'] <> GROUP_CLOSED || phpbb::$acl->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? false : true,
|
||||
'GROUP_STATUS' => phpbb::$user->lang['GROUP_IS_' . $group_status],
|
||||
'S_CAN_JOIN' => ($row['group_type'] == GROUP_OPEN || $row['group_type'] == GROUP_FREE) ? true : false,
|
||||
'GROUP_COLOUR' => $row['group_colour'],
|
||||
|
@ -391,7 +391,7 @@ class ucp_groups
|
|||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_CHANGE_DEFAULT' => ($auth->acl_get('u_chggrp')) ? true : false,
|
||||
'S_CHANGE_DEFAULT' => (phpbb::$acl->acl_get('u_chggrp')) ? true : false,
|
||||
'S_LEADER_COUNT' => $leader_count,
|
||||
'S_MEMBER_COUNT' => $member_count,
|
||||
'S_PENDING_COUNT' => $pending_count,
|
||||
|
|
|
@ -61,7 +61,7 @@ class ucp_main
|
|||
$folder_new = 'global_unread';
|
||||
|
||||
// Get cleaned up list... return only those forums not having the f_read permission
|
||||
$forum_ary = $auth->acl_getf('!f_read', true);
|
||||
$forum_ary = phpbb::$acl->acl_getf('!f_read', true);
|
||||
$forum_ary = array_unique(array_keys($forum_ary));
|
||||
|
||||
// Determine first forum the user is able to read into - for global announcement link
|
||||
|
@ -148,7 +148,7 @@ class ucp_main
|
|||
|
||||
'TOPIC_FOLDER_IMG' => phpbb::$user->img($folder_img, $folder_alt),
|
||||
'TOPIC_FOLDER_IMG_SRC' => phpbb::$user->img($folder_img, $folder_alt, 'src'),
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? phpbb::$user->img('icon_topic_attach', '') : '',
|
||||
'ATTACH_ICON_IMG' => (phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? phpbb::$user->img('icon_topic_attach', '') : '',
|
||||
|
||||
'S_USER_POSTED' => (!empty($row['topic_posted']) && $row['topic_posted']) ? true : false,
|
||||
'S_UNREAD' => $unread_topic,
|
||||
|
@ -189,7 +189,7 @@ class ucp_main
|
|||
|
||||
// 'S_GROUP_OPTIONS' => $group_options,
|
||||
|
||||
'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid('search', 'author_id=' . phpbb::$user->data['user_id'] . '&sr=posts') : '',
|
||||
'U_SEARCH_USER' => (phpbb::$acl->acl_get('u_search')) ? append_sid('search', 'author_id=' . phpbb::$user->data['user_id'] . '&sr=posts') : '',
|
||||
));
|
||||
|
||||
break;
|
||||
|
@ -254,7 +254,7 @@ class ucp_main
|
|||
|
||||
if (phpbb::$config['allow_forum_notify'])
|
||||
{
|
||||
$forbidden_forums = $auth->acl_getf('!f_read', true);
|
||||
$forbidden_forums = phpbb::$acl->acl_getf('!f_read', true);
|
||||
$forbidden_forums = array_unique(array_keys($forbidden_forums));
|
||||
|
||||
$sql_array = array(
|
||||
|
@ -358,7 +358,7 @@ class ucp_main
|
|||
{
|
||||
if (empty($forbidden_forums))
|
||||
{
|
||||
$forbidden_forums = $auth->acl_getf('!f_read', true);
|
||||
$forbidden_forums = phpbb::$acl->acl_getf('!f_read', true);
|
||||
$forbidden_forums = array_unique(array_keys($forbidden_forums));
|
||||
}
|
||||
$this->assign_topiclist('subscribed', $forbidden_forums);
|
||||
|
@ -417,7 +417,7 @@ class ucp_main
|
|||
confirm_box(false, 'REMOVE_SELECTED_BOOKMARKS', build_hidden_fields($s_hidden_fields));
|
||||
}
|
||||
}
|
||||
$forbidden_forums = $auth->acl_getf('!f_read', true);
|
||||
$forbidden_forums = phpbb::$acl->acl_getf('!f_read', true);
|
||||
$forbidden_forums = array_unique(array_keys($forbidden_forums));
|
||||
|
||||
$this->assign_topiclist('bookmarks', $forbidden_forums);
|
||||
|
@ -555,7 +555,7 @@ class ucp_main
|
|||
$link_topic = $link_forum = $link_pm = false;
|
||||
$insert_url = $view_url = $title = '';
|
||||
|
||||
if (isset($topic_rows[$draft['topic_id']]) && $auth->acl_get('f_read', $topic_rows[$draft['topic_id']]['forum_id']))
|
||||
if (isset($topic_rows[$draft['topic_id']]) && phpbb::$acl->acl_get('f_read', $topic_rows[$draft['topic_id']]['forum_id']))
|
||||
{
|
||||
$link_topic = true;
|
||||
$view_url = append_sid('viewtopic', 'f=' . $topic_rows[$draft['topic_id']]['forum_id'] . '&t=' . $draft['topic_id']);
|
||||
|
@ -563,7 +563,7 @@ class ucp_main
|
|||
|
||||
$insert_url = append_sid('posting', 'f=' . $topic_rows[$draft['topic_id']]['forum_id'] . '&t=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id']);
|
||||
}
|
||||
else if ($auth->acl_get('f_read', $draft['forum_id']))
|
||||
else if (phpbb::$acl->acl_get('f_read', $draft['forum_id']))
|
||||
{
|
||||
$link_forum = true;
|
||||
$view_url = append_sid('viewforum', 'f=' . $draft['forum_id']);
|
||||
|
@ -761,7 +761,7 @@ class ucp_main
|
|||
$unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
|
||||
|
||||
// Replies
|
||||
$replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
|
||||
$replies = (phpbb::$acl->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
|
||||
|
||||
if ($row['topic_status'] == ITEM_MOVED && !empty($row['topic_moved_id']))
|
||||
{
|
||||
|
@ -808,7 +808,7 @@ class ucp_main
|
|||
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
|
||||
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
|
||||
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? phpbb::$user->img('icon_topic_attach', phpbb::$user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
'ATTACH_ICON_IMG' => (phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? phpbb::$user->img('icon_topic_attach', phpbb::$user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
|
||||
'S_TOPIC_TYPE' => $row['topic_type'],
|
||||
'S_USER_POSTED' => (!empty($row['topic_posted'])) ? true : false,
|
||||
|
|
|
@ -115,7 +115,7 @@ class ucp_pm
|
|||
|
||||
get_folder(phpbb::$user->data['user_id']);
|
||||
|
||||
if (!$auth->acl_get('u_sendpm'))
|
||||
if (!phpbb::$acl->acl_get('u_sendpm'))
|
||||
{
|
||||
trigger_error('NO_AUTH_SEND_MESSAGE');
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ class ucp_pm
|
|||
$action = 'view_message';
|
||||
}
|
||||
|
||||
if (!$auth->acl_get('u_readpm'))
|
||||
if (!phpbb::$acl->acl_get('u_readpm'))
|
||||
{
|
||||
trigger_error('NO_AUTH_READ_MESSAGE');
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ function compose_pm($id, $mode, $action)
|
|||
|| $remove_u || $remove_g || $add_to || $add_bcc;
|
||||
|
||||
$action = ($delete && !$preview && !$refresh && $submit) ? 'delete' : $action;
|
||||
$select_single = (phpbb::$config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? false : true;
|
||||
$select_single = (phpbb::$config['allow_mass_pm'] && phpbb::$acl->acl_get('u_masspm')) ? false : true;
|
||||
|
||||
$error = array();
|
||||
$current_time = time();
|
||||
|
@ -79,12 +79,12 @@ function compose_pm($id, $mode, $action)
|
|||
if ($action != 'edit')
|
||||
{
|
||||
// Add groups to PM box
|
||||
if (phpbb::$config['allow_mass_pm'] && $auth->acl_get('u_masspm_group'))
|
||||
if (phpbb::$config['allow_mass_pm'] && phpbb::$acl->acl_get('u_masspm_group'))
|
||||
{
|
||||
$sql = 'SELECT g.group_id, g.group_name, g.group_type
|
||||
FROM ' . GROUPS_TABLE . ' g';
|
||||
|
||||
if (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
|
||||
if (!phpbb::$acl->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
|
||||
{
|
||||
$sql .= ' LEFT JOIN ' . USER_GROUP_TABLE . ' ug
|
||||
ON (
|
||||
|
@ -95,7 +95,7 @@ function compose_pm($id, $mode, $action)
|
|||
WHERE (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . phpbb::$user->data['user_id'] . ')';
|
||||
}
|
||||
|
||||
$sql .= ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' WHERE ' : ' AND ';
|
||||
$sql .= (phpbb::$acl->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' WHERE ' : ' AND ';
|
||||
|
||||
$sql .= 'g.group_receive_pm = 1
|
||||
ORDER BY g.group_type DESC, g.group_name ASC';
|
||||
|
@ -111,8 +111,8 @@ function compose_pm($id, $mode, $action)
|
|||
|
||||
$template->assign_vars(array(
|
||||
'S_SHOW_PM_BOX' => true,
|
||||
'S_ALLOW_MASS_PM' => (phpbb::$config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? true : false,
|
||||
'S_GROUP_OPTIONS' => (phpbb::$config['allow_mass_pm'] && $auth->acl_get('u_masspm_group')) ? $group_options : '',
|
||||
'S_ALLOW_MASS_PM' => (phpbb::$config['allow_mass_pm'] && phpbb::$acl->acl_get('u_masspm')) ? true : false,
|
||||
'S_GROUP_OPTIONS' => (phpbb::$config['allow_mass_pm'] && phpbb::$acl->acl_get('u_masspm_group')) ? $group_options : '',
|
||||
'U_FIND_USERNAME' => append_sid('memberlist', "mode=searchuser&form=postform&field=username_list&select_single=$select_single"),
|
||||
));
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ function compose_pm($id, $mode, $action)
|
|||
switch ($action)
|
||||
{
|
||||
case 'post':
|
||||
if (!$auth->acl_get('u_sendpm'))
|
||||
if (!phpbb::$acl->acl_get('u_sendpm'))
|
||||
{
|
||||
trigger_error('NO_AUTH_SEND_MESSAGE');
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ function compose_pm($id, $mode, $action)
|
|||
trigger_error('NO_MESSAGE');
|
||||
}
|
||||
|
||||
if (!$auth->acl_get('u_sendpm'))
|
||||
if (!phpbb::$acl->acl_get('u_sendpm'))
|
||||
{
|
||||
trigger_error('NO_AUTH_SEND_MESSAGE');
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ function compose_pm($id, $mode, $action)
|
|||
break;
|
||||
|
||||
case 'delete':
|
||||
if (!$auth->acl_get('u_pm_delete'))
|
||||
if (!phpbb::$acl->acl_get('u_pm_delete'))
|
||||
{
|
||||
trigger_error('NO_AUTH_DELETE_MESSAGE');
|
||||
}
|
||||
|
@ -204,12 +204,12 @@ function compose_pm($id, $mode, $action)
|
|||
break;
|
||||
}
|
||||
|
||||
if ($action == 'forward' && (!phpbb::$config['forward_pm'] || !$auth->acl_get('u_pm_forward')))
|
||||
if ($action == 'forward' && (!phpbb::$config['forward_pm'] || !phpbb::$acl->acl_get('u_pm_forward')))
|
||||
{
|
||||
trigger_error('NO_AUTH_FORWARD_MESSAGE');
|
||||
}
|
||||
|
||||
if ($action == 'edit' && !$auth->acl_get('u_pm_edit'))
|
||||
if ($action == 'edit' && !phpbb::$acl->acl_get('u_pm_edit'))
|
||||
{
|
||||
trigger_error('NO_AUTH_EDIT_MESSAGE');
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ function compose_pm($id, $mode, $action)
|
|||
|
||||
if ($action == 'quotepost')
|
||||
{
|
||||
if (($post['forum_id'] && !$auth->acl_get('f_read', $post['forum_id'])) || (!$post['forum_id'] && !$auth->acl_getf_global('f_read')))
|
||||
if (($post['forum_id'] && !phpbb::$acl->acl_get('f_read', $post['forum_id'])) || (!$post['forum_id'] && !phpbb::$acl->acl_getf_global('f_read')))
|
||||
{
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
@ -351,7 +351,7 @@ function compose_pm($id, $mode, $action)
|
|||
$check_value = 0;
|
||||
}
|
||||
|
||||
if (($to_group_id || isset($address_list['g'])) && (!phpbb::$config['allow_mass_pm'] || !$auth->acl_get('u_masspm_group')))
|
||||
if (($to_group_id || isset($address_list['g'])) && (!phpbb::$config['allow_mass_pm'] || !phpbb::$acl->acl_get('u_masspm_group')))
|
||||
{
|
||||
trigger_error('NO_AUTH_GROUP_MESSAGE');
|
||||
}
|
||||
|
@ -452,14 +452,14 @@ function compose_pm($id, $mode, $action)
|
|||
handle_message_list_actions($address_list, $error, $remove_u, $remove_g, $add_to, $add_bcc);
|
||||
|
||||
// Check mass pm to group permission
|
||||
if ((!phpbb::$config['allow_mass_pm'] || !$auth->acl_get('u_masspm_group')) && !empty($address_list['g']))
|
||||
if ((!phpbb::$config['allow_mass_pm'] || !phpbb::$acl->acl_get('u_masspm_group')) && !empty($address_list['g']))
|
||||
{
|
||||
$address_list = array();
|
||||
$error[] = phpbb::$user->lang['NO_AUTH_GROUP_MESSAGE'];
|
||||
}
|
||||
|
||||
// Check mass pm to users permission
|
||||
if ((!phpbb::$config['allow_mass_pm'] || !$auth->acl_get('u_masspm')) && num_recipients($address_list) > 1)
|
||||
if ((!phpbb::$config['allow_mass_pm'] || !phpbb::$acl->acl_get('u_masspm')) && num_recipients($address_list) > 1)
|
||||
{
|
||||
$address_list = get_recipients($address_list, 1);
|
||||
$error[] = phpbb::$user->lang('TOO_MANY_RECIPIENTS', 1);
|
||||
|
@ -492,16 +492,16 @@ function compose_pm($id, $mode, $action)
|
|||
|
||||
if (!in_array($action, array('quote', 'edit', 'delete', 'forward')))
|
||||
{
|
||||
$enable_sig = (phpbb::$config['allow_sig'] && phpbb::$config['allow_sig_pm'] && $auth->acl_get('u_sig') && phpbb::$user->optionget('attachsig'));
|
||||
$enable_smilies = (phpbb::$config['allow_smilies'] && $auth->acl_get('u_pm_smilies') && phpbb::$user->optionget('smilies'));
|
||||
$enable_bbcode = (phpbb::$config['allow_bbcode'] && $auth->acl_get('u_pm_bbcode') && phpbb::$user->optionget('bbcode'));
|
||||
$enable_sig = (phpbb::$config['allow_sig'] && phpbb::$config['allow_sig_pm'] && phpbb::$acl->acl_get('u_sig') && phpbb::$user->optionget('attachsig'));
|
||||
$enable_smilies = (phpbb::$config['allow_smilies'] && phpbb::$acl->acl_get('u_pm_smilies') && phpbb::$user->optionget('smilies'));
|
||||
$enable_bbcode = (phpbb::$config['allow_bbcode'] && phpbb::$acl->acl_get('u_pm_bbcode') && phpbb::$user->optionget('bbcode'));
|
||||
$enable_urls = true;
|
||||
}
|
||||
|
||||
$enable_magic_url = $drafts = false;
|
||||
|
||||
// User own some drafts?
|
||||
if ($auth->acl_get('u_savedrafts') && $action != 'delete')
|
||||
if (phpbb::$acl->acl_get('u_savedrafts') && $action != 'delete')
|
||||
{
|
||||
$sql = 'SELECT draft_id
|
||||
FROM ' . DRAFTS_TABLE . '
|
||||
|
@ -524,14 +524,14 @@ function compose_pm($id, $mode, $action)
|
|||
$message_parser->bbcode_uid = $bbcode_uid;
|
||||
}
|
||||
|
||||
$bbcode_status = (phpbb::$config['allow_bbcode'] && phpbb::$config['auth_bbcode_pm'] && $auth->acl_get('u_pm_bbcode')) ? true : false;
|
||||
$smilies_status = (phpbb::$config['allow_smilies'] && phpbb::$config['auth_smilies_pm'] && $auth->acl_get('u_pm_smilies')) ? true : false;
|
||||
$img_status = (phpbb::$config['auth_img_pm'] && $auth->acl_get('u_pm_img')) ? true : false;
|
||||
$flash_status = (phpbb::$config['auth_flash_pm'] && $auth->acl_get('u_pm_flash')) ? true : false;
|
||||
$bbcode_status = (phpbb::$config['allow_bbcode'] && phpbb::$config['auth_bbcode_pm'] && phpbb::$acl->acl_get('u_pm_bbcode')) ? true : false;
|
||||
$smilies_status = (phpbb::$config['allow_smilies'] && phpbb::$config['auth_smilies_pm'] && phpbb::$acl->acl_get('u_pm_smilies')) ? true : false;
|
||||
$img_status = (phpbb::$config['auth_img_pm'] && phpbb::$acl->acl_get('u_pm_img')) ? true : false;
|
||||
$flash_status = (phpbb::$config['auth_flash_pm'] && phpbb::$acl->acl_get('u_pm_flash')) ? true : false;
|
||||
$url_status = (phpbb::$config['allow_post_links']) ? true : false;
|
||||
|
||||
// Save Draft
|
||||
if ($save && $auth->acl_get('u_savedrafts'))
|
||||
if ($save && phpbb::$acl->acl_get('u_savedrafts'))
|
||||
{
|
||||
$subject = utf8_normalize_nfc(request_var('subject', '', true));
|
||||
$subject = (!$subject && $action != 'post') ? phpbb::$user->lang['NEW_MESSAGE'] : $subject;
|
||||
|
@ -594,7 +594,7 @@ function compose_pm($id, $mode, $action)
|
|||
}
|
||||
|
||||
// Load Draft
|
||||
if ($draft_id && $auth->acl_get('u_savedrafts'))
|
||||
if ($draft_id && phpbb::$acl->acl_get('u_savedrafts'))
|
||||
{
|
||||
$sql = 'SELECT draft_subject, draft_message
|
||||
FROM ' . DRAFTS_TABLE . "
|
||||
|
@ -668,7 +668,7 @@ function compose_pm($id, $mode, $action)
|
|||
$error[] = implode('<br />', $message_parser->warn_msg);
|
||||
}
|
||||
|
||||
if ($action != 'edit' && !$preview && !$refresh && phpbb::$config['flood_interval'] && !$auth->acl_get('u_ignoreflood'))
|
||||
if ($action != 'edit' && !$preview && !$refresh && phpbb::$config['flood_interval'] && !phpbb::$acl->acl_get('u_ignoreflood'))
|
||||
{
|
||||
// Flood check
|
||||
$last_post_time = phpbb::$user->data['user_lastpost_time'];
|
||||
|
@ -887,7 +887,7 @@ function compose_pm($id, $mode, $action)
|
|||
$sql = 'SELECT g.group_id AS id, g.group_name AS name, g.group_colour AS colour, g.group_type
|
||||
FROM ' . GROUPS_TABLE . ' g';
|
||||
|
||||
if (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
|
||||
if (!phpbb::$acl->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
|
||||
{
|
||||
$sql .= ' LEFT JOIN ' . USER_GROUP_TABLE . ' ug
|
||||
ON (
|
||||
|
@ -898,7 +898,7 @@ function compose_pm($id, $mode, $action)
|
|||
WHERE (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . phpbb::$user->data['user_id'] . ')';
|
||||
}
|
||||
|
||||
$sql .= ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' WHERE ' : ' AND ';
|
||||
$sql .= (phpbb::$acl->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' WHERE ' : ' AND ';
|
||||
|
||||
$sql .= 'g.group_receive_pm = 1
|
||||
AND ' . $db->sql_in_set('g.group_id', array_map('intval', array_keys($address_list['g']))) . '
|
||||
|
@ -974,8 +974,8 @@ function compose_pm($id, $mode, $action)
|
|||
$s_hidden_address_field = build_address_field($address_list);
|
||||
|
||||
|
||||
$bbcode_checked = (isset($enable_bbcode)) ? !$enable_bbcode : ((phpbb::$config['allow_bbcode'] && $auth->acl_get('u_pm_bbcode')) ? !phpbb::$user->optionget('bbcode') : 1);
|
||||
$smilies_checked = (isset($enable_smilies)) ? !$enable_smilies : ((phpbb::$config['allow_smilies'] && $auth->acl_get('u_pm_smilies')) ? !phpbb::$user->optionget('smilies') : 1);
|
||||
$bbcode_checked = (isset($enable_bbcode)) ? !$enable_bbcode : ((phpbb::$config['allow_bbcode'] && phpbb::$acl->acl_get('u_pm_bbcode')) ? !phpbb::$user->optionget('bbcode') : 1);
|
||||
$smilies_checked = (isset($enable_smilies)) ? !$enable_smilies : ((phpbb::$config['allow_smilies'] && phpbb::$acl->acl_get('u_pm_smilies')) ? !phpbb::$user->optionget('smilies') : 1);
|
||||
$urls_checked = (isset($enable_urls)) ? !$enable_urls : 0;
|
||||
$sig_checked = $enable_sig;
|
||||
|
||||
|
@ -1014,7 +1014,7 @@ function compose_pm($id, $mode, $action)
|
|||
$s_hidden_fields .= (isset($check_value)) ? '<input type="hidden" name="status_switch" value="' . $check_value . '" />' : '';
|
||||
$s_hidden_fields .= ($draft_id || phpbb_request::is_set('draft_loaded')) ? '<input type="hidden" name="draft_loaded" value="' . request_var('draft_loaded', (int) $draft_id) . '" />' : '';
|
||||
|
||||
$form_enctype = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !phpbb::$config['allow_pm_attach'] || !$auth->acl_get('u_pm_attach')) ? '' : ' enctype="multipart/form-data"';
|
||||
$form_enctype = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !phpbb::$config['allow_pm_attach'] || !phpbb::$acl->acl_get('u_pm_attach')) ? '' : ' enctype="multipart/form-data"';
|
||||
|
||||
// Start assigning vars for main posting page ...
|
||||
$template->assign_vars(array(
|
||||
|
@ -1031,7 +1031,7 @@ function compose_pm($id, $mode, $action)
|
|||
'URL_STATUS' => ($url_status) ? phpbb::$user->lang['URL_IS_ON'] : phpbb::$user->lang['URL_IS_OFF'],
|
||||
'MINI_POST_IMG' => phpbb::$user->img('icon_post_target', phpbb::$user->lang['PM']),
|
||||
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
'MAX_RECIPIENTS' => (phpbb::$config['allow_mass_pm'] && ($auth->acl_get('u_masspm') || $auth->acl_get('u_masspm_group'))) ? $max_recipients : 0,
|
||||
'MAX_RECIPIENTS' => (phpbb::$config['allow_mass_pm'] && (phpbb::$acl->acl_get('u_masspm') || phpbb::$acl->acl_get('u_masspm_group'))) ? $max_recipients : 0,
|
||||
|
||||
'S_COMPOSE_PM' => true,
|
||||
'S_EDIT_POST' => ($action == 'edit'),
|
||||
|
@ -1040,12 +1040,12 @@ function compose_pm($id, $mode, $action)
|
|||
'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '',
|
||||
'S_SMILIES_ALLOWED' => $smilies_status,
|
||||
'S_SMILIES_CHECKED' => ($smilies_checked) ? ' checked="checked"' : '',
|
||||
'S_SIG_ALLOWED' => (phpbb::$config['allow_sig'] && phpbb::$config['allow_sig_pm'] && $auth->acl_get('u_sig')),
|
||||
'S_SIG_ALLOWED' => (phpbb::$config['allow_sig'] && phpbb::$config['allow_sig_pm'] && phpbb::$acl->acl_get('u_sig')),
|
||||
'S_SIGNATURE_CHECKED' => ($sig_checked) ? ' checked="checked"' : '',
|
||||
'S_LINKS_ALLOWED' => $url_status,
|
||||
'S_MAGIC_URL_CHECKED' => ($urls_checked) ? ' checked="checked"' : '',
|
||||
'S_SAVE_ALLOWED' => ($auth->acl_get('u_savedrafts') && $action != 'edit') ? true : false,
|
||||
'S_HAS_DRAFTS' => ($auth->acl_get('u_savedrafts') && $drafts),
|
||||
'S_SAVE_ALLOWED' => (phpbb::$acl->acl_get('u_savedrafts') && $action != 'edit') ? true : false,
|
||||
'S_HAS_DRAFTS' => (phpbb::$acl->acl_get('u_savedrafts') && $drafts),
|
||||
'S_FORM_ENCTYPE' => $form_enctype,
|
||||
|
||||
'S_BBCODE_IMG' => $img_status,
|
||||
|
@ -1066,7 +1066,7 @@ function compose_pm($id, $mode, $action)
|
|||
display_custom_bbcodes();
|
||||
|
||||
// Show attachment box for adding attachments if true
|
||||
$allowed = ($auth->acl_get('u_pm_attach') && phpbb::$config['allow_pm_attach'] && $form_enctype);
|
||||
$allowed = (phpbb::$acl->acl_get('u_pm_attach') && phpbb::$config['allow_pm_attach'] && $form_enctype);
|
||||
|
||||
// Attachment entry
|
||||
posting_gen_attachment_entry($attachment_data, $filename_data, $allowed);
|
||||
|
@ -1172,7 +1172,7 @@ function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove
|
|||
{
|
||||
// We need to check their PM status (do they want to receive PM's?)
|
||||
// Only check if not a moderator or admin, since they are allowed to override this user setting
|
||||
if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
|
||||
if (!phpbb::$acl->acl_gets('a_', 'm_') && !phpbb::$acl->acl_getf_global('m_'))
|
||||
{
|
||||
$sql = 'SELECT user_id
|
||||
FROM ' . USERS_TABLE . '
|
||||
|
|
|
@ -733,7 +733,7 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
|||
$sql = 'SELECT g.group_id, g.group_name, g.group_type
|
||||
FROM ' . GROUPS_TABLE . ' g ';
|
||||
|
||||
if (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
|
||||
if (!phpbb::$acl->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
|
||||
{
|
||||
$sql .= 'LEFT JOIN ' . USER_GROUP_TABLE . ' ug
|
||||
ON (
|
||||
|
|
|
@ -231,7 +231,7 @@ function view_folder($id, $mode, $folder_id, $folder)
|
|||
'FOLDER_IMG' => phpbb::$user->img($folder_img, $folder_alt),
|
||||
'FOLDER_IMG_SRC' => phpbb::$user->img($folder_img, $folder_alt, 'src'),
|
||||
'PM_IMG' => ($row_indicator) ? phpbb::$user->img('pm_' . $row_indicator, '') : '',
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_pm_download') && $row['message_attachment'] && phpbb::$config['allow_pm_attach']) ? phpbb::$user->img('icon_topic_attach', 'TOTAL_ATTACHMENTS') : '',
|
||||
'ATTACH_ICON_IMG' => (phpbb::$acl->acl_get('u_pm_download') && $row['message_attachment'] && phpbb::$config['allow_pm_attach']) ? phpbb::$user->img('icon_topic_attach', 'TOTAL_ATTACHMENTS') : '',
|
||||
|
||||
'S_PM_DELETED' => ($row['pm_deleted']) ? true : false,
|
||||
'S_AUTHOR_DELETED' => ($row['author_id'] == ANONYMOUS) ? true : false,
|
||||
|
@ -497,16 +497,16 @@ function get_pm_from($folder_id, $folder, $user_id)
|
|||
'PAGE_NUMBER' => on_page($pm_count, phpbb::$config['topics_per_page'], $start),
|
||||
'TOTAL_MESSAGES' => (($pm_count == 1) ? phpbb::$user->lang['VIEW_PM_MESSAGE'] : sprintf(phpbb::$user->lang['VIEW_PM_MESSAGES'], $pm_count)),
|
||||
|
||||
'POST_IMG' => (!$auth->acl_get('u_sendpm')) ? phpbb::$user->img('button_topic_locked', 'PM_LOCKED') : phpbb::$user->img('button_pm_new', 'POST_PM'),
|
||||
'POST_IMG' => (!phpbb::$acl->acl_get('u_sendpm')) ? phpbb::$user->img('button_topic_locked', 'PM_LOCKED') : phpbb::$user->img('button_pm_new', 'POST_PM'),
|
||||
|
||||
'L_NO_MESSAGES' => (!$auth->acl_get('u_sendpm')) ? phpbb::$user->lang['POST_PM_LOCKED'] : phpbb::$user->lang['NO_MESSAGES'],
|
||||
'L_NO_MESSAGES' => (!phpbb::$acl->acl_get('u_sendpm')) ? phpbb::$user->lang['POST_PM_LOCKED'] : phpbb::$user->lang['NO_MESSAGES'],
|
||||
|
||||
'S_SELECT_SORT_DIR' => $s_sort_dir,
|
||||
'S_SELECT_SORT_KEY' => $s_sort_key,
|
||||
'S_SELECT_SORT_DAYS' => $s_limit_days,
|
||||
'S_TOPIC_ICONS' => (phpbb::$config['enable_pm_icons']) ? true : false,
|
||||
|
||||
'U_POST_NEW_TOPIC' => ($auth->acl_get('u_sendpm')) ? append_sid('ucp', 'i=pm&mode=compose') : '',
|
||||
'U_POST_NEW_TOPIC' => (phpbb::$acl->acl_get('u_sendpm')) ? append_sid('ucp', 'i=pm&mode=compose') : '',
|
||||
'S_PM_ACTION' => append_sid('ucp', "i=pm&mode=view&action=view_folder&f=$folder_id" . (($start !== 0) ? "&start=$start" : '')))
|
||||
);
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
|
||||
if ($message_row['message_attachment'] && phpbb::$config['allow_pm_attach'])
|
||||
{
|
||||
if ($auth->acl_get('u_pm_download'))
|
||||
if (phpbb::$acl->acl_get('u_pm_download'))
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ATTACHMENTS_TABLE . "
|
||||
|
@ -143,7 +143,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
|
||||
$user_info['sig'] = '';
|
||||
|
||||
$signature = ($message_row['enable_sig'] && phpbb::$config['allow_sig'] && $auth->acl_get('u_sig') && phpbb::$user->optionget('viewsigs')) ? $user_info['user_sig'] : '';
|
||||
$signature = ($message_row['enable_sig'] && phpbb::$config['allow_sig'] && phpbb::$acl->acl_get('u_sig') && phpbb::$user->optionget('viewsigs')) ? $user_info['user_sig'] : '';
|
||||
|
||||
// End signature parsing, only if needed
|
||||
if ($signature)
|
||||
|
@ -198,19 +198,19 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
'EDITED_MESSAGE' => $l_edited_by,
|
||||
'MESSAGE_ID' => $message_row['msg_id'],
|
||||
|
||||
'U_PM' => (phpbb::$config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid('ucp', 'i=pm&mode=compose&u=' . $author_id) : '',
|
||||
'U_PM' => (phpbb::$config['allow_privmsg'] && phpbb::$acl->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || phpbb::$acl->acl_gets('a_', 'm_') || phpbb::$acl->acl_getf_global('m_'))) ? append_sid('ucp', 'i=pm&mode=compose&u=' . $author_id) : '',
|
||||
'U_WWW' => (!empty($user_info['user_website'])) ? $user_info['user_website'] : '',
|
||||
'U_ICQ' => ($user_info['user_icq']) ? 'http://www.icq.com/people/webmsg.php?to=' . urlencode($user_info['user_icq']) : '',
|
||||
'U_AIM' => ($user_info['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', 'mode=contact&action=aim&u=' . $author_id) : '',
|
||||
'U_AIM' => ($user_info['user_aim'] && phpbb::$acl->acl_get('u_sendim')) ? append_sid('memberlist', 'mode=contact&action=aim&u=' . $author_id) : '',
|
||||
'U_YIM' => ($user_info['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($user_info['user_yim']) . '&.src=pg' : '',
|
||||
'U_MSN' => ($user_info['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', 'mode=contact&action=msnm&u=' . $author_id) : '',
|
||||
'U_JABBER' => ($user_info['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', 'mode=contact&action=jabber&u=' . $author_id) : '',
|
||||
'U_MSN' => ($user_info['user_msnm'] && phpbb::$acl->acl_get('u_sendim')) ? append_sid('memberlist', 'mode=contact&action=msnm&u=' . $author_id) : '',
|
||||
'U_JABBER' => ($user_info['user_jabber'] && phpbb::$acl->acl_get('u_sendim')) ? append_sid('memberlist', 'mode=contact&action=jabber&u=' . $author_id) : '',
|
||||
|
||||
'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_DELETE' => (phpbb::$acl->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_EMAIL' => $user_info['email'],
|
||||
'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=quote&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_EDIT' => (($message_row['message_time'] > time() - (phpbb::$config['pm_edit_time'] * 60) || !phpbb::$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit')) ? "$url&mode=compose&action=edit&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_POST_REPLY_PM' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_QUOTE' => (phpbb::$acl->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=quote&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_EDIT' => (($message_row['message_time'] > time() - (phpbb::$config['pm_edit_time'] * 60) || !phpbb::$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && phpbb::$acl->acl_get('u_pm_edit')) ? "$url&mode=compose&action=edit&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_POST_REPLY_PM' => (phpbb::$acl->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_PREVIOUS_PM' => "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=previous",
|
||||
'U_NEXT_PM' => "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=next",
|
||||
|
||||
|
@ -219,8 +219,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false,
|
||||
'S_SPECIAL_FOLDER' => in_array($folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)),
|
||||
|
||||
'U_PRINT_PM' => (phpbb::$config['print_pm'] && $auth->acl_get('u_pm_printpm')) ? "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=print" : '',
|
||||
'U_FORWARD_PM' => (phpbb::$config['forward_pm'] && $auth->acl_get('u_sendpm') && $auth->acl_get('u_pm_forward')) ? "$url&mode=compose&action=forward&f=$folder_id&p=" . $message_row['msg_id'] : '')
|
||||
'U_PRINT_PM' => (phpbb::$config['print_pm'] && phpbb::$acl->acl_get('u_pm_printpm')) ? "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=print" : '',
|
||||
'U_FORWARD_PM' => (phpbb::$config['forward_pm'] && phpbb::$acl->acl_get('u_sendpm') && phpbb::$acl->acl_get('u_pm_forward')) ? "$url&mode=compose&action=forward&f=$folder_id&p=" . $message_row['msg_id'] : '')
|
||||
);
|
||||
|
||||
// Display not already displayed Attachments for this post, we already parsed them. ;)
|
||||
|
@ -297,9 +297,9 @@ function get_user_information($user_id, $user_row)
|
|||
|
||||
get_user_rank($user_id, $user_row['user_rank'], $user_row['user_posts'], $user_row['rank_title'], $user_row['rank_image'], $user_row['rank_image_src']);
|
||||
|
||||
if (!empty($user_row['user_allow_viewemail']) || $auth->acl_get('a_email'))
|
||||
if (!empty($user_row['user_allow_viewemail']) || phpbb::$acl->acl_get('a_email'))
|
||||
{
|
||||
$user_row['email'] = (phpbb::$config['board_email_form'] && phpbb::$config['email_enable']) ? append_sid('memberlist', "mode=email&u=$user_id") : (((phpbb::$config['board_hide_emails'] && !$auth->acl_get('a_email')) || empty($user_row['user_email'])) ? '' : 'mailto:' . $user_row['user_email']);
|
||||
$user_row['email'] = (phpbb::$config['board_email_form'] && phpbb::$config['email_enable']) ? append_sid('memberlist', "mode=email&u=$user_id") : (((phpbb::$config['board_hide_emails'] && !phpbb::$acl->acl_get('a_email')) || empty($user_row['user_email'])) ? '' : 'mailto:' . $user_row['user_email']);
|
||||
}
|
||||
|
||||
return $user_row;
|
||||
|
|
|
@ -80,7 +80,7 @@ class ucp_prefs
|
|||
'user_allow_pm' => $data['allowpm'],
|
||||
'user_allow_viewemail' => $data['viewemail'],
|
||||
'user_allow_massemail' => $data['massemail'],
|
||||
'user_allow_viewonline' => ($auth->acl_get('u_hideonline')) ? !$data['hideonline'] : phpbb::$user->data['user_allow_viewonline'],
|
||||
'user_allow_viewonline' => (phpbb::$acl->acl_get('u_hideonline')) ? !$data['hideonline'] : phpbb::$user->data['user_allow_viewonline'],
|
||||
'user_notify_type' => $data['notifymethod'],
|
||||
'user_notify_pm' => $data['notifypm'],
|
||||
'user_options' => phpbb::$user->data['user_options'],
|
||||
|
@ -149,7 +149,7 @@ class ucp_prefs
|
|||
'S_LANG_OPTIONS' => language_select($data['lang']),
|
||||
'S_STYLE_OPTIONS' => (phpbb::$config['override_user_style']) ? '' : style_select($data['style']),
|
||||
'S_TZ_OPTIONS' => tz_select($data['tz'], true),
|
||||
'S_CAN_HIDE_ONLINE' => ($auth->acl_get('u_hideonline')) ? true : false,
|
||||
'S_CAN_HIDE_ONLINE' => (phpbb::$acl->acl_get('u_hideonline')) ? true : false,
|
||||
'S_SELECT_NOTIFY' => (phpbb::$config['jab_enable'] && phpbb::$user->data['user_jabber'] && @extension_loaded('xml')) ? true : false)
|
||||
);
|
||||
|
||||
|
@ -198,7 +198,7 @@ class ucp_prefs
|
|||
phpbb::$user->optionset('viewsigs', $data['sigs']);
|
||||
phpbb::$user->optionset('viewavatars', $data['avatars']);
|
||||
|
||||
if ($auth->acl_get('u_chgcensors'))
|
||||
if (phpbb::$acl->acl_get('u_chgcensors'))
|
||||
{
|
||||
phpbb::$user->optionset('viewcensors', $data['wordcensor']);
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ class ucp_prefs
|
|||
'S_AVATARS' => $data['avatars'],
|
||||
'S_DISABLE_CENSORS' => $data['wordcensor'],
|
||||
|
||||
'S_CHANGE_CENSORS' => ($auth->acl_get('u_chgcensors')) ? true : false,
|
||||
'S_CHANGE_CENSORS' => (phpbb::$acl->acl_get('u_chgcensors')) ? true : false,
|
||||
|
||||
'S_TOPIC_SORT_DAYS' => $s_limit_topic_days,
|
||||
'S_TOPIC_SORT_KEY' => $s_sort_topic_key,
|
||||
|
|
|
@ -66,7 +66,7 @@ class ucp_profile
|
|||
'email_confirm' => array('string', true, 6, 60),
|
||||
);
|
||||
|
||||
if ($auth->acl_get('u_chgname') && phpbb::$config['allow_namechange'])
|
||||
if (phpbb::$acl->acl_get('u_chgname') && phpbb::$config['allow_namechange'])
|
||||
{
|
||||
$check_ary['username'] = array(
|
||||
array('string', false, phpbb::$config['min_name_chars'], phpbb::$config['max_name_chars']),
|
||||
|
@ -76,23 +76,23 @@ class ucp_profile
|
|||
|
||||
$error = validate_data($data, $check_ary);
|
||||
|
||||
if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && $data['password_confirm'] != $data['new_password'])
|
||||
if (phpbb::$acl->acl_get('u_chgpasswd') && $data['new_password'] && $data['password_confirm'] != $data['new_password'])
|
||||
{
|
||||
$error[] = 'NEW_PASSWORD_ERROR';
|
||||
}
|
||||
|
||||
if (($data['new_password'] || ($auth->acl_get('u_chgemail') && $data['email'] != phpbb::$user->data['user_email']) || ($data['username'] != phpbb::$user->data['username'] && $auth->acl_get('u_chgname') && phpbb::$config['allow_namechange'])) && !phpbb_check_hash($data['cur_password'], phpbb::$user->data['user_password']))
|
||||
if (($data['new_password'] || (phpbb::$acl->acl_get('u_chgemail') && $data['email'] != phpbb::$user->data['user_email']) || ($data['username'] != phpbb::$user->data['username'] && phpbb::$acl->acl_get('u_chgname') && phpbb::$config['allow_namechange'])) && !phpbb_check_hash($data['cur_password'], phpbb::$user->data['user_password']))
|
||||
{
|
||||
$error[] = 'CUR_PASSWORD_ERROR';
|
||||
}
|
||||
|
||||
// Only check the new password against the previous password if there have been no errors
|
||||
if (!sizeof($error) && $auth->acl_get('u_chgpasswd') && $data['new_password'] && phpbb_check_hash($data['new_password'], phpbb::$user->data['user_password']))
|
||||
if (!sizeof($error) && phpbb::$acl->acl_get('u_chgpasswd') && $data['new_password'] && phpbb_check_hash($data['new_password'], phpbb::$user->data['user_password']))
|
||||
{
|
||||
$error[] = 'SAME_PASSWORD_ERROR';
|
||||
}
|
||||
|
||||
if ($auth->acl_get('u_chgemail') && $data['email'] != phpbb::$user->data['user_email'] && $data['email_confirm'] != $data['email'])
|
||||
if (phpbb::$acl->acl_get('u_chgemail') && $data['email'] != phpbb::$user->data['user_email'] && $data['email_confirm'] != $data['email'])
|
||||
{
|
||||
$error[] = 'NEW_EMAIL_ERROR';
|
||||
}
|
||||
|
@ -105,26 +105,26 @@ class ucp_profile
|
|||
if (!sizeof($error))
|
||||
{
|
||||
$sql_ary = array(
|
||||
'username' => ($auth->acl_get('u_chgname') && phpbb::$config['allow_namechange']) ? $data['username'] : phpbb::$user->data['username'],
|
||||
'username_clean' => ($auth->acl_get('u_chgname') && phpbb::$config['allow_namechange']) ? utf8_clean_string($data['username']) : phpbb::$user->data['username_clean'],
|
||||
'user_email' => ($auth->acl_get('u_chgemail')) ? $data['email'] : phpbb::$user->data['user_email'],
|
||||
'user_email_hash' => ($auth->acl_get('u_chgemail')) ? hexdec(crc32($data['email']) . strlen($data['email'])) : phpbb::$user->data['user_email_hash'],
|
||||
'user_password' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? phpbb_hash($data['new_password']) : phpbb::$user->data['user_password'],
|
||||
'user_passchg' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? time() : 0,
|
||||
'username' => (phpbb::$acl->acl_get('u_chgname') && phpbb::$config['allow_namechange']) ? $data['username'] : phpbb::$user->data['username'],
|
||||
'username_clean' => (phpbb::$acl->acl_get('u_chgname') && phpbb::$config['allow_namechange']) ? utf8_clean_string($data['username']) : phpbb::$user->data['username_clean'],
|
||||
'user_email' => (phpbb::$acl->acl_get('u_chgemail')) ? $data['email'] : phpbb::$user->data['user_email'],
|
||||
'user_email_hash' => (phpbb::$acl->acl_get('u_chgemail')) ? hexdec(crc32($data['email']) . strlen($data['email'])) : phpbb::$user->data['user_email_hash'],
|
||||
'user_password' => (phpbb::$acl->acl_get('u_chgpasswd') && $data['new_password']) ? phpbb_hash($data['new_password']) : phpbb::$user->data['user_password'],
|
||||
'user_passchg' => (phpbb::$acl->acl_get('u_chgpasswd') && $data['new_password']) ? time() : 0,
|
||||
);
|
||||
|
||||
if ($auth->acl_get('u_chgname') && phpbb::$config['allow_namechange'] && $data['username'] != phpbb::$user->data['username'])
|
||||
if (phpbb::$acl->acl_get('u_chgname') && phpbb::$config['allow_namechange'] && $data['username'] != phpbb::$user->data['username'])
|
||||
{
|
||||
add_log('user', phpbb::$user->data['user_id'], 'LOG_USER_UPDATE_NAME', phpbb::$user->data['username'], $data['username']);
|
||||
}
|
||||
|
||||
if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && !phpbb_check_hash($data['new_password'], phpbb::$user->data['user_password']))
|
||||
if (phpbb::$acl->acl_get('u_chgpasswd') && $data['new_password'] && !phpbb_check_hash($data['new_password'], phpbb::$user->data['user_password']))
|
||||
{
|
||||
phpbb::$user->reset_login_keys();
|
||||
add_log('user', phpbb::$user->data['user_id'], 'LOG_USER_NEW_PASSWORD', $data['username']);
|
||||
}
|
||||
|
||||
if ($auth->acl_get('u_chgemail') && $data['email'] != phpbb::$user->data['user_email'])
|
||||
if (phpbb::$acl->acl_get('u_chgemail') && $data['email'] != phpbb::$user->data['user_email'])
|
||||
{
|
||||
add_log('user', phpbb::$user->data['user_id'], 'LOG_USER_UPDATE_EMAIL', $data['username'], phpbb::$user->data['user_email'], $data['email']);
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ class ucp_profile
|
|||
if (phpbb::$config['require_activation'] == USER_ACTIVATION_ADMIN)
|
||||
{
|
||||
// Grab an array of user_id's with a_user permissions ... these users can activate a user
|
||||
$admin_ary = $auth->acl_get_list(false, 'a_user', false);
|
||||
$admin_ary = phpbb::$acl->acl_get_list(false, 'a_user', false);
|
||||
$admin_ary = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array();
|
||||
|
||||
// Also include founders
|
||||
|
@ -215,7 +215,7 @@ class ucp_profile
|
|||
}
|
||||
|
||||
// Need to update config, forum, topic, posting, messages, etc.
|
||||
if ($data['username'] != phpbb::$user->data['username'] && $auth->acl_get('u_chgname') && phpbb::$config['allow_namechange'])
|
||||
if ($data['username'] != phpbb::$user->data['username'] && phpbb::$acl->acl_get('u_chgname') && phpbb::$config['allow_namechange'])
|
||||
{
|
||||
user_update_name(phpbb::$user->data['username'], $data['username']);
|
||||
}
|
||||
|
@ -254,10 +254,10 @@ class ucp_profile
|
|||
'L_USERNAME_EXPLAIN' => sprintf(phpbb::$user->lang[phpbb::$config['allow_name_chars'] . '_EXPLAIN'], phpbb::$config['min_name_chars'], phpbb::$config['max_name_chars']),
|
||||
'L_CHANGE_PASSWORD_EXPLAIN' => sprintf(phpbb::$user->lang[phpbb::$config['pass_complex'] . '_EXPLAIN'], phpbb::$config['min_pass_chars'], phpbb::$config['max_pass_chars']),
|
||||
|
||||
'S_FORCE_PASSWORD' => ($auth->acl_get('u_chgpasswd') && phpbb::$config['chg_passforce'] && phpbb::$user->data['user_passchg'] < time() - (phpbb::$config['chg_passforce'] * 86400)) ? true : false,
|
||||
'S_CHANGE_USERNAME' => (phpbb::$config['allow_namechange'] && $auth->acl_get('u_chgname')) ? true : false,
|
||||
'S_CHANGE_EMAIL' => ($auth->acl_get('u_chgemail')) ? true : false,
|
||||
'S_CHANGE_PASSWORD' => ($auth->acl_get('u_chgpasswd')) ? true : false)
|
||||
'S_FORCE_PASSWORD' => (phpbb::$acl->acl_get('u_chgpasswd') && phpbb::$config['chg_passforce'] && phpbb::$user->data['user_passchg'] < time() - (phpbb::$config['chg_passforce'] * 86400)) ? true : false,
|
||||
'S_CHANGE_USERNAME' => (phpbb::$config['allow_namechange'] && phpbb::$acl->acl_get('u_chgname')) ? true : false,
|
||||
'S_CHANGE_EMAIL' => (phpbb::$acl->acl_get('u_chgemail')) ? true : false,
|
||||
'S_CHANGE_PASSWORD' => (phpbb::$acl->acl_get('u_chgpasswd')) ? true : false)
|
||||
);
|
||||
break;
|
||||
|
||||
|
@ -464,7 +464,7 @@ class ucp_profile
|
|||
|
||||
case 'signature':
|
||||
|
||||
if (!$auth->acl_get('u_sig'))
|
||||
if (!phpbb::$acl->acl_get('u_sig'))
|
||||
{
|
||||
trigger_error('NO_AUTH_SIGNATURE');
|
||||
}
|
||||
|
@ -570,7 +570,7 @@ class ucp_profile
|
|||
$avatar_select = basename(request_var('avatar_select', ''));
|
||||
$category = basename(request_var('category', ''));
|
||||
|
||||
$can_upload = (phpbb::$config['allow_avatar_upload'] && file_exists(PHPBB_ROOT_PATH . phpbb::$config['avatar_path']) && @is_writable(PHPBB_ROOT_PATH . phpbb::$config['avatar_path']) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false;
|
||||
$can_upload = (phpbb::$config['allow_avatar_upload'] && file_exists(PHPBB_ROOT_PATH . phpbb::$config['avatar_path']) && @is_writable(PHPBB_ROOT_PATH . phpbb::$config['avatar_path']) && phpbb::$acl->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false;
|
||||
|
||||
add_form_key('ucp_avatar');
|
||||
|
||||
|
@ -605,13 +605,13 @@ class ucp_profile
|
|||
'L_AVATAR_EXPLAIN' => sprintf(phpbb::$user->lang['AVATAR_EXPLAIN'], phpbb::$config['avatar_max_width'], phpbb::$config['avatar_max_height'], phpbb::$config['avatar_filesize'] / 1024),
|
||||
));
|
||||
|
||||
if ($display_gallery && $auth->acl_get('u_chgavatar') && phpbb::$config['allow_avatar_local'])
|
||||
if ($display_gallery && phpbb::$acl->acl_get('u_chgavatar') && phpbb::$config['allow_avatar_local'])
|
||||
{
|
||||
avatar_gallery($category, $avatar_select, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
$avatars_enabled = ($can_upload || ($auth->acl_get('u_chgavatar') && (phpbb::$config['allow_avatar_local'] || phpbb::$config['allow_avatar_remote']))) ? true : false;
|
||||
$avatars_enabled = ($can_upload || (phpbb::$acl->acl_get('u_chgavatar') && (phpbb::$config['allow_avatar_local'] || phpbb::$config['allow_avatar_remote']))) ? true : false;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'AVATAR_WIDTH' => request_var('width', phpbb::$user->data['user_avatar_width']),
|
||||
|
@ -620,8 +620,8 @@ class ucp_profile
|
|||
'S_AVATARS_ENABLED' => $avatars_enabled,
|
||||
'S_UPLOAD_AVATAR_FILE' => $can_upload,
|
||||
'S_UPLOAD_AVATAR_URL' => $can_upload,
|
||||
'S_LINK_AVATAR' => ($auth->acl_get('u_chgavatar') && phpbb::$config['allow_avatar_remote']) ? true : false,
|
||||
'S_DISPLAY_GALLERY' => ($auth->acl_get('u_chgavatar') && phpbb::$config['allow_avatar_local']) ? true : false)
|
||||
'S_LINK_AVATAR' => (phpbb::$acl->acl_get('u_chgavatar') && phpbb::$config['allow_avatar_remote']) ? true : false,
|
||||
'S_DISPLAY_GALLERY' => (phpbb::$acl->acl_get('u_chgavatar') && phpbb::$config['allow_avatar_local']) ? true : false)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -369,7 +369,7 @@ class ucp_register
|
|||
if (phpbb::$config['require_activation'] == USER_ACTIVATION_ADMIN)
|
||||
{
|
||||
// Grab an array of user_id's with a_user permissions ... these users can activate a user
|
||||
$admin_ary = $auth->acl_get_list(false, 'a_user', false);
|
||||
$admin_ary = phpbb::$acl->acl_get_list(false, 'a_user', false);
|
||||
$admin_ary = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array();
|
||||
|
||||
// Also include founders
|
||||
|
|
|
@ -117,7 +117,7 @@ class ucp_resend
|
|||
if (phpbb::$config['require_activation'] == USER_ACTIVATION_ADMIN)
|
||||
{
|
||||
// Grab an array of user_id's with a_user permissions ... these users can activate a user
|
||||
$admin_ary = $auth->acl_get_list(false, 'a_user', false);
|
||||
$admin_ary = phpbb::$acl->acl_get_list(false, 'a_user', false);
|
||||
|
||||
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
|
||||
FROM ' . USERS_TABLE . '
|
||||
|
|
|
@ -135,7 +135,7 @@ class ucp_zebra
|
|||
if ($mode == 'foes')
|
||||
{
|
||||
$perms = array();
|
||||
foreach ($auth->acl_get_list($user_id_ary, array('a_', 'm_')) as $forum_id => $forum_ary)
|
||||
foreach (phpbb::$acl->acl_get_list($user_id_ary, array('a_', 'm_')) as $forum_id => $forum_ary)
|
||||
{
|
||||
foreach ($forum_ary as $auth_option => $user_ary)
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@ include(PHPBB_ROOT_PATH . 'includes/message_parser.' . PHP_EXT);
|
|||
|
||||
// Start session management
|
||||
phpbb::$user->session_begin();
|
||||
$auth->acl(phpbb::$user->data);
|
||||
phpbb::$acl->init(phpbb::$user->data);
|
||||
|
||||
|
||||
// Grab only parameters needed here
|
||||
|
@ -177,7 +177,7 @@ if (phpbb::$user->is_bot)
|
|||
}
|
||||
|
||||
// Is the user able to read within this forum?
|
||||
if (!$auth->acl_get('f_read', $forum_id))
|
||||
if (!phpbb::$acl->acl_get('f_read', $forum_id))
|
||||
{
|
||||
if (phpbb::$user->data['user_id'] != ANONYMOUS)
|
||||
{
|
||||
|
@ -193,14 +193,14 @@ $is_authed = false;
|
|||
switch ($mode)
|
||||
{
|
||||
case 'post':
|
||||
if ($auth->acl_get('f_post', $forum_id))
|
||||
if (phpbb::$acl->acl_get('f_post', $forum_id))
|
||||
{
|
||||
$is_authed = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'bump':
|
||||
if ($auth->acl_get('f_bump', $forum_id))
|
||||
if (phpbb::$acl->acl_get('f_bump', $forum_id))
|
||||
{
|
||||
$is_authed = true;
|
||||
}
|
||||
|
@ -213,21 +213,21 @@ switch ($mode)
|
|||
// no break;
|
||||
|
||||
case 'reply':
|
||||
if ($auth->acl_get('f_reply', $forum_id))
|
||||
if (phpbb::$acl->acl_get('f_reply', $forum_id))
|
||||
{
|
||||
$is_authed = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'edit':
|
||||
if (phpbb::$user->is_registered && $auth->acl_gets('f_edit', 'm_edit', $forum_id))
|
||||
if (phpbb::$user->is_registered && phpbb::$acl->acl_gets('f_edit', 'm_edit', $forum_id))
|
||||
{
|
||||
$is_authed = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
if (phpbb::$user->is_registered && $auth->acl_gets('f_delete', 'm_delete', $forum_id))
|
||||
if (phpbb::$user->is_registered && phpbb::$acl->acl_gets('f_delete', 'm_delete', $forum_id))
|
||||
{
|
||||
$is_authed = true;
|
||||
}
|
||||
|
@ -253,14 +253,14 @@ if ($post_data['forum_type'] != FORUM_POST && in_array($mode, array('post', 'bum
|
|||
}
|
||||
|
||||
// Forum/Topic locked?
|
||||
if (($post_data['forum_status'] == ITEM_LOCKED || (isset($post_data['topic_status']) && $post_data['topic_status'] == ITEM_LOCKED)) && !$auth->acl_get('m_edit', $forum_id))
|
||||
if (($post_data['forum_status'] == ITEM_LOCKED || (isset($post_data['topic_status']) && $post_data['topic_status'] == ITEM_LOCKED)) && !phpbb::$acl->acl_get('m_edit', $forum_id))
|
||||
{
|
||||
trigger_error(($post_data['forum_status'] == ITEM_LOCKED) ? 'FORUM_LOCKED' : 'TOPIC_LOCKED');
|
||||
}
|
||||
|
||||
// Can we edit this post ... if we're a moderator with rights then always yes
|
||||
// else it depends on editing times, lock status and if we're the correct user
|
||||
if ($mode == 'edit' && !$auth->acl_get('m_edit', $forum_id))
|
||||
if ($mode == 'edit' && !phpbb::$acl->acl_get('m_edit', $forum_id))
|
||||
{
|
||||
if (phpbb::$user->data['user_id'] != $post_data['poster_id'])
|
||||
{
|
||||
|
@ -433,7 +433,7 @@ if ($mode != 'edit')
|
|||
$post_data['enable_magic_url'] = $post_data['drafts'] = false;
|
||||
|
||||
// User own some drafts?
|
||||
if (phpbb::$user->is_registered && $auth->acl_get('u_savedrafts') && ($mode == 'reply' || $mode == 'post' || $mode == 'quote'))
|
||||
if (phpbb::$user->is_registered && phpbb::$acl->acl_get('u_savedrafts') && ($mode == 'reply' || $mode == 'post' || $mode == 'quote'))
|
||||
{
|
||||
$sql = 'SELECT draft_id
|
||||
FROM ' . DRAFTS_TABLE . '
|
||||
|
@ -471,15 +471,15 @@ if ($mode == 'edit' && $post_data['bbcode_uid'])
|
|||
}
|
||||
|
||||
// HTML, BBCode, Smilies, Images and Flash status
|
||||
$bbcode_status = (phpbb::$config['allow_bbcode'] && $auth->acl_get('f_bbcode', $forum_id)) ? true : false;
|
||||
$smilies_status = ($bbcode_status && phpbb::$config['allow_smilies'] && $auth->acl_get('f_smilies', $forum_id)) ? true : false;
|
||||
$img_status = ($bbcode_status && $auth->acl_get('f_img', $forum_id)) ? true : false;
|
||||
$bbcode_status = (phpbb::$config['allow_bbcode'] && phpbb::$acl->acl_get('f_bbcode', $forum_id)) ? true : false;
|
||||
$smilies_status = ($bbcode_status && phpbb::$config['allow_smilies'] && phpbb::$acl->acl_get('f_smilies', $forum_id)) ? true : false;
|
||||
$img_status = ($bbcode_status && phpbb::$acl->acl_get('f_img', $forum_id)) ? true : false;
|
||||
$url_status = (phpbb::$config['allow_post_links']) ? true : false;
|
||||
$flash_status = ($bbcode_status && $auth->acl_get('f_flash', $forum_id) && phpbb::$config['allow_post_flash']) ? true : false;
|
||||
$quote_status = ($auth->acl_get('f_reply', $forum_id)) ? true : false;
|
||||
$flash_status = ($bbcode_status && phpbb::$acl->acl_get('f_flash', $forum_id) && phpbb::$config['allow_post_flash']) ? true : false;
|
||||
$quote_status = (phpbb::$acl->acl_get('f_reply', $forum_id)) ? true : false;
|
||||
|
||||
// Save Draft
|
||||
if ($save && phpbb::$user->is_registered && $auth->acl_get('u_savedrafts') && ($mode == 'reply' || $mode == 'post' || $mode == 'quote'))
|
||||
if ($save && phpbb::$user->is_registered && phpbb::$acl->acl_get('u_savedrafts') && ($mode == 'reply' || $mode == 'post' || $mode == 'quote'))
|
||||
{
|
||||
$subject = utf8_normalize_nfc(request_var('subject', '', true));
|
||||
$subject = (!$subject && $mode != 'post') ? $post_data['topic_title'] : $subject;
|
||||
|
@ -541,7 +541,7 @@ if ($save && phpbb::$user->is_registered && $auth->acl_get('u_savedrafts') && ($
|
|||
}
|
||||
|
||||
// Load requested Draft
|
||||
if ($draft_id && ($mode == 'reply' || $mode == 'quote' || $mode == 'post') && phpbb::$user->is_registered && $auth->acl_get('u_savedrafts'))
|
||||
if ($draft_id && ($mode == 'reply' || $mode == 'quote' || $mode == 'post') && phpbb::$user->is_registered && phpbb::$acl->acl_get('u_savedrafts'))
|
||||
{
|
||||
$sql = 'SELECT draft_subject, draft_message
|
||||
FROM ' . DRAFTS_TABLE . "
|
||||
|
@ -581,7 +581,7 @@ if ($submit || $preview || $refresh)
|
|||
$message_parser->message = utf8_normalize_nfc(request_var('message', '', true));
|
||||
|
||||
$post_data['username'] = utf8_normalize_nfc(request_var('username', $post_data['username'], true));
|
||||
$post_data['post_edit_reason'] = (!empty($edit_reason) && $mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? $edit_reason : '';
|
||||
$post_data['post_edit_reason'] = (!empty($edit_reason) && $mode == 'edit' && phpbb::$acl->acl_get('m_edit', $forum_id)) ? $edit_reason : '';
|
||||
|
||||
$post_data['orig_topic_type'] = $post_data['topic_type'];
|
||||
$post_data['topic_type'] = request_var('topic_type', (($mode != 'post') ? (int) $post_data['topic_type'] : POST_NORMAL));
|
||||
|
@ -591,7 +591,7 @@ if ($submit || $preview || $refresh)
|
|||
$post_data['enable_bbcode'] = (!$bbcode_status || phpbb_request::is_set_post('disable_bbcode')) ? false : true;
|
||||
$post_data['enable_smilies'] = (!$smilies_status || phpbb_request::is_set_post('disable_smilies')) ? false : true;
|
||||
$post_data['enable_urls'] = phpbb_request::is_set_post('disable_magic_url');
|
||||
$post_data['enable_sig'] = (!phpbb::$config['allow_sig'] || !$auth->acl_get('f_sigs', $forum_id) || !$auth->acl_get('u_sig')) ? false : ((phpbb_request::is_set_post('attach_sig') && phpbb::$user->is_registered) ? true : false);
|
||||
$post_data['enable_sig'] = (!phpbb::$config['allow_sig'] || !phpbb::$acl->acl_get('f_sigs', $forum_id) || !phpbb::$acl->acl_get('u_sig')) ? false : ((phpbb_request::is_set_post('attach_sig') && phpbb::$user->is_registered) ? true : false);
|
||||
|
||||
if (phpbb::$config['allow_topic_notify'] && phpbb::$user->is_registered)
|
||||
{
|
||||
|
@ -618,7 +618,7 @@ if ($submit || $preview || $refresh)
|
|||
|
||||
// Delete Poll
|
||||
if ($poll_delete && $mode == 'edit' && sizeof($post_data['poll_options']) &&
|
||||
((!$post_data['poll_last_vote'] && $post_data['poster_id'] == phpbb::$user->data['user_id'] && $auth->acl_get('f_delete', $forum_id)) || $auth->acl_get('m_delete', $forum_id)))
|
||||
((!$post_data['poll_last_vote'] && $post_data['poster_id'] == phpbb::$user->data['user_id'] && phpbb::$acl->acl_get('f_delete', $forum_id)) || phpbb::$acl->acl_get('m_delete', $forum_id)))
|
||||
{
|
||||
if ($submit && check_form_key('posting'))
|
||||
{
|
||||
|
@ -654,7 +654,7 @@ if ($submit || $preview || $refresh)
|
|||
$post_data['poll_length'] = request_var('poll_length', 0);
|
||||
$post_data['poll_option_text'] = utf8_normalize_nfc(request_var('poll_option_text', '', true));
|
||||
$post_data['poll_max_options'] = request_var('poll_max_options', 1);
|
||||
$post_data['poll_vote_change'] = ($auth->acl_get('f_votechg', $forum_id) && phpbb_request::is_set_post('poll_vote_change')) ? 1 : 0;
|
||||
$post_data['poll_vote_change'] = (phpbb::$acl->acl_get('f_votechg', $forum_id) && phpbb_request::is_set_post('poll_vote_change')) ? 1 : 0;
|
||||
}
|
||||
|
||||
// If replying/quoting and last post id has changed
|
||||
|
@ -706,7 +706,7 @@ if ($submit || $preview || $refresh)
|
|||
$message_parser->bbcode_bitfield = $post_data['bbcode_bitfield'];
|
||||
}
|
||||
|
||||
if ($mode != 'edit' && !$preview && !$refresh && phpbb::$config['flood_interval'] && !$auth->acl_get('f_ignoreflood', $forum_id))
|
||||
if ($mode != 'edit' && !$preview && !$refresh && phpbb::$config['flood_interval'] && !phpbb::$acl->acl_get('f_ignoreflood', $forum_id))
|
||||
{
|
||||
// Flood check
|
||||
$last_post_time = 0;
|
||||
|
@ -775,8 +775,8 @@ if ($submit || $preview || $refresh)
|
|||
$post_data['poll_last_vote'] = (isset($post_data['poll_last_vote'])) ? $post_data['poll_last_vote'] : 0;
|
||||
|
||||
if ($post_data['poll_option_text'] &&
|
||||
($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_post_id']/* && (!$post_data['poll_last_vote'] || $auth->acl_get('m_edit', $forum_id))*/))
|
||||
&& $auth->acl_get('f_poll', $forum_id))
|
||||
($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_post_id']/* && (!$post_data['poll_last_vote'] || phpbb::$acl->acl_get('m_edit', $forum_id))*/))
|
||||
&& phpbb::$acl->acl_get('f_poll', $forum_id))
|
||||
{
|
||||
$poll = array(
|
||||
'poll_title' => $post_data['poll_title'],
|
||||
|
@ -827,7 +827,7 @@ if ($submit || $preview || $refresh)
|
|||
break;
|
||||
}
|
||||
|
||||
if (!$auth->acl_get($auth_option, $forum_id))
|
||||
if (!phpbb::$acl->acl_get($auth_option, $forum_id))
|
||||
{
|
||||
// There is a special case where a user edits his post whereby the topic type got changed by an admin/mod.
|
||||
// Another case would be a mod not having sticky permissions for example but edit permissions.
|
||||
|
@ -883,7 +883,7 @@ if ($submit || $preview || $refresh)
|
|||
$forum_type = (int) $db->sql_fetchfield('forum_type');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($forum_type != FORUM_POST || !$auth->acl_get('f_post', $to_forum_id))
|
||||
if ($forum_type != FORUM_POST || !phpbb::$acl->acl_get('f_post', $to_forum_id))
|
||||
{
|
||||
$to_forum_id = 0;
|
||||
}
|
||||
|
@ -903,7 +903,7 @@ if ($submit || $preview || $refresh)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!$auth->acl_get('f_post', $to_forum_id))
|
||||
if (!phpbb::$acl->acl_get('f_post', $to_forum_id))
|
||||
{
|
||||
// This will only be triggered if the user tried to trick the forum.
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
|
@ -918,7 +918,7 @@ if ($submit || $preview || $refresh)
|
|||
{
|
||||
// Lock/Unlock Topic
|
||||
$change_topic_status = $post_data['topic_status'];
|
||||
$perm_lock_unlock = ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && phpbb::$user->is_registered && !empty($post_data['topic_poster']) && phpbb::$user->data['user_id'] == $post_data['topic_poster'] && $post_data['topic_status'] == ITEM_UNLOCKED)) ? true : false;
|
||||
$perm_lock_unlock = (phpbb::$acl->acl_get('m_lock', $forum_id) || (phpbb::$acl->acl_get('f_user_lock', $forum_id) && phpbb::$user->is_registered && !empty($post_data['topic_poster']) && phpbb::$user->data['user_id'] == $post_data['topic_poster'] && $post_data['topic_status'] == ITEM_UNLOCKED)) ? true : false;
|
||||
|
||||
if ($post_data['topic_status'] == ITEM_LOCKED && !$topic_lock && $perm_lock_unlock)
|
||||
{
|
||||
|
@ -937,17 +937,17 @@ if ($submit || $preview || $refresh)
|
|||
AND topic_moved_id = 0";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$user_lock = ($auth->acl_get('f_user_lock', $forum_id) && phpbb::$user->is_registered && phpbb::$user->data['user_id'] == $post_data['topic_poster']) ? 'USER_' : '';
|
||||
$user_lock = (phpbb::$acl->acl_get('f_user_lock', $forum_id) && phpbb::$user->is_registered && phpbb::$user->data['user_id'] == $post_data['topic_poster']) ? 'USER_' : '';
|
||||
|
||||
add_log('mod', $forum_id, $topic_id, 'LOG_' . $user_lock . (($change_topic_status == ITEM_LOCKED) ? 'LOCK' : 'UNLOCK'), $post_data['topic_title']);
|
||||
}
|
||||
|
||||
// Lock/Unlock Post Edit
|
||||
if ($mode == 'edit' && $post_data['post_edit_locked'] == ITEM_LOCKED && !$post_lock && $auth->acl_get('m_edit', $forum_id))
|
||||
if ($mode == 'edit' && $post_data['post_edit_locked'] == ITEM_LOCKED && !$post_lock && phpbb::$acl->acl_get('m_edit', $forum_id))
|
||||
{
|
||||
$post_data['post_edit_locked'] = ITEM_UNLOCKED;
|
||||
}
|
||||
else if ($mode == 'edit' && $post_data['post_edit_locked'] == ITEM_UNLOCKED && $post_lock && $auth->acl_get('m_edit', $forum_id))
|
||||
else if ($mode == 'edit' && $post_data['post_edit_locked'] == ITEM_UNLOCKED && $post_lock && phpbb::$acl->acl_get('m_edit', $forum_id))
|
||||
{
|
||||
$post_data['post_edit_locked'] = ITEM_LOCKED;
|
||||
}
|
||||
|
@ -1001,7 +1001,7 @@ if ($submit || $preview || $refresh)
|
|||
$captcha->reset();
|
||||
}
|
||||
// Check the permissions for post approval, as well as the queue trigger where users are put on approval with a post count lower than specified. Moderators are not affected.
|
||||
if (((phpbb::$config['enable_queue_trigger'] && phpbb::$user->data['user_posts'] < phpbb::$config['queue_trigger_posts']) || !$auth->acl_get('f_noapprove', $data['forum_id'])) && !$auth->acl_get('m_approve', $data['forum_id']))
|
||||
if (((phpbb::$config['enable_queue_trigger'] && phpbb::$user->data['user_posts'] < phpbb::$config['queue_trigger_posts']) || !phpbb::$acl->acl_get('f_noapprove', $data['forum_id'])) && !phpbb::$acl->acl_get('m_approve', $data['forum_id']))
|
||||
{
|
||||
meta_refresh(10, $redirect_url);
|
||||
$message = ($mode == 'edit') ? phpbb::$user->lang['POST_EDITED_MOD'] : phpbb::$user->lang['POST_STORED_MOD'];
|
||||
|
@ -1033,7 +1033,7 @@ if (!sizeof($error) && $preview)
|
|||
$preview_signature_bitfield = ($mode == 'edit') ? $post_data['user_sig_bbcode_bitfield'] : phpbb::$user->data['user_sig_bbcode_bitfield'];
|
||||
|
||||
// Signature
|
||||
if ($post_data['enable_sig'] && phpbb::$config['allow_sig'] && $preview_signature && $auth->acl_get('f_sigs', $forum_id))
|
||||
if ($post_data['enable_sig'] && phpbb::$config['allow_sig'] && $preview_signature && phpbb::$acl->acl_get('f_sigs', $forum_id))
|
||||
{
|
||||
$parse_sig = new parse_message($preview_signature);
|
||||
$parse_sig->bbcode_uid = $preview_signature_uid;
|
||||
|
@ -1052,8 +1052,8 @@ if (!sizeof($error) && $preview)
|
|||
$preview_subject = censor_text($post_data['post_subject']);
|
||||
|
||||
// Poll Preview
|
||||
if (!$poll_delete && ($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_post_id']/* && (!$post_data['poll_last_vote'] || $auth->acl_get('m_edit', $forum_id))*/))
|
||||
&& $auth->acl_get('f_poll', $forum_id))
|
||||
if (!$poll_delete && ($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_post_id']/* && (!$post_data['poll_last_vote'] || phpbb::$acl->acl_get('m_edit', $forum_id))*/))
|
||||
&& phpbb::$acl->acl_get('f_poll', $forum_id))
|
||||
{
|
||||
$parse_poll = new parse_message($post_data['poll_title']);
|
||||
$parse_poll->bbcode_uid = $message_parser->bbcode_uid;
|
||||
|
@ -1174,7 +1174,7 @@ if ($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_p
|
|||
}
|
||||
|
||||
$s_topic_icons = false;
|
||||
if ($post_data['enable_icons'] && $auth->acl_get('f_icons', $forum_id))
|
||||
if ($post_data['enable_icons'] && phpbb::$acl->acl_get('f_icons', $forum_id))
|
||||
{
|
||||
$s_topic_icons = posting_gen_topic_icons($mode, $post_data['icon_id']);
|
||||
}
|
||||
|
@ -1238,7 +1238,7 @@ if ($solved_captcha !== false)
|
|||
$s_hidden_fields .= build_hidden_fields($captcha->get_hidden_fields());
|
||||
}
|
||||
|
||||
$form_enctype = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !phpbb::$config['allow_attachments'] || !$auth->acl_get('u_attach') || !$auth->acl_get('f_attach', $forum_id)) ? '' : ' enctype="multipart/form-data"';
|
||||
$form_enctype = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !phpbb::$config['allow_attachments'] || !phpbb::$acl->acl_get('u_attach') || !phpbb::$acl->acl_get('f_attach', $forum_id)) ? '' : ' enctype="multipart/form-data"';
|
||||
add_form_key('posting');
|
||||
|
||||
|
||||
|
@ -1273,27 +1273,27 @@ $template->assign_vars(array(
|
|||
'S_PRIVMSGS' => false,
|
||||
'S_CLOSE_PROGRESS_WINDOW' => phpbb_request::is_set_post('add_file'),
|
||||
'S_EDIT_POST' => ($mode == 'edit') ? true : false,
|
||||
'S_EDIT_REASON' => ($mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? true : false,
|
||||
'S_EDIT_REASON' => ($mode == 'edit' && phpbb::$acl->acl_get('m_edit', $forum_id)) ? true : false,
|
||||
'S_DISPLAY_USERNAME' => (!phpbb::$user->is_registered || ($mode == 'edit' && $post_data['poster_id'] == ANONYMOUS)) ? true : false,
|
||||
'S_SHOW_TOPIC_ICONS' => $s_topic_icons,
|
||||
'S_DELETE_ALLOWED' => ($mode == 'edit' && (($post_id == $post_data['topic_last_post_id'] && $post_data['poster_id'] == phpbb::$user->data['user_id'] && $auth->acl_get('f_delete', $forum_id) && !$post_data['post_edit_locked'] && ($post_data['post_time'] > time() - (phpbb::$config['edit_time'] * 60) || !phpbb::$config['edit_time'])) || $auth->acl_get('m_delete', $forum_id))) ? true : false,
|
||||
'S_DELETE_ALLOWED' => ($mode == 'edit' && (($post_id == $post_data['topic_last_post_id'] && $post_data['poster_id'] == phpbb::$user->data['user_id'] && phpbb::$acl->acl_get('f_delete', $forum_id) && !$post_data['post_edit_locked'] && ($post_data['post_time'] > time() - (phpbb::$config['edit_time'] * 60) || !phpbb::$config['edit_time'])) || phpbb::$acl->acl_get('m_delete', $forum_id))) ? true : false,
|
||||
'S_BBCODE_ALLOWED' => $bbcode_status,
|
||||
'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '',
|
||||
'S_SMILIES_ALLOWED' => $smilies_status,
|
||||
'S_SMILIES_CHECKED' => ($smilies_checked) ? ' checked="checked"' : '',
|
||||
'S_SIG_ALLOWED' => ($auth->acl_get('f_sigs', $forum_id) && phpbb::$config['allow_sig'] && phpbb::$user->is_registered) ? true : false,
|
||||
'S_SIG_ALLOWED' => (phpbb::$acl->acl_get('f_sigs', $forum_id) && phpbb::$config['allow_sig'] && phpbb::$user->is_registered) ? true : false,
|
||||
'S_SIGNATURE_CHECKED' => ($sig_checked) ? ' checked="checked"' : '',
|
||||
'S_NOTIFY_ALLOWED' => (!phpbb::$user->is_registered || ($mode == 'edit' && phpbb::$user->data['user_id'] != $post_data['poster_id']) || !phpbb::$config['allow_topic_notify'] || !phpbb::$config['email_enable']) ? false : true,
|
||||
'S_NOTIFY_CHECKED' => ($notify_checked) ? ' checked="checked"' : '',
|
||||
'S_LOCK_TOPIC_ALLOWED' => (($mode == 'edit' || $mode == 'reply' || $mode == 'quote') && ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && phpbb::$user->is_registered && !empty($post_data['topic_poster']) && phpbb::$user->data['user_id'] == $post_data['topic_poster'] && $post_data['topic_status'] == ITEM_UNLOCKED))) ? true : false,
|
||||
'S_LOCK_TOPIC_ALLOWED' => (($mode == 'edit' || $mode == 'reply' || $mode == 'quote') && (phpbb::$acl->acl_get('m_lock', $forum_id) || (phpbb::$acl->acl_get('f_user_lock', $forum_id) && phpbb::$user->is_registered && !empty($post_data['topic_poster']) && phpbb::$user->data['user_id'] == $post_data['topic_poster'] && $post_data['topic_status'] == ITEM_UNLOCKED))) ? true : false,
|
||||
'S_LOCK_TOPIC_CHECKED' => ($lock_topic_checked) ? ' checked="checked"' : '',
|
||||
'S_LOCK_POST_ALLOWED' => ($mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? true : false,
|
||||
'S_LOCK_POST_ALLOWED' => ($mode == 'edit' && phpbb::$acl->acl_get('m_edit', $forum_id)) ? true : false,
|
||||
'S_LOCK_POST_CHECKED' => ($lock_post_checked) ? ' checked="checked"' : '',
|
||||
'S_LINKS_ALLOWED' => $url_status,
|
||||
'S_MAGIC_URL_CHECKED' => ($urls_checked) ? ' checked="checked"' : '',
|
||||
'S_TYPE_TOGGLE' => $topic_type_toggle,
|
||||
'S_SAVE_ALLOWED' => ($auth->acl_get('u_savedrafts') && phpbb::$user->is_registered && $mode != 'edit') ? true : false,
|
||||
'S_HAS_DRAFTS' => ($auth->acl_get('u_savedrafts') && phpbb::$user->is_registered && $post_data['drafts']) ? true : false,
|
||||
'S_SAVE_ALLOWED' => (phpbb::$acl->acl_get('u_savedrafts') && phpbb::$user->is_registered && $mode != 'edit') ? true : false,
|
||||
'S_HAS_DRAFTS' => (phpbb::$acl->acl_get('u_savedrafts') && phpbb::$user->is_registered && $post_data['drafts']) ? true : false,
|
||||
'S_FORM_ENCTYPE' => $form_enctype,
|
||||
|
||||
'S_BBCODE_IMG' => $img_status,
|
||||
|
@ -1309,13 +1309,13 @@ $template->assign_vars(array(
|
|||
display_custom_bbcodes();
|
||||
|
||||
// Poll entry
|
||||
if (($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_post_id']/* && (!$post_data['poll_last_vote'] || $auth->acl_get('m_edit', $forum_id))*/))
|
||||
&& $auth->acl_get('f_poll', $forum_id))
|
||||
if (($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_post_id']/* && (!$post_data['poll_last_vote'] || phpbb::$acl->acl_get('m_edit', $forum_id))*/))
|
||||
&& phpbb::$acl->acl_get('f_poll', $forum_id))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_SHOW_POLL_BOX' => true,
|
||||
'S_POLL_VOTE_CHANGE' => ($auth->acl_get('f_votechg', $forum_id)),
|
||||
'S_POLL_DELETE' => ($mode == 'edit' && sizeof($post_data['poll_options']) && ((!$post_data['poll_last_vote'] && $post_data['poster_id'] == phpbb::$user->data['user_id'] && $auth->acl_get('f_delete', $forum_id)) || $auth->acl_get('m_delete', $forum_id))),
|
||||
'S_POLL_VOTE_CHANGE' => (phpbb::$acl->acl_get('f_votechg', $forum_id)),
|
||||
'S_POLL_DELETE' => ($mode == 'edit' && sizeof($post_data['poll_options']) && ((!$post_data['poll_last_vote'] && $post_data['poster_id'] == phpbb::$user->data['user_id'] && phpbb::$acl->acl_get('f_delete', $forum_id)) || phpbb::$acl->acl_get('m_delete', $forum_id))),
|
||||
'S_POLL_DELETE_CHECKED' => (!empty($poll_delete)) ? true : false,
|
||||
|
||||
'L_POLL_OPTIONS_EXPLAIN' => sprintf(phpbb::$user->lang['POLL_OPTIONS_' . (($mode == 'edit') ? 'EDIT_' : '') . 'EXPLAIN'], phpbb::$config['max_poll_options']),
|
||||
|
@ -1329,7 +1329,7 @@ if (($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_
|
|||
}
|
||||
|
||||
// Show attachment box for adding attachments if true
|
||||
$allowed = ($auth->acl_get('f_attach', $forum_id) && $auth->acl_get('u_attach') && phpbb::$config['allow_attachments'] && $form_enctype);
|
||||
$allowed = (phpbb::$acl->acl_get('f_attach', $forum_id) && phpbb::$acl->acl_get('u_attach') && phpbb::$config['allow_attachments'] && $form_enctype);
|
||||
|
||||
// Attachment entry
|
||||
posting_gen_attachment_entry($attachment_data, $filename_data, $allowed);
|
||||
|
@ -1383,7 +1383,7 @@ function upload_popup($forum_style = 0)
|
|||
function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data)
|
||||
{
|
||||
// If moderator removing post or user itself removing post, present a confirmation screen
|
||||
if ($auth->acl_get('m_delete', $forum_id) || ($post_data['poster_id'] == phpbb::$user->data['user_id'] && phpbb::$user->is_registered && $auth->acl_get('f_delete', $forum_id) && $post_id == $post_data['topic_last_post_id'] && !$post_data['post_edit_locked'] && ($post_data['post_time'] > time() - (phpbb::$config['edit_time'] * 60) || !phpbb::$config['edit_time'])))
|
||||
if (phpbb::$acl->acl_get('m_delete', $forum_id) || ($post_data['poster_id'] == phpbb::$user->data['user_id'] && phpbb::$user->is_registered && phpbb::$acl->acl_get('f_delete', $forum_id) && $post_id == $post_data['topic_last_post_id'] && !$post_data['post_edit_locked'] && ($post_data['post_time'] > time() - (phpbb::$config['edit_time'] * 60) || !phpbb::$config['edit_time'])))
|
||||
{
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
'p' => $post_id,
|
||||
|
@ -1434,12 +1434,12 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data)
|
|||
}
|
||||
|
||||
// If we are here the user is not able to delete - present the correct error message
|
||||
if ($post_data['poster_id'] != phpbb::$user->data['user_id'] && $auth->acl_get('f_delete', $forum_id))
|
||||
if ($post_data['poster_id'] != phpbb::$user->data['user_id'] && phpbb::$acl->acl_get('f_delete', $forum_id))
|
||||
{
|
||||
trigger_error('DELETE_OWN_POSTS');
|
||||
}
|
||||
|
||||
if ($post_data['poster_id'] == phpbb::$user->data['user_id'] && $auth->acl_get('f_delete', $forum_id) && $post_id != $post_data['topic_last_post_id'])
|
||||
if ($post_data['poster_id'] == phpbb::$user->data['user_id'] && phpbb::$acl->acl_get('f_delete', $forum_id) && $post_id != $post_data['topic_last_post_id'])
|
||||
{
|
||||
trigger_error('CANNOT_DELETE_REPLIED');
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ include(PHPBB_ROOT_PATH . 'includes/functions_display.' . PHP_EXT);
|
|||
|
||||
// Start session management
|
||||
phpbb::$user->session_begin();
|
||||
$auth->acl(phpbb::$user->data);
|
||||
phpbb::$acl->init(phpbb::$user->data);
|
||||
phpbb::$user->setup('mcp');
|
||||
|
||||
$forum_id = request_var('f', 0);
|
||||
|
@ -77,7 +77,7 @@ $acl_check_ary = array('f_list' => 'POST_NOT_EXIST', 'f_read' => 'USER_CANNOT_RE
|
|||
|
||||
foreach ($acl_check_ary as $acl => $error)
|
||||
{
|
||||
if (!$auth->acl_get($acl, $forum_id))
|
||||
if (!phpbb::$acl->acl_get($acl, $forum_id))
|
||||
{
|
||||
trigger_error($error);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
|||
|
||||
// Start session management
|
||||
phpbb::$user->session_begin();
|
||||
$auth->acl(phpbb::$user->data);
|
||||
phpbb::$acl->init(phpbb::$user->data);
|
||||
phpbb::$user->setup('search');
|
||||
|
||||
// Define initial vars
|
||||
|
@ -48,7 +48,7 @@ $return_chars = request_var('ch', ($topic_id) ? -1 : 300);
|
|||
$search_forum = request_var('fid', array(0));
|
||||
|
||||
// Is user able to search? Has search been disabled?
|
||||
if (!$auth->acl_get('u_search') || !$auth->acl_getf_global('f_search') || !phpbb::$config['load_search'])
|
||||
if (!phpbb::$acl->acl_get('u_search') || !phpbb::$acl->acl_getf_global('f_search') || !phpbb::$config['load_search'])
|
||||
{
|
||||
$template->assign_var('S_NO_SEARCH', true);
|
||||
trigger_error('NO_SEARCH');
|
||||
|
@ -63,7 +63,7 @@ if (phpbb::$user->system['load'] && phpbb::$config['limit_search_load'] && (phpb
|
|||
|
||||
// Check flood limit ... if applicable
|
||||
$interval = (phpbb::$user->is_guest) ? phpbb::$config['search_anonymous_interval'] : phpbb::$config['search_interval'];
|
||||
if ($interval && !$auth->acl_get('u_ignoreflood'))
|
||||
if ($interval && !phpbb::$acl->acl_get('u_ignoreflood'))
|
||||
{
|
||||
if (phpbb::$user->data['user_last_search'] > time() - $interval)
|
||||
{
|
||||
|
@ -146,11 +146,11 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
// Which forums should not be searched? Author searches are also carried out in unindexed forums
|
||||
if (empty($keywords) && sizeof($author_id_ary))
|
||||
{
|
||||
$ex_fid_ary = array_keys($auth->acl_getf('!f_read', true));
|
||||
$ex_fid_ary = array_keys(phpbb::$acl->acl_getf('!f_read', true));
|
||||
}
|
||||
else
|
||||
{
|
||||
$ex_fid_ary = array_unique(array_merge(array_keys($auth->acl_getf('!f_read', true)), array_keys($auth->acl_getf('!f_search', true))));
|
||||
$ex_fid_ary = array_unique(array_merge(array_keys(phpbb::$acl->acl_getf('!f_read', true)), array_keys(phpbb::$acl->acl_getf('!f_search', true))));
|
||||
}
|
||||
|
||||
$not_in_fid = (sizeof($ex_fid_ary)) ? 'WHERE ' . $db->sql_in_set('f.forum_id', $ex_fid_ary, true) . " OR (f.forum_password <> '' AND fa.user_id <> " . (int) phpbb::$user->data['user_id'] . ')' : "";
|
||||
|
@ -197,14 +197,14 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
$db->sql_freeresult($result);
|
||||
|
||||
// find out in which forums the user is allowed to view approved posts
|
||||
if ($auth->acl_get('m_approve'))
|
||||
if (phpbb::$acl->acl_get('m_approve'))
|
||||
{
|
||||
$m_approve_fid_ary = array(-1);
|
||||
$m_approve_fid_sql = '';
|
||||
}
|
||||
else if ($auth->acl_getf_global('m_approve'))
|
||||
else if (phpbb::$acl->acl_getf_global('m_approve'))
|
||||
{
|
||||
$m_approve_fid_ary = array_diff(array_keys($auth->acl_getf('!m_approve', true)), $ex_fid_ary);
|
||||
$m_approve_fid_ary = array_diff(array_keys(phpbb::$acl->acl_getf('!m_approve', true)), $ex_fid_ary);
|
||||
$m_approve_fid_sql = ' AND (p.post_approved = 1' . ((sizeof($m_approve_fid_ary)) ? ' OR ' . $db->sql_in_set('p.forum_id', $m_approve_fid_ary, true) : '') . ')';
|
||||
}
|
||||
else
|
||||
|
@ -697,7 +697,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
|
||||
foreach ($use_attach_list as $forum_id => $_list)
|
||||
{
|
||||
if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id))
|
||||
if (phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $forum_id))
|
||||
{
|
||||
$attach_list = array_merge($attach_list, $_list);
|
||||
}
|
||||
|
@ -745,7 +745,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
if (!isset($g_forum_id))
|
||||
{
|
||||
// Get a list of forums the user cannot read
|
||||
$forum_ary = array_unique(array_keys($auth->acl_getf('!f_read', true)));
|
||||
$forum_ary = array_unique(array_keys(phpbb::$acl->acl_getf('!f_read', true)));
|
||||
|
||||
// Determine first forum the user is able to read (must not be a category)
|
||||
$sql = 'SELECT forum_id
|
||||
|
@ -769,7 +769,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
|
||||
$view_topic_url = append_sid('viewtopic', "f=$u_forum_id&t=$result_topic_id" . (($u_hilit) ? "&hilit=$u_hilit" : ''));
|
||||
|
||||
$replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
|
||||
$replies = (phpbb::$acl->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
|
||||
|
||||
if ($show_results == 'topics')
|
||||
{
|
||||
|
@ -783,8 +783,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
|
||||
$unread_topic = (isset($topic_tracking_info[$forum_id][$row['topic_id']]) && $row['topic_last_post_time'] > $topic_tracking_info[$forum_id][$row['topic_id']]) ? true : false;
|
||||
|
||||
$topic_unapproved = (!$row['topic_approved'] && $auth->acl_get('m_approve', $forum_id)) ? true : false;
|
||||
$posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $forum_id)) ? true : false;
|
||||
$topic_unapproved = (!$row['topic_approved'] && phpbb::$acl->acl_get('m_approve', $forum_id)) ? true : false;
|
||||
$posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && phpbb::$acl->acl_get('m_approve', $forum_id)) ? true : false;
|
||||
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid('mcp', 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$result_topic_id", true, phpbb::$user->session_id) : '';
|
||||
|
||||
$row['topic_title'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['topic_title']);
|
||||
|
@ -813,7 +813,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
|
||||
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
|
||||
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? phpbb::$user->img('icon_topic_attach', phpbb::$user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
'ATTACH_ICON_IMG' => (phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? phpbb::$user->img('icon_topic_attach', phpbb::$user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? phpbb::$user->img('icon_topic_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '',
|
||||
|
||||
'S_TOPIC_GLOBAL' => (!$forum_id) ? true : false,
|
||||
|
@ -821,7 +821,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
'S_USER_POSTED' => (!empty($row['mark_type'])) ? true : false,
|
||||
'S_UNREAD_TOPIC' => $unread_topic,
|
||||
|
||||
'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_get('m_report', $forum_id)) ? true : false,
|
||||
'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && phpbb::$acl->acl_get('m_report', $forum_id)) ? true : false,
|
||||
'S_TOPIC_UNAPPROVED' => $topic_unapproved,
|
||||
'S_POSTS_UNAPPROVED' => $posts_unapproved,
|
||||
|
||||
|
@ -983,7 +983,7 @@ while ($row = $db->sql_fetchrow($result))
|
|||
|
||||
$right = $row['right_id'];
|
||||
|
||||
if ($auth->acl_gets('!f_search', '!f_list', $row['forum_id']))
|
||||
if (phpbb::$acl->acl_gets('!f_search', '!f_list', $row['forum_id']))
|
||||
{
|
||||
// if the user does not have permissions to search or see this forum skip only this forum/category
|
||||
continue;
|
||||
|
@ -1070,7 +1070,7 @@ $template->assign_vars(array(
|
|||
));
|
||||
|
||||
// only show recent searches to search administrators
|
||||
if ($auth->acl_get('a_search'))
|
||||
if (phpbb::$acl->acl_get('a_search'))
|
||||
{
|
||||
$sql = 'SELECT search_time, search_keywords
|
||||
FROM ' . SEARCH_RESULTS_TABLE . '
|
||||
|
|
|
@ -186,7 +186,7 @@ switch ($mode)
|
|||
$user_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$auth->acl_get('a_switchperm') || !$user_row || $user_id == phpbb::$user->data['user_id'])
|
||||
if (!phpbb::$acl->acl_get('a_switchperm') || !$user_row || $user_id == phpbb::$user->data['user_id'])
|
||||
{
|
||||
redirect(append_sid('index'));
|
||||
}
|
||||
|
@ -208,12 +208,12 @@ switch ($mode)
|
|||
|
||||
case 'restore_perm':
|
||||
|
||||
if (!phpbb::$user->data['user_perm_from'] || !$auth->acl_get('a_switchperm'))
|
||||
if (!phpbb::$user->data['user_perm_from'] || !phpbb::$acl->acl_get('a_switchperm'))
|
||||
{
|
||||
redirect(append_sid('index'));
|
||||
}
|
||||
|
||||
$auth->acl_cache(phpbb::$user->data);
|
||||
phpbb::$acl->acl_cache(phpbb::$user->data);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_perm_from = 0
|
||||
|
@ -312,7 +312,7 @@ function _display_friends()
|
|||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$which = (time() - $update_time < $row['online_time'] && ($row['viewonline'] || $auth->acl_get('u_viewonline'))) ? 'online' : 'offline';
|
||||
$which = (time() - $update_time < $row['online_time'] && ($row['viewonline'] || phpbb::$acl->acl_get('u_viewonline'))) ? 'online' : 'offline';
|
||||
|
||||
$template->assign_block_vars("friends_{$which}", array(
|
||||
'USER_ID' => $row['user_id'],
|
||||
|
|
|
@ -19,7 +19,7 @@ include(PHPBB_ROOT_PATH . 'includes/functions_display.' . PHP_EXT);
|
|||
|
||||
// Start session
|
||||
phpbb::$user->session_begin();
|
||||
$auth->acl(phpbb::$user->data);
|
||||
phpbb::$acl->init(phpbb::$user->data);
|
||||
|
||||
// Start initial var setup
|
||||
$forum_id = request_var('f', 0);
|
||||
|
@ -81,7 +81,7 @@ if (phpbb_request::is_set('e', phpbb_request::GET) && !phpbb::$user->is_register
|
|||
}
|
||||
|
||||
// Permissions check
|
||||
if (!$auth->acl_gets('f_list', 'f_read', $forum_id) || ($forum_data['forum_type'] == FORUM_LINK && $forum_data['forum_link'] && !$auth->acl_get('f_read', $forum_id)))
|
||||
if (!phpbb::$acl->acl_gets('f_list', 'f_read', $forum_id) || ($forum_data['forum_type'] == FORUM_LINK && $forum_data['forum_link'] && !phpbb::$acl->acl_get('f_read', $forum_id)))
|
||||
{
|
||||
if (!phpbb::$user->is_guest)
|
||||
{
|
||||
|
@ -120,7 +120,7 @@ if ($forum_data['forum_type'] == FORUM_LINK && $forum_data['forum_link'])
|
|||
generate_forum_nav($forum_data);
|
||||
|
||||
// Forum Rules
|
||||
if ($auth->acl_get('f_read', $forum_id))
|
||||
if (phpbb::$acl->acl_get('f_read', $forum_id))
|
||||
{
|
||||
generate_forum_rules($forum_data);
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ if (!($forum_data['forum_type'] == FORUM_POST || (($forum_data['forum_flags'] &
|
|||
|
||||
// Ok, if someone has only list-access, we only display the forum list.
|
||||
// We also make this circumstance available to the template in case we want to display a notice. ;)
|
||||
if (!$auth->acl_get('f_read', $forum_id))
|
||||
if (!phpbb::$acl->acl_get('f_read', $forum_id))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_NO_READ_ACCESS' => true,
|
||||
|
@ -203,7 +203,7 @@ $s_watching_forum = array(
|
|||
'is_watching' => false,
|
||||
);
|
||||
|
||||
if ((phpbb::$config['email_enable'] || phpbb::$config['jab_enable']) && phpbb::$config['allow_forum_notify'] && $forum_data['forum_type'] == FORUM_POST && $auth->acl_get('f_subscribe', $forum_id))
|
||||
if ((phpbb::$config['email_enable'] || phpbb::$config['jab_enable']) && phpbb::$config['allow_forum_notify'] && $forum_data['forum_type'] == FORUM_POST && phpbb::$acl->acl_get('f_subscribe', $forum_id))
|
||||
{
|
||||
$notify_status = (isset($forum_data['notify_status'])) ? $forum_data['notify_status'] : NULL;
|
||||
watch_topic_forum('forum', $s_watching_forum, phpbb::$user->data['user_id'], $forum_id, 0, $notify_status);
|
||||
|
@ -233,7 +233,7 @@ if ($sort_days)
|
|||
WHERE forum_id = $forum_id
|
||||
AND ((topic_type <> " . POST_GLOBAL . " AND topic_last_post_time >= $min_post_time)
|
||||
OR topic_type = " . POST_ANNOUNCE . ")
|
||||
" . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND topic_approved = 1');
|
||||
" . ((phpbb::$acl->acl_get('m_approve', $forum_id)) ? '' : 'AND topic_approved = 1');
|
||||
$result = $db->sql_query($sql);
|
||||
$topics_count = (int) $db->sql_fetchfield('num_topics');
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -249,7 +249,7 @@ if ($sort_days)
|
|||
}
|
||||
else
|
||||
{
|
||||
$topics_count = ($auth->acl_get('m_approve', $forum_id)) ? $forum_data['forum_topics_real'] : $forum_data['forum_topics'];
|
||||
$topics_count = (phpbb::$acl->acl_get('m_approve', $forum_id)) ? $forum_data['forum_topics_real'] : $forum_data['forum_topics'];
|
||||
$sql_limit_time = '';
|
||||
}
|
||||
|
||||
|
@ -288,10 +288,10 @@ $template->assign_vars(array(
|
|||
|
||||
'L_NO_TOPICS' => ($forum_data['forum_status'] == ITEM_LOCKED) ? phpbb::$user->lang['POST_FORUM_LOCKED'] : phpbb::$user->lang['NO_TOPICS'],
|
||||
|
||||
'S_DISPLAY_POST_INFO' => ($forum_data['forum_type'] == FORUM_POST && ($auth->acl_get('f_post', $forum_id) || phpbb::$user->is_guest)) ? true : false,
|
||||
'S_DISPLAY_POST_INFO' => ($forum_data['forum_type'] == FORUM_POST && (phpbb::$acl->acl_get('f_post', $forum_id) || phpbb::$user->is_guest)) ? true : false,
|
||||
|
||||
'S_IS_POSTABLE' => ($forum_data['forum_type'] == FORUM_POST) ? true : false,
|
||||
'S_USER_CAN_POST' => ($auth->acl_get('f_post', $forum_id)) ? true : false,
|
||||
'S_USER_CAN_POST' => (phpbb::$acl->acl_get('f_post', $forum_id)) ? true : false,
|
||||
'S_DISPLAY_ACTIVE' => $s_display_active,
|
||||
'S_SELECT_SORT_DIR' => $s_sort_dir,
|
||||
'S_SELECT_SORT_KEY' => $s_sort_key,
|
||||
|
@ -301,14 +301,14 @@ $template->assign_vars(array(
|
|||
'S_WATCH_FORUM_TITLE' => $s_watching_forum['title'],
|
||||
'S_WATCHING_FORUM' => $s_watching_forum['is_watching'],
|
||||
'S_FORUM_ACTION' => append_sid('viewforum', "f=$forum_id&start=$start"),
|
||||
'S_DISPLAY_SEARCHBOX' => ($auth->acl_get('u_search') && $auth->acl_get('f_search', $forum_id) && phpbb::$config['load_search']) ? true : false,
|
||||
'S_DISPLAY_SEARCHBOX' => (phpbb::$acl->acl_get('u_search') && phpbb::$acl->acl_get('f_search', $forum_id) && phpbb::$config['load_search']) ? true : false,
|
||||
'S_SEARCHBOX_ACTION' => append_sid('search', 'fid[]=' . $forum_id),
|
||||
'S_SINGLE_MODERATOR' => (!empty($moderators[$forum_id]) && sizeof($moderators[$forum_id]) > 1) ? false : true,
|
||||
'S_IS_LOCKED' => ($forum_data['forum_status'] == ITEM_LOCKED) ? true : false,
|
||||
'S_VIEWFORUM' => true,
|
||||
|
||||
'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid('mcp', "f=$forum_id&i=main&mode=forum_view", true, phpbb::$user->session_id) : '',
|
||||
'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || phpbb::$user->is_guest) ? append_sid('posting', 'mode=post&f=' . $forum_id) : '',
|
||||
'U_MCP' => (phpbb::$acl->acl_get('m_', $forum_id)) ? append_sid('mcp', "f=$forum_id&i=main&mode=forum_view", true, phpbb::$user->session_id) : '',
|
||||
'U_POST_NEW_TOPIC' => (phpbb::$acl->acl_get('f_post', $forum_id) || phpbb::$user->is_guest) ? append_sid('posting', 'mode=post&f=' . $forum_id) : '',
|
||||
'U_VIEW_FORUM' => append_sid('viewforum', "f=$forum_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . "&start=$start"),
|
||||
'U_MARK_TOPICS' => (phpbb::$user->is_registered || phpbb::$config['load_anon_lastread']) ? append_sid('viewforum', 'hash=' . generate_link_hash('global') . "&f=$forum_id&mark=topics") : '',
|
||||
));
|
||||
|
@ -327,7 +327,7 @@ $sql_array = array(
|
|||
'LEFT_JOIN' => array(),
|
||||
);
|
||||
|
||||
$sql_approved = ($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1';
|
||||
$sql_approved = (phpbb::$acl->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1';
|
||||
|
||||
if (phpbb::$user->is_registered)
|
||||
{
|
||||
|
@ -491,7 +491,7 @@ if (sizeof($shadow_topic_list))
|
|||
}
|
||||
|
||||
// Do not include those topics the user has no permission to access
|
||||
if (!$auth->acl_get('f_read', $row['forum_id']))
|
||||
if (!phpbb::$acl->acl_get('f_read', $row['forum_id']))
|
||||
{
|
||||
// We need to remove any trace regarding this topic. :)
|
||||
unset($rowset[$orig_topic_id]);
|
||||
|
@ -595,7 +595,7 @@ if (sizeof($topic_list))
|
|||
$s_type_switch_test = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0;
|
||||
|
||||
// Replies
|
||||
$replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
|
||||
$replies = (phpbb::$acl->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
|
||||
|
||||
if ($row['topic_status'] == ITEM_MOVED)
|
||||
{
|
||||
|
@ -614,8 +614,8 @@ if (sizeof($topic_list))
|
|||
// Generate all the URIs ...
|
||||
$view_topic_url = append_sid('viewtopic', 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . '&t=' . $topic_id);
|
||||
|
||||
$topic_unapproved = (!$row['topic_approved'] && $auth->acl_get('m_approve', $forum_id)) ? true : false;
|
||||
$posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $forum_id)) ? true : false;
|
||||
$topic_unapproved = (!$row['topic_approved'] && phpbb::$acl->acl_get('m_approve', $forum_id)) ? true : false;
|
||||
$posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && phpbb::$acl->acl_get('m_approve', $forum_id)) ? true : false;
|
||||
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid('mcp', 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$topic_id", true, phpbb::$user->session_id) : '';
|
||||
|
||||
// Send vars to template
|
||||
|
@ -648,13 +648,13 @@ if (sizeof($topic_list))
|
|||
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
|
||||
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
|
||||
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? phpbb::$user->img('icon_topic_attach', 'TOTAL_ATTACHMENTS') : '',
|
||||
'ATTACH_ICON_IMG' => (phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? phpbb::$user->img('icon_topic_attach', 'TOTAL_ATTACHMENTS') : '',
|
||||
'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? phpbb::$user->img('icon_topic_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '',
|
||||
|
||||
'S_TOPIC_TYPE' => $row['topic_type'],
|
||||
'S_USER_POSTED' => (isset($row['topic_posted']) && $row['topic_posted']) ? true : false,
|
||||
'S_UNREAD_TOPIC' => $unread_topic,
|
||||
'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_get('m_report', $forum_id)) ? true : false,
|
||||
'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && phpbb::$acl->acl_get('m_report', $forum_id)) ? true : false,
|
||||
'S_TOPIC_UNAPPROVED' => $topic_unapproved,
|
||||
'S_POSTS_UNAPPROVED' => $posts_unapproved,
|
||||
'S_HAS_POLL' => ($row['poll_start']) ? true : false,
|
||||
|
|
|
@ -18,7 +18,7 @@ include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
|||
|
||||
// Start session management
|
||||
phpbb::$user->session_begin();
|
||||
$auth->acl(phpbb::$user->data);
|
||||
phpbb::$acl->init(phpbb::$user->data);
|
||||
phpbb::$user->setup('memberlist');
|
||||
|
||||
// Get and set some variables
|
||||
|
@ -30,7 +30,7 @@ $sort_dir = request_var('sd', 'd');
|
|||
$show_guests= (phpbb::$config['load_online_guests']) ? request_var('sg', 0) : 0;
|
||||
|
||||
// Can this user view profiles/memberlist?
|
||||
if (!$auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
|
||||
if (!phpbb::$acl->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
|
||||
{
|
||||
if (!phpbb::$user->is_guest)
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ if (!isset($sort_key_text[$sort_key]))
|
|||
$order_by = $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
|
||||
|
||||
// Whois requested
|
||||
if ($mode == 'whois' && $auth->acl_get('a_') && $session_id)
|
||||
if ($mode == 'whois' && phpbb::$acl->acl_get('a_') && $session_id)
|
||||
{
|
||||
include(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT);
|
||||
|
||||
|
@ -143,7 +143,7 @@ while ($row = $db->sql_fetchrow($result))
|
|||
|
||||
if (!$row['session_viewonline'])
|
||||
{
|
||||
$view_online = ($auth->acl_get('u_viewonline')) ? true : false;
|
||||
$view_online = (phpbb::$acl->acl_get('u_viewonline')) ? true : false;
|
||||
$logged_hidden_online++;
|
||||
|
||||
$username_full = '<em>' . $username_full . '</em>';
|
||||
|
@ -210,7 +210,7 @@ while ($row = $db->sql_fetchrow($result))
|
|||
preg_match('#_f_=([0-9]+)x#i', $row['session_page'], $forum_id);
|
||||
$forum_id = (sizeof($forum_id)) ? (int) $forum_id[1] : 0;
|
||||
|
||||
if ($forum_id && $auth->acl_get('f_list', $forum_id))
|
||||
if ($forum_id && phpbb::$acl->acl_get('f_list', $forum_id))
|
||||
{
|
||||
$location = '';
|
||||
$location_url = append_sid('viewforum', 'f=' . $forum_id);
|
||||
|
@ -327,8 +327,8 @@ while ($row = $db->sql_fetchrow($result))
|
|||
'USERNAME_FULL' => $username_full,
|
||||
'LASTUPDATE' => phpbb::$user->format_date($row['session_time']),
|
||||
'FORUM_LOCATION' => $location,
|
||||
'USER_IP' => ($auth->acl_get('a_')) ? (($mode == 'lookup' && $session_id == $row['session_id']) ? gethostbyaddr($row['session_ip']) : $row['session_ip']) : '',
|
||||
'USER_BROWSER' => ($auth->acl_get('a_user')) ? $row['session_browser'] : '',
|
||||
'USER_IP' => (phpbb::$acl->acl_get('a_')) ? (($mode == 'lookup' && $session_id == $row['session_id']) ? gethostbyaddr($row['session_ip']) : $row['session_ip']) : '',
|
||||
'USER_BROWSER' => (phpbb::$acl->acl_get('a_user')) ? $row['session_browser'] : '',
|
||||
|
||||
'U_USER_PROFILE' => ($row['user_type'] != phpbb::USER_IGNORE) ? get_username_string('profile', $row['user_id'], '') : '',
|
||||
'U_USER_IP' => append_sid('viewonline', 'mode=lookup' . (($mode != 'lookup' || $row['session_id'] != $session_id) ? '&s=' . $row['session_id'] : '') . "&sg=$show_guests&start=$start&sk=$sort_key&sd=$sort_dir"),
|
||||
|
@ -372,7 +372,7 @@ unset($vars_online);
|
|||
$pagination = generate_pagination(append_sid('viewonline', "sg=$show_guests&sk=$sort_key&sd=$sort_dir"), $counter, phpbb::$config['topics_per_page'], $start);
|
||||
|
||||
// Grab group details for legend display
|
||||
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
|
||||
if (phpbb::$acl->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
|
||||
{
|
||||
$sql = 'SELECT group_id, group_name, group_colour, group_type
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
|
|
|
@ -20,7 +20,7 @@ include(PHPBB_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
|
|||
|
||||
// Start session management
|
||||
phpbb::$user->session_begin();
|
||||
$auth->acl(phpbb::$user->data);
|
||||
phpbb::$acl->init(phpbb::$user->data);
|
||||
|
||||
// Initial var setup
|
||||
$forum_id = request_var('f', 0);
|
||||
|
@ -80,7 +80,7 @@ if ($view && !$post_id)
|
|||
$sql = 'SELECT post_id, topic_id, forum_id
|
||||
FROM ' . POSTS_TABLE . "
|
||||
WHERE topic_id = $topic_id
|
||||
" . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND post_approved = 1') . "
|
||||
" . ((phpbb::$acl->acl_get('m_approve', $forum_id)) ? '' : 'AND post_approved = 1') . "
|
||||
AND post_time > $topic_last_read
|
||||
ORDER BY post_time ASC";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
|
@ -133,7 +133,7 @@ if ($view && !$post_id)
|
|||
WHERE forum_id = ' . $row['forum_id'] . "
|
||||
AND topic_moved_id = 0
|
||||
AND topic_last_post_time $sql_condition {$row['topic_last_post_time']}
|
||||
" . (($auth->acl_get('m_approve', $row['forum_id'])) ? '' : 'AND topic_approved = 1') . "
|
||||
" . ((phpbb::$acl->acl_get('m_approve', $row['forum_id'])) ? '' : 'AND topic_approved = 1') . "
|
||||
ORDER BY topic_last_post_time $sql_ordering";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
|
@ -231,7 +231,7 @@ if (!$post_id)
|
|||
}
|
||||
else
|
||||
{
|
||||
$sql_array['WHERE'] = "p.post_id = $post_id AND t.topic_id = p.topic_id" . ((!$auth->acl_get('m_approve', $forum_id)) ? ' AND p.post_approved = 1' : '');
|
||||
$sql_array['WHERE'] = "p.post_id = $post_id AND t.topic_id = p.topic_id" . ((!phpbb::$acl->acl_get('m_approve', $forum_id)) ? ' AND p.post_approved = 1' : '');
|
||||
}
|
||||
|
||||
$sql_array['WHERE'] .= ' AND (f.forum_id = t.forum_id';
|
||||
|
@ -279,7 +279,7 @@ if ($post_id)
|
|||
|
||||
if ($sort_dir == $check_sort)
|
||||
{
|
||||
$topic_data['prev_posts'] = ($auth->acl_get('m_approve', $forum_id)) ? $topic_data['topic_replies_real'] : $topic_data['topic_replies'];
|
||||
$topic_data['prev_posts'] = (phpbb::$acl->acl_get('m_approve', $forum_id)) ? $topic_data['topic_replies_real'] : $topic_data['topic_replies'];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -292,7 +292,7 @@ if ($post_id)
|
|||
FROM ' . POSTS_TABLE . ' p1, ' . POSTS_TABLE . " p2
|
||||
WHERE p1.topic_id = {$topic_data['topic_id']}
|
||||
AND p2.post_id = {$post_id}
|
||||
" . ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND p1.post_approved = 1' : '') . '
|
||||
" . ((!phpbb::$acl->acl_get('m_approve', $forum_id)) ? 'AND p1.post_approved = 1' : '') . '
|
||||
AND ' . (($sort_dir == 'd') ? 'p1.post_time >= p2.post_time' : 'p1.post_time <= p2.post_time');
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
|
@ -307,7 +307,7 @@ $forum_id = (int) $topic_data['forum_id'];
|
|||
$topic_id = (int) $topic_data['topic_id'];
|
||||
|
||||
//
|
||||
$topic_replies = ($auth->acl_get('m_approve', $forum_id)) ? $topic_data['topic_replies_real'] : $topic_data['topic_replies'];
|
||||
$topic_replies = (phpbb::$acl->acl_get('m_approve', $forum_id)) ? $topic_data['topic_replies_real'] : $topic_data['topic_replies'];
|
||||
|
||||
// Check sticky/announcement time limit
|
||||
if (($topic_data['topic_type'] == POST_STICKY || $topic_data['topic_type'] == POST_ANNOUNCE) && $topic_data['topic_time_limit'] && ($topic_data['topic_time'] + $topic_data['topic_time_limit']) < time())
|
||||
|
@ -324,13 +324,13 @@ if (($topic_data['topic_type'] == POST_STICKY || $topic_data['topic_type'] == PO
|
|||
// Setup look and feel
|
||||
phpbb::$user->setup('viewtopic', $topic_data['forum_style']);
|
||||
|
||||
if (!$topic_data['topic_approved'] && !$auth->acl_get('m_approve', $forum_id))
|
||||
if (!$topic_data['topic_approved'] && !phpbb::$acl->acl_get('m_approve', $forum_id))
|
||||
{
|
||||
trigger_error('NO_TOPIC');
|
||||
}
|
||||
|
||||
// Start auth check
|
||||
if (!$auth->acl_get('f_read', $forum_id))
|
||||
if (!phpbb::$acl->acl_get('f_read', $forum_id))
|
||||
{
|
||||
if (!phpbb::$user->is_guest)
|
||||
{
|
||||
|
@ -410,7 +410,7 @@ if ($sort_days)
|
|||
FROM ' . POSTS_TABLE . "
|
||||
WHERE topic_id = $topic_id
|
||||
AND post_time >= $min_post_time
|
||||
" . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND post_approved = 1');
|
||||
" . ((phpbb::$acl->acl_get('m_approve', $forum_id)) ? '' : 'AND post_approved = 1');
|
||||
$result = $db->sql_query($sql);
|
||||
$total_posts = (int) $db->sql_fetchfield('num_posts');
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -466,7 +466,7 @@ if ((phpbb::$config['email_enable'] || phpbb::$config['jab_enable']) && phpbb::$
|
|||
watch_topic_forum('topic', $s_watching_topic, phpbb::$user->data['user_id'], $forum_id, $topic_id, $topic_data['notify_status'], $start);
|
||||
|
||||
// Reset forum notification if forum notify is set
|
||||
if (phpbb::$config['allow_forum_notify'] && $auth->acl_get('f_subscribe', $forum_id))
|
||||
if (phpbb::$config['allow_forum_notify'] && phpbb::$acl->acl_get('f_subscribe', $forum_id))
|
||||
{
|
||||
$s_watching_forum = $s_watching_topic;
|
||||
watch_topic_forum('forum', $s_watching_forum, phpbb::$user->data['user_id'], $forum_id, 0);
|
||||
|
@ -522,21 +522,21 @@ $s_forum_rules = '';
|
|||
gen_forum_auth_level('topic', $forum_id, $topic_data['forum_status']);
|
||||
|
||||
// Quick mod tools
|
||||
$allow_change_type = ($auth->acl_get('m_', $forum_id) || (phpbb::$user->is_registered && phpbb::$user->data['user_id'] == $topic_data['topic_poster'])) ? true : false;
|
||||
$allow_change_type = (phpbb::$acl->acl_get('m_', $forum_id) || (phpbb::$user->is_registered && phpbb::$user->data['user_id'] == $topic_data['topic_poster'])) ? true : false;
|
||||
|
||||
$topic_mod = '';
|
||||
$topic_mod .= ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && phpbb::$user->is_registered && phpbb::$user->data['user_id'] == $topic_data['topic_poster'] && $topic_data['topic_status'] == ITEM_UNLOCKED)) ? (($topic_data['topic_status'] == ITEM_UNLOCKED) ? '<option value="lock">' . phpbb::$user->lang['LOCK_TOPIC'] . '</option>' : '<option value="unlock">' . phpbb::$user->lang['UNLOCK_TOPIC'] . '</option>') : '';
|
||||
$topic_mod .= ($auth->acl_get('m_delete', $forum_id)) ? '<option value="delete_topic">' . phpbb::$user->lang['DELETE_TOPIC'] . '</option>' : '';
|
||||
$topic_mod .= ($auth->acl_get('m_move', $forum_id) && $topic_data['topic_status'] != ITEM_MOVED) ? '<option value="move">' . phpbb::$user->lang['MOVE_TOPIC'] . '</option>' : '';
|
||||
$topic_mod .= ($auth->acl_get('m_split', $forum_id)) ? '<option value="split">' . phpbb::$user->lang['SPLIT_TOPIC'] . '</option>' : '';
|
||||
$topic_mod .= ($auth->acl_get('m_merge', $forum_id)) ? '<option value="merge">' . phpbb::$user->lang['MERGE_POSTS'] . '</option>' : '';
|
||||
$topic_mod .= ($auth->acl_get('m_merge', $forum_id)) ? '<option value="merge_topic">' . phpbb::$user->lang['MERGE_TOPIC'] . '</option>' : '';
|
||||
$topic_mod .= ($auth->acl_get('m_move', $forum_id)) ? '<option value="fork">' . phpbb::$user->lang['FORK_TOPIC'] . '</option>' : '';
|
||||
$topic_mod .= ($allow_change_type && $auth->acl_gets('f_sticky', 'f_announce', $forum_id) && $topic_data['topic_type'] != POST_NORMAL) ? '<option value="make_normal">' . phpbb::$user->lang['MAKE_NORMAL'] . '</option>' : '';
|
||||
$topic_mod .= ($allow_change_type && $auth->acl_get('f_sticky', $forum_id) && $topic_data['topic_type'] != POST_STICKY) ? '<option value="make_sticky">' . phpbb::$user->lang['MAKE_STICKY'] . '</option>' : '';
|
||||
$topic_mod .= ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_ANNOUNCE) ? '<option value="make_announce">' . phpbb::$user->lang['MAKE_ANNOUNCE'] . '</option>' : '';
|
||||
$topic_mod .= ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_GLOBAL) ? '<option value="make_global">' . phpbb::$user->lang['MAKE_GLOBAL'] . '</option>' : '';
|
||||
$topic_mod .= ($auth->acl_get('m_', $forum_id)) ? '<option value="topic_logs">' . phpbb::$user->lang['VIEW_TOPIC_LOGS'] . '</option>' : '';
|
||||
$topic_mod .= (phpbb::$acl->acl_get('m_lock', $forum_id) || (phpbb::$acl->acl_get('f_user_lock', $forum_id) && phpbb::$user->is_registered && phpbb::$user->data['user_id'] == $topic_data['topic_poster'] && $topic_data['topic_status'] == ITEM_UNLOCKED)) ? (($topic_data['topic_status'] == ITEM_UNLOCKED) ? '<option value="lock">' . phpbb::$user->lang['LOCK_TOPIC'] . '</option>' : '<option value="unlock">' . phpbb::$user->lang['UNLOCK_TOPIC'] . '</option>') : '';
|
||||
$topic_mod .= (phpbb::$acl->acl_get('m_delete', $forum_id)) ? '<option value="delete_topic">' . phpbb::$user->lang['DELETE_TOPIC'] . '</option>' : '';
|
||||
$topic_mod .= (phpbb::$acl->acl_get('m_move', $forum_id) && $topic_data['topic_status'] != ITEM_MOVED) ? '<option value="move">' . phpbb::$user->lang['MOVE_TOPIC'] . '</option>' : '';
|
||||
$topic_mod .= (phpbb::$acl->acl_get('m_split', $forum_id)) ? '<option value="split">' . phpbb::$user->lang['SPLIT_TOPIC'] . '</option>' : '';
|
||||
$topic_mod .= (phpbb::$acl->acl_get('m_merge', $forum_id)) ? '<option value="merge">' . phpbb::$user->lang['MERGE_POSTS'] . '</option>' : '';
|
||||
$topic_mod .= (phpbb::$acl->acl_get('m_merge', $forum_id)) ? '<option value="merge_topic">' . phpbb::$user->lang['MERGE_TOPIC'] . '</option>' : '';
|
||||
$topic_mod .= (phpbb::$acl->acl_get('m_move', $forum_id)) ? '<option value="fork">' . phpbb::$user->lang['FORK_TOPIC'] . '</option>' : '';
|
||||
$topic_mod .= ($allow_change_type && phpbb::$acl->acl_gets('f_sticky', 'f_announce', $forum_id) && $topic_data['topic_type'] != POST_NORMAL) ? '<option value="make_normal">' . phpbb::$user->lang['MAKE_NORMAL'] . '</option>' : '';
|
||||
$topic_mod .= ($allow_change_type && phpbb::$acl->acl_get('f_sticky', $forum_id) && $topic_data['topic_type'] != POST_STICKY) ? '<option value="make_sticky">' . phpbb::$user->lang['MAKE_STICKY'] . '</option>' : '';
|
||||
$topic_mod .= ($allow_change_type && phpbb::$acl->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_ANNOUNCE) ? '<option value="make_announce">' . phpbb::$user->lang['MAKE_ANNOUNCE'] . '</option>' : '';
|
||||
$topic_mod .= ($allow_change_type && phpbb::$acl->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_GLOBAL) ? '<option value="make_global">' . phpbb::$user->lang['MAKE_GLOBAL'] . '</option>' : '';
|
||||
$topic_mod .= (phpbb::$acl->acl_get('m_', $forum_id)) ? '<option value="topic_logs">' . phpbb::$user->lang['VIEW_TOPIC_LOGS'] . '</option>' : '';
|
||||
|
||||
// If we've got a hightlight set pass it on to pagination.
|
||||
$pagination = generate_pagination(append_sid('viewtopic', "f=$forum_id&t=$topic_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($highlight_match) ? "&hilit=$highlight" : '')), $total_posts, phpbb::$config['posts_per_page'], $start);
|
||||
|
@ -573,7 +573,7 @@ $template->assign_vars(array(
|
|||
'PAGINATION' => $pagination,
|
||||
'PAGE_NUMBER' => on_page($total_posts, phpbb::$config['posts_per_page'], $start),
|
||||
'TOTAL_POSTS' => ($total_posts == 1) ? phpbb::$user->lang['VIEW_TOPIC_POST'] : sprintf(phpbb::$user->lang['VIEW_TOPIC_POSTS'], $total_posts),
|
||||
'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid('mcp', "i=main&mode=topic_view&f=$forum_id&t=$topic_id&start=$start" . ((strlen($u_sort_param)) ? "&$u_sort_param" : ''), true, phpbb::$user->session_id) : '',
|
||||
'U_MCP' => (phpbb::$acl->acl_get('m_', $forum_id)) ? append_sid('mcp', "i=main&mode=topic_view&f=$forum_id&t=$topic_id&start=$start" . ((strlen($u_sort_param)) ? "&$u_sort_param" : ''), true, phpbb::$user->session_id) : '',
|
||||
|
||||
'MODERATORS' => (isset($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id])) ? implode(', ', $forum_moderators[$forum_id]) : '',
|
||||
|
||||
|
@ -608,11 +608,11 @@ $template->assign_vars(array(
|
|||
'S_MOD_ACTION' => append_sid('mcp', "f=$forum_id&t=$topic_id&quickmod=1&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url)), true, phpbb::$user->session_id),
|
||||
|
||||
'S_VIEWTOPIC' => true,
|
||||
'S_DISPLAY_SEARCHBOX' => ($auth->acl_get('u_search') && $auth->acl_get('f_search', $forum_id) && phpbb::$config['load_search']) ? true : false,
|
||||
'S_DISPLAY_SEARCHBOX' => (phpbb::$acl->acl_get('u_search') && phpbb::$acl->acl_get('f_search', $forum_id) && phpbb::$config['load_search']) ? true : false,
|
||||
'S_SEARCHBOX_ACTION' => append_sid('search', 't=' . $topic_id),
|
||||
|
||||
'S_DISPLAY_POST_INFO' => ($topic_data['forum_type'] == FORUM_POST && ($auth->acl_get('f_post', $forum_id) || phpbb::$user->is_guest)) ? true : false,
|
||||
'S_DISPLAY_REPLY_INFO' => ($topic_data['forum_type'] == FORUM_POST && ($auth->acl_get('f_reply', $forum_id) || phpbb::$user->is_guest)) ? true : false,
|
||||
'S_DISPLAY_POST_INFO' => ($topic_data['forum_type'] == FORUM_POST && (phpbb::$acl->acl_get('f_post', $forum_id) || phpbb::$user->is_guest)) ? true : false,
|
||||
'S_DISPLAY_REPLY_INFO' => ($topic_data['forum_type'] == FORUM_POST && (phpbb::$acl->acl_get('f_reply', $forum_id) || phpbb::$user->is_guest)) ? true : false,
|
||||
|
||||
'U_TOPIC' => "{$server_path}viewtopic." . PHP_EXT . "?f=$forum_id&t=$topic_id",
|
||||
'U_FORUM' => $server_path,
|
||||
|
@ -620,8 +620,8 @@ $template->assign_vars(array(
|
|||
'U_VIEW_FORUM' => append_sid('viewforum', 'f=' . $forum_id),
|
||||
'U_VIEW_OLDER_TOPIC' => append_sid('viewtopic', "f=$forum_id&t=$topic_id&view=previous"),
|
||||
'U_VIEW_NEWER_TOPIC' => append_sid('viewtopic', "f=$forum_id&t=$topic_id&view=next"),
|
||||
'U_PRINT_TOPIC' => ($auth->acl_get('f_print', $forum_id)) ? $viewtopic_url . '&view=print' : '',
|
||||
'U_EMAIL_TOPIC' => ($auth->acl_get('f_email', $forum_id) && phpbb::$config['email_enable']) ? append_sid('memberlist', "mode=email&t=$topic_id") : '',
|
||||
'U_PRINT_TOPIC' => (phpbb::$acl->acl_get('f_print', $forum_id)) ? $viewtopic_url . '&view=print' : '',
|
||||
'U_EMAIL_TOPIC' => (phpbb::$acl->acl_get('f_email', $forum_id) && phpbb::$config['email_enable']) ? append_sid('memberlist', "mode=email&t=$topic_id") : '',
|
||||
|
||||
'U_WATCH_TOPIC' => $s_watching_topic['link'],
|
||||
'L_WATCH_TOPIC' => $s_watching_topic['title'],
|
||||
|
@ -630,8 +630,8 @@ $template->assign_vars(array(
|
|||
'U_BOOKMARK_TOPIC' => (phpbb::$user->is_registered && phpbb::$config['allow_bookmarks']) ? $viewtopic_url . '&bookmark=1&hash=' . generate_link_hash("topic_$topic_id") : '',
|
||||
'L_BOOKMARK_TOPIC' => (phpbb::$user->is_registered && phpbb::$config['allow_bookmarks'] && $topic_data['bookmarked']) ? phpbb::$user->lang['BOOKMARK_TOPIC_REMOVE'] : phpbb::$user->lang['BOOKMARK_TOPIC'],
|
||||
|
||||
'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || phpbb::$user->is_guest) ? append_sid('posting', "mode=post&f=$forum_id") : '',
|
||||
'U_POST_REPLY_TOPIC' => ($auth->acl_get('f_reply', $forum_id) || phpbb::$user->is_guest) ? append_sid('posting', "mode=reply&f=$forum_id&t=$topic_id") : '',
|
||||
'U_POST_NEW_TOPIC' => (phpbb::$acl->acl_get('f_post', $forum_id) || phpbb::$user->is_guest) ? append_sid('posting', "mode=post&f=$forum_id") : '',
|
||||
'U_POST_REPLY_TOPIC' => (phpbb::$acl->acl_get('f_reply', $forum_id) || phpbb::$user->is_guest) ? append_sid('posting', "mode=reply&f=$forum_id&t=$topic_id") : '',
|
||||
'U_BUMP_TOPIC' => (bump_topic_allowed($forum_id, $topic_data['topic_bumped'], $topic_data['topic_last_post_time'], $topic_data['topic_poster'], $topic_data['topic_last_poster_id'])) ? append_sid('posting', "mode=bump&f=$forum_id&t=$topic_id&hash=" . generate_link_hash("topic_$topic_id")) : '')
|
||||
);
|
||||
|
||||
|
@ -680,8 +680,8 @@ if (!empty($topic_data['poll_start']))
|
|||
}
|
||||
}
|
||||
|
||||
$s_can_vote = (((!sizeof($cur_voted_id) && $auth->acl_get('f_vote', $forum_id)) ||
|
||||
($auth->acl_get('f_votechg', $forum_id) && $topic_data['poll_vote_change'])) &&
|
||||
$s_can_vote = (((!sizeof($cur_voted_id) && phpbb::$acl->acl_get('f_vote', $forum_id)) ||
|
||||
(phpbb::$acl->acl_get('f_votechg', $forum_id) && $topic_data['poll_vote_change'])) &&
|
||||
(($topic_data['poll_length'] != 0 && $topic_data['poll_start'] + $topic_data['poll_length'] > time()) || $topic_data['poll_length'] == 0) &&
|
||||
$topic_data['topic_status'] != ITEM_LOCKED &&
|
||||
$topic_data['forum_status'] != ITEM_LOCKED) ? true : false;
|
||||
|
@ -890,7 +890,7 @@ $i = $i_total = 0;
|
|||
$sql = 'SELECT p.post_id
|
||||
FROM ' . POSTS_TABLE . ' p' . (($sort_by_sql[$sort_key][0] == 'u') ? ', ' . USERS_TABLE . ' u': '') . "
|
||||
WHERE p.topic_id = $topic_id
|
||||
" . ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND p.post_approved = 1' : '') . "
|
||||
" . ((!phpbb::$acl->acl_get('m_approve', $forum_id)) ? 'AND p.post_approved = 1' : '') . "
|
||||
" . (($sort_by_sql[$sort_key][0] == 'u') ? 'AND u.user_id = p.poster_id': '') . "
|
||||
$limit_posts_time
|
||||
ORDER BY $sql_sort_order";
|
||||
|
@ -1088,18 +1088,18 @@ while ($row = $db->sql_fetchrow($result))
|
|||
'online' => false,
|
||||
'profile' => append_sid('memberlist', "mode=viewprofile&u=$poster_id"),
|
||||
'www' => $row['user_website'],
|
||||
'aim' => ($row['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', "mode=contact&action=aim&u=$poster_id") : '',
|
||||
'msn' => ($row['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', "mode=contact&action=msnm&u=$poster_id") : '',
|
||||
'aim' => ($row['user_aim'] && phpbb::$acl->acl_get('u_sendim')) ? append_sid('memberlist', "mode=contact&action=aim&u=$poster_id") : '',
|
||||
'msn' => ($row['user_msnm'] && phpbb::$acl->acl_get('u_sendim')) ? append_sid('memberlist', "mode=contact&action=msnm&u=$poster_id") : '',
|
||||
'yim' => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row['user_yim']) . '&.src=pg' : '',
|
||||
'jabber' => ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', "mode=contact&action=jabber&u=$poster_id") : '',
|
||||
'search' => ($auth->acl_get('u_search')) ? append_sid('search', "author_id=$poster_id&sr=posts") : '',
|
||||
'jabber' => ($row['user_jabber'] && phpbb::$acl->acl_get('u_sendim')) ? append_sid('memberlist', "mode=contact&action=jabber&u=$poster_id") : '',
|
||||
'search' => (phpbb::$acl->acl_get('u_search')) ? append_sid('search', "author_id=$poster_id&sr=posts") : '',
|
||||
);
|
||||
|
||||
get_user_rank($poster_id, $row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);
|
||||
|
||||
if (!empty($row['user_allow_viewemail']) || $auth->acl_get('a_email'))
|
||||
if (!empty($row['user_allow_viewemail']) || phpbb::$acl->acl_get('a_email'))
|
||||
{
|
||||
$user_cache[$poster_id]['email'] = (phpbb::$config['board_email_form'] && phpbb::$config['email_enable']) ? append_sid('memberlist', "mode=email&u=$poster_id") : ((phpbb::$config['board_hide_emails'] && !$auth->acl_get('a_email')) ? '' : 'mailto:' . $row['user_email']);
|
||||
$user_cache[$poster_id]['email'] = (phpbb::$config['board_email_form'] && phpbb::$config['email_enable']) ? append_sid('memberlist', "mode=email&u=$poster_id") : ((phpbb::$config['board_hide_emails'] && !phpbb::$acl->acl_get('a_email')) ? '' : 'mailto:' . $row['user_email']);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1163,7 +1163,7 @@ if (phpbb::$config['load_onlinetrack'] && sizeof($id_cache))
|
|||
$update_time = phpbb::$config['load_online_time'] * 60;
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$user_cache[$row['session_user_id']]['online'] = (time() - $update_time < $row['online_time'] && (($row['viewonline']) || $auth->acl_get('u_viewonline'))) ? true : false;
|
||||
$user_cache[$row['session_user_id']]['online'] = (time() - $update_time < $row['online_time'] && (($row['viewonline']) || phpbb::$acl->acl_get('u_viewonline'))) ? true : false;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
@ -1172,7 +1172,7 @@ unset($id_cache);
|
|||
// Pull attachment data
|
||||
if (sizeof($attach_list))
|
||||
{
|
||||
if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id))
|
||||
if (phpbb::$acl->acl_get('u_download') && phpbb::$acl->acl_get('f_download', $forum_id))
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
|
@ -1438,14 +1438,14 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
|||
'ONLINE_IMG' => ($poster_id == ANONYMOUS || !phpbb::$config['load_onlinetrack']) ? '' : (($user_cache[$poster_id]['online']) ? phpbb::$user->img('icon_user_online', 'ONLINE') : phpbb::$user->img('icon_user_offline', 'OFFLINE')),
|
||||
'S_ONLINE' => ($poster_id == ANONYMOUS || !phpbb::$config['load_onlinetrack']) ? false : (($user_cache[$poster_id]['online']) ? true : false),
|
||||
|
||||
'U_EDIT' => (!phpbb::$user->is_registered) ? '' : (((phpbb::$user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) && ($row['post_time'] > time() - (phpbb::$config['edit_time'] * 60) || !phpbb::$config['edit_time'])) || $auth->acl_get('m_edit', $forum_id)) ? append_sid('posting', "mode=edit&f=$forum_id&p={$row['post_id']}") : ''),
|
||||
'U_QUOTE' => ($auth->acl_get('f_reply', $forum_id)) ? append_sid('posting', "mode=quote&f=$forum_id&p={$row['post_id']}") : '',
|
||||
'U_INFO' => ($auth->acl_get('m_info', $forum_id)) ? append_sid('mcp', "i=main&mode=post_details&f=$forum_id&p=" . $row['post_id'], true, phpbb::$user->session_id) : '',
|
||||
'U_DELETE' => (!phpbb::$user->is_registered) ? '' : (((phpbb::$user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $topic_data['topic_last_post_id'] == $row['post_id'] && !$row['post_edit_locked'] && ($row['post_time'] > time() - (phpbb::$config['edit_time'] * 60) || !phpbb::$config['edit_time'])) || $auth->acl_get('m_delete', $forum_id)) ? append_sid('posting', "mode=delete&f=$forum_id&p={$row['post_id']}") : ''),
|
||||
'U_EDIT' => (!phpbb::$user->is_registered) ? '' : (((phpbb::$user->data['user_id'] == $poster_id && phpbb::$acl->acl_get('f_edit', $forum_id) && ($row['post_time'] > time() - (phpbb::$config['edit_time'] * 60) || !phpbb::$config['edit_time'])) || phpbb::$acl->acl_get('m_edit', $forum_id)) ? append_sid('posting', "mode=edit&f=$forum_id&p={$row['post_id']}") : ''),
|
||||
'U_QUOTE' => (phpbb::$acl->acl_get('f_reply', $forum_id)) ? append_sid('posting', "mode=quote&f=$forum_id&p={$row['post_id']}") : '',
|
||||
'U_INFO' => (phpbb::$acl->acl_get('m_info', $forum_id)) ? append_sid('mcp', "i=main&mode=post_details&f=$forum_id&p=" . $row['post_id'], true, phpbb::$user->session_id) : '',
|
||||
'U_DELETE' => (!phpbb::$user->is_registered) ? '' : (((phpbb::$user->data['user_id'] == $poster_id && phpbb::$acl->acl_get('f_delete', $forum_id) && $topic_data['topic_last_post_id'] == $row['post_id'] && !$row['post_edit_locked'] && ($row['post_time'] > time() - (phpbb::$config['edit_time'] * 60) || !phpbb::$config['edit_time'])) || phpbb::$acl->acl_get('m_delete', $forum_id)) ? append_sid('posting', "mode=delete&f=$forum_id&p={$row['post_id']}") : ''),
|
||||
|
||||
'U_PROFILE' => $user_cache[$poster_id]['profile'],
|
||||
'U_SEARCH' => $user_cache[$poster_id]['search'],
|
||||
'U_PM' => ($poster_id != ANONYMOUS && phpbb::$config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_cache[$poster_id]['allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid('ucp', 'i=pm&mode=compose&action=quotepost&p=' . $row['post_id']) : '',
|
||||
'U_PM' => ($poster_id != ANONYMOUS && phpbb::$config['allow_privmsg'] && phpbb::$acl->acl_get('u_sendpm') && ($user_cache[$poster_id]['allow_pm'] || phpbb::$acl->acl_gets('a_', 'm_') || phpbb::$acl->acl_getf_global('m_'))) ? append_sid('ucp', 'i=pm&mode=compose&action=quotepost&p=' . $row['post_id']) : '',
|
||||
'U_EMAIL' => $user_cache[$poster_id]['email'],
|
||||
'U_WWW' => $user_cache[$poster_id]['www'],
|
||||
'U_ICQ' => $user_cache[$poster_id]['icq'],
|
||||
|
@ -1454,21 +1454,21 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
|||
'U_YIM' => $user_cache[$poster_id]['yim'],
|
||||
'U_JABBER' => $user_cache[$poster_id]['jabber'],
|
||||
|
||||
'U_REPORT' => ($auth->acl_get('f_report', $forum_id)) ? append_sid('report', 'f=' . $forum_id . '&p=' . $row['post_id']) : '',
|
||||
'U_MCP_REPORT' => ($auth->acl_get('m_report', $forum_id)) ? append_sid('mcp', 'i=reports&mode=report_details&f=' . $forum_id . '&p=' . $row['post_id'], true, phpbb::$user->session_id) : '',
|
||||
'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $forum_id)) ? append_sid('mcp', 'i=queue&mode=approve_details&f=' . $forum_id . '&p=' . $row['post_id'], true, phpbb::$user->session_id) : '',
|
||||
'U_REPORT' => (phpbb::$acl->acl_get('f_report', $forum_id)) ? append_sid('report', 'f=' . $forum_id . '&p=' . $row['post_id']) : '',
|
||||
'U_MCP_REPORT' => (phpbb::$acl->acl_get('m_report', $forum_id)) ? append_sid('mcp', 'i=reports&mode=report_details&f=' . $forum_id . '&p=' . $row['post_id'], true, phpbb::$user->session_id) : '',
|
||||
'U_MCP_APPROVE' => (phpbb::$acl->acl_get('m_approve', $forum_id)) ? append_sid('mcp', 'i=queue&mode=approve_details&f=' . $forum_id . '&p=' . $row['post_id'], true, phpbb::$user->session_id) : '',
|
||||
'U_MINI_POST' => append_sid('viewtopic', 'p=' . $row['post_id']) . (($topic_data['topic_type'] == POST_GLOBAL) ? '&f=' . $forum_id : '') . '#p' . $row['post_id'],
|
||||
'U_NEXT_POST_ID' => ($i < $i_total && isset($rowset[$post_list[$i + 1]])) ? $rowset[$post_list[$i + 1]]['post_id'] : '',
|
||||
'U_PREV_POST_ID' => $prev_post_id,
|
||||
'U_NOTES' => ($auth->acl_getf_global('m_')) ? append_sid('mcp', 'i=notes&mode=user_notes&u=' . $poster_id, true, phpbb::$user->session_id) : '',
|
||||
'U_WARN' => ($auth->acl_get('m_warn') && $poster_id != phpbb::$user->data['user_id'] && $poster_id != ANONYMOUS) ? append_sid('mcp', 'i=warn&mode=warn_post&f=' . $forum_id . '&p=' . $row['post_id'], true, phpbb::$user->session_id) : '',
|
||||
'U_NOTES' => (phpbb::$acl->acl_getf_global('m_')) ? append_sid('mcp', 'i=notes&mode=user_notes&u=' . $poster_id, true, phpbb::$user->session_id) : '',
|
||||
'U_WARN' => (phpbb::$acl->acl_get('m_warn') && $poster_id != phpbb::$user->data['user_id'] && $poster_id != ANONYMOUS) ? append_sid('mcp', 'i=warn&mode=warn_post&f=' . $forum_id . '&p=' . $row['post_id'], true, phpbb::$user->session_id) : '',
|
||||
|
||||
'POST_ID' => $row['post_id'],
|
||||
'POSTER_ID' => $poster_id,
|
||||
|
||||
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
|
||||
'S_POST_UNAPPROVED' => ($row['post_approved']) ? false : true,
|
||||
'S_POST_REPORTED' => ($row['post_reported'] && $auth->acl_get('m_report', $forum_id)) ? true : false,
|
||||
'S_POST_REPORTED' => ($row['post_reported'] && phpbb::$acl->acl_get('m_report', $forum_id)) ? true : false,
|
||||
'S_DISPLAY_NOTICE' => $display_notice && $row['post_attachment'],
|
||||
'S_FRIEND' => ($row['friend']) ? true : false,
|
||||
'S_UNREAD_POST' => $post_unread,
|
||||
|
|
Loading…
Add table
Reference in a new issue