aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_content.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-12-30 17:20:50 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-12-30 17:20:50 +0000
commit11e76473aaf0120a96edb4d3a96800603bffcc48 (patch)
tree3b237d67fe83359ab17a99d151f52ad170500c74 /phpBB/includes/functions_content.php
parent96721d4bf141cd607ab47aa6f60ed33579475457 (diff)
downloadforums-11e76473aaf0120a96edb4d3a96800603bffcc48.tar
forums-11e76473aaf0120a96edb4d3a96800603bffcc48.tar.gz
forums-11e76473aaf0120a96edb4d3a96800603bffcc48.tar.bz2
forums-11e76473aaf0120a96edb4d3a96800603bffcc48.tar.xz
forums-11e76473aaf0120a96edb4d3a96800603bffcc48.zip
fix some functions
git-svn-id: file:///svn/phpbb/trunk@9245 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_content.php')
-rw-r--r--phpBB/includes/functions_content.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index 9922b2c2a9..16a7f08b9b 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -671,10 +671,8 @@ function censor_text($text)
// We moved the word censor checks in here because we call this function quite often - and then only need to do the check once
if (!isset($censors) || !is_array($censors))
{
- global $user, $auth;
-
// We check here if the user is having viewing censors disabled (and also allowed to do so).
- if (!$user->optionget('viewcensors') && phpbb::$config['allow_nocensors'] && $auth->acl_get('u_chgcensors'))
+ if (!phpbb::$user->optionget('viewcensors') && phpbb::$config['allow_nocensors'] && phpbb::$acl->acl_get('u_chgcensors'))
{
$censors = array();
}
@@ -708,9 +706,7 @@ function bbcode_nl2br($text)
*/
function smiley_text($text, $force_option = false)
{
- global $user;
-
- if ($force_option || !phpbb::$config['allow_smilies'] || !$user->optionget('viewsmilies'))
+ if ($force_option || !phpbb::$config['allow_smilies'] || !phpbb::$user->optionget('viewsmilies'))
{
return preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $text);
}
@@ -1156,7 +1152,7 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
// We cache some common variables we need within this function
if (empty($_profile_cache))
{
- $_profile_cache['base_url'] = append_sid('memberlist', 'mode=viewprofile&amp;u={USER_ID}');
+ $_profile_cache['base_url'] = phpbb::$url->append_sid('memberlist', 'mode=viewprofile&amp;u={USER_ID}');
$_profile_cache['tpl_noprofile'] = '{USERNAME}';
$_profile_cache['tpl_noprofile_colour'] = '<span style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</span>';
$_profile_cache['tpl_profile'] = '<a href="{PROFILE_URL}">{USERNAME}</a>';
@@ -1188,11 +1184,11 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
// Build correct username
if ($guest_username === false)
{
- $username = ($username) ? $username : $user->lang['GUEST'];
+ $username = ($username) ? $username : phpbb::$user->lang['GUEST'];
}
else
{
- $username = ($user_id && $user_id != ANONYMOUS) ? $username : ((!empty($guest_username)) ? $guest_username : $user->lang['GUEST']);
+ $username = ($user_id && $user_id != ANONYMOUS) ? $username : ((!empty($guest_username)) ? $guest_username : phpbb::$user->lang['GUEST']);
}
// Return username
@@ -1207,7 +1203,7 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
// Build correct profile url - only show if not anonymous and permission to view profile if registered user
// For anonymous the link leads to a login page.
- if ($user_id && $user_id != ANONYMOUS && ($user->data['user_id'] == ANONYMOUS || $auth->acl_get('u_viewprofile')))
+ if ($user_id && $user_id != ANONYMOUS && (phpbb::$user->data['user_id'] == ANONYMOUS || phpbb::$acl->acl_get('u_viewprofile')))
{
$profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&amp;u=' . (int) $user_id : str_replace(array('={USER_ID}', '=%7BUSER_ID%7D'), '=' . (int) $user_id, $_profile_cache['base_url']);
}