aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/group
diff options
context:
space:
mode:
authormrgoldy <gijsmartens1@gmail.com>2019-01-02 13:21:44 +0100
committermrgoldy <gijsmartens1@gmail.com>2019-01-02 13:21:44 +0100
commitf6c93a81d302be22d754fb65e50d60699ea7b5c0 (patch)
treefb12dcb1b059600a165c50e32fec2c09ca99e17f /phpBB/phpbb/group
parentf023dd590f28b2721773f8429a2d1fbf995f544f (diff)
downloadforums-f6c93a81d302be22d754fb65e50d60699ea7b5c0.tar
forums-f6c93a81d302be22d754fb65e50d60699ea7b5c0.tar.gz
forums-f6c93a81d302be22d754fb65e50d60699ea7b5c0.tar.bz2
forums-f6c93a81d302be22d754fb65e50d60699ea7b5c0.tar.xz
forums-f6c93a81d302be22d754fb65e50d60699ea7b5c0.zip
[ticket/15886] No profile url for BOTS group
PHPBB3-15886
Diffstat (limited to 'phpBB/phpbb/group')
-rw-r--r--phpBB/phpbb/group/helper.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/phpBB/phpbb/group/helper.php b/phpBB/phpbb/group/helper.php
index 9a53df68d3..21a09e4e63 100644
--- a/phpBB/phpbb/group/helper.php
+++ b/phpBB/phpbb/group/helper.php
@@ -109,6 +109,8 @@ class helper
*/
public function get_name_string($mode, $group_id, $group_name, $group_colour = '', $custom_profile_url = false)
{
+ $s_is_bots = ($group_name === 'BOTS');
+
// This switch makes sure we only run code required for the mode
switch ($mode)
{
@@ -117,7 +119,7 @@ class helper
case 'colour':
// Build correct group colour
- $group_colour = ($group_colour) ? '#' . $group_colour : '';
+ $group_colour = $group_colour ? '#' . $group_colour : '';
// Return colour
if ($mode === 'colour')
@@ -146,7 +148,7 @@ class helper
// 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 ($group_id && ($this->user->data['user_id'] == ANONYMOUS || $this->auth->acl_get('u_viewprofile')))
+ if ($group_id && !$s_is_bots && ($this->user->data['user_id'] == ANONYMOUS || $this->auth->acl_get('u_viewprofile')))
{
$profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&amp;g=' . (int) $group_id : str_replace(array('={GROUP_ID}', '=%7BGROUP_ID%7D'), '=' . (int) $group_id, $this->name_strings['base_url']);
}
@@ -167,7 +169,7 @@ class helper
if (!isset($group_name_string))
{
- if (($mode === 'full' && empty($profile_url)) || $mode === 'no_profile')
+ if (($mode === 'full' && empty($profile_url)) || $mode === 'no_profile' || $s_is_bots)
{
$group_name_string = str_replace(array('{GROUP_COLOUR}', '{GROUP_NAME}'), array($group_colour, $group_name), (!$group_colour) ? $this->name_strings['tpl_noprofile'] : $this->name_strings['tpl_noprofile_colour']);
}