aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_admin.php12
-rw-r--r--phpBB/includes/functions_display.php18
-rw-r--r--phpBB/includes/functions_posting.php48
-rw-r--r--phpBB/includes/functions_privmsgs.php8
-rw-r--r--phpBB/includes/functions_profile_fields.php6
-rw-r--r--phpBB/includes/functions_user.php12
-rw-r--r--phpBB/includes/message_parser.php4
7 files changed, 54 insertions, 54 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index b648f76cf3..d56e296f32 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -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)
{
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index c002ac2392..15c73e45c1 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -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)
{
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 76836c8616..8da8f9b0ab 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -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';
}
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index dc5e6f3744..340dfbc0e6 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -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&amp;f=$folder_id&amp;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&amp;mode=compose&amp;action=quote&amp;f=" . $folder_id . "&amp;p=" . $row['msg_id'] : '',
- 'U_POST_REPLY_PM' => ($author_id != phpbb::$user->data['user_id'] && $author_id != ANONYMOUS && $auth->acl_get('u_sendpm')) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;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&amp;mode=compose&amp;action=quote&amp;f=" . $folder_id . "&amp;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&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;p=" . $row['msg_id'] : '')
);
unset($rowset[$id]);
$prev_id = $id;
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index bc12a1b33f..28374bf567 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -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';
}
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 14ce7726e3..cfed078b3b 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -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))
{
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 8fa3223586..aef9e40bc1 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -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']);