From a9a28859d4852be72ce782d079ee3183c4d54852 Mon Sep 17 00:00:00 2001 From: luzpaz Date: Tue, 15 Aug 2017 15:00:12 -0400 Subject: [ticket/15424] Multiple typo fixes in docs & comments Fixed typos in some docs, guidelines, some non-user-facing files. PHPBB3-15424 --- phpBB/phpbb/content_visibility.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/content_visibility.php') diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index f023e0742c..704ec6badb 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -684,7 +684,7 @@ class content_visibility * @param $time int Timestamp when the action is performed * @param $reason string Reason why the visibilty was changed. * @param $force_update_all bool Force to update all posts within the topic - * @return array Changed topic data, empty array if an error occured. + * @return array Changed topic data, empty array if an error occurred. */ public function set_topic_visibility($visibility, $topic_id, $forum_id, $user_id, $time, $reason, $force_update_all = false) { -- cgit v1.2.1 From eb94fe973bbf7b56e61b0287cf9a765197bed27c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Bartus?= Date: Fri, 11 May 2018 17:29:49 +0200 Subject: [ticket/9837] Display unapproved posts to their authors Basic functionality mock up. PHPBB3-9837 --- phpBB/phpbb/content_visibility.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'phpBB/phpbb/content_visibility.php') diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 704ec6badb..4633ec24c2 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -144,7 +144,12 @@ class content_visibility */ public function is_visible($mode, $forum_id, $data) { - $is_visible = $this->auth->acl_get('m_approve', $forum_id) || $data[$mode . '_visibility'] == ITEM_APPROVED; + $visibility = $data[$mode . '_visibility']; + $poster_key = ($mode === 'topic') ? 'topic_poster' : 'poster_id'; + $is_visible = $this->auth->acl_get('m_approve', $forum_id) || $visibility == ITEM_APPROVED || ( + ($visibility == ITEM_UNAPPROVED || $visibility == ITEM_REAPPROVE) && + $this->user->data['user_id'] === $data[$poster_key] + ); /** * Allow changing the result of calling is_visible @@ -216,7 +221,13 @@ class content_visibility } else { - $where_sql .= $table_alias . $mode . '_visibility = ' . ITEM_APPROVED; + $field_name = ($mode === 'topic') ? 'topic_poster' : 'poster_id'; + $visibility_query = $table_alias . $mode . '_visibility = '; + + $where_sql .= '(' . $visibility_query . ITEM_APPROVED . ')'; + $where_sql .= ' OR ('; + $where_sql .= '(' . $visibility_query . ITEM_UNAPPROVED . ' OR ' . $visibility_query . ITEM_REAPPROVE . ')'; + $where_sql .= ' AND ' . $table_alias . $field_name . ' = ' . ((int) $this->user->data['user_id']) . ')'; } return '(' . $where_sql . ')'; -- cgit v1.2.1 From 01b0ec19c681b76b59ae37c77d56357b2197bb8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Bartus?= Date: Sun, 13 May 2018 13:13:38 +0200 Subject: [ticket/9837] Small fixes PHPBB3-9837 --- phpBB/phpbb/content_visibility.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'phpBB/phpbb/content_visibility.php') diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 4633ec24c2..8249e9c36d 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -146,9 +146,10 @@ class content_visibility { $visibility = $data[$mode . '_visibility']; $poster_key = ($mode === 'topic') ? 'topic_poster' : 'poster_id'; - $is_visible = $this->auth->acl_get('m_approve', $forum_id) || $visibility == ITEM_APPROVED || ( - ($visibility == ITEM_UNAPPROVED || $visibility == ITEM_REAPPROVE) && - $this->user->data['user_id'] === $data[$poster_key] + $is_visible = $this->auth->acl_get('m_approve', $forum_id) || $visibility == ITEM_APPROVED; + $is_visible = $is_visible || ( + ($visibility == ITEM_UNAPPROVED || $visibility == ITEM_REAPPROVE) + && $this->user->data['user_id'] === $data[$poster_key] ); /** -- cgit v1.2.1 From 63b7518a0f8b09d23a0d45c50d98aa3ff607f613 Mon Sep 17 00:00:00 2001 From: v12mike Date: Tue, 10 Sep 2019 08:33:01 -0400 Subject: [ticket/9837] Make unapproved posts visible to posters Improvements for feature following review PHPBB3-9837 --- phpBB/phpbb/content_visibility.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'phpBB/phpbb/content_visibility.php') diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 8249e9c36d..699bfa167e 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -222,15 +222,16 @@ class content_visibility } else { - $field_name = ($mode === 'topic') ? 'topic_poster' : 'poster_id'; $visibility_query = $table_alias . $mode . '_visibility = '; $where_sql .= '(' . $visibility_query . ITEM_APPROVED . ')'; - $where_sql .= ' OR ('; - $where_sql .= '(' . $visibility_query . ITEM_UNAPPROVED . ' OR ' . $visibility_query . ITEM_REAPPROVE . ')'; - $where_sql .= ' AND ' . $table_alias . $field_name . ' = ' . ((int) $this->user->data['user_id']) . ')'; + if ($this->config['display_unapproved_posts'] && ($this->user->data['user_id'] <> ANONYMOUS)) + { + $poster_key = ($mode === 'topic') ? 'topic_poster' : 'poster_id'; + $where_sql .= ' OR (' . $visibility_query . ITEM_UNAPPROVED; + $where_sql .= ' AND ' . $table_alias . $poster_key . ' = ' . ((int) $this->user->data['user_id']) . ')'; + } } - return '(' . $where_sql . ')'; } -- cgit v1.2.1 From 78a913581c727801240758c0a8c3bfae86d124ca Mon Sep 17 00:00:00 2001 From: v12mike Date: Tue, 10 Sep 2019 16:32:13 -0400 Subject: [ticket/9837] Display unapproved posts to posters Add tests and improve style template PHPBB3-9837 --- phpBB/phpbb/content_visibility.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'phpBB/phpbb/content_visibility.php') diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 699bfa167e..1ee3cfee8b 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -76,7 +76,7 @@ class content_visibility * @param string $topics_table Topics table name * @param string $users_table Users table name */ - public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $php_ext, $forums_table, $posts_table, $topics_table, $users_table) + public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $php_ext, $forums_table, $posts_table, $topics_table, $users_table) { $this->auth = $auth; $this->config = $config; @@ -198,8 +198,8 @@ class content_visibility * @var array forum_id The forum id in which the search is made. * @var string table_alias Table alias to prefix in SQL queries * @var mixed get_visibility_sql_overwrite If a string, forces the function to return get_forums_visibility_sql_overwrite after executing the event - * If false, get_visibility_sql continues normally - * It must be either boolean or string + * If false, get_visibility_sql continues normally + * It must be either boolean or string * @since 3.1.4-RC1 */ $vars = array( @@ -225,10 +225,10 @@ class content_visibility $visibility_query = $table_alias . $mode . '_visibility = '; $where_sql .= '(' . $visibility_query . ITEM_APPROVED . ')'; - if ($this->config['display_unapproved_posts'] && ($this->user->data['user_id'] <> ANONYMOUS)) + if ($this->config['display_unapproved_posts'] && ($this->user->data['user_id'] <> ANONYMOUS)) { $poster_key = ($mode === 'topic') ? 'topic_poster' : 'poster_id'; - $where_sql .= ' OR (' . $visibility_query . ITEM_UNAPPROVED; + $where_sql .= ' OR ((' . $visibility_query . ITEM_UNAPPROVED . ' OR ' . $visibility_query . ITEM_REAPPROVE .')'; $where_sql .= ' AND ' . $table_alias . $poster_key . ' = ' . ((int) $this->user->data['user_id']) . ')'; } } @@ -268,8 +268,8 @@ class content_visibility * @var string table_alias Table alias to prefix in SQL queries * @var array approve_forums Array of forums where the user has m_approve permissions * @var mixed get_forums_visibility_sql_overwrite If a string, forces the function to return get_forums_visibility_sql_overwrite after executing the event - * If false, get_forums_visibility_sql continues normally - * It must be either boolean or string + * If false, get_forums_visibility_sql continues normally + * It must be either boolean or string * @since 3.1.3-RC1 */ $vars = array( -- cgit v1.2.1 From 92362441bd17dd18fb006a7b9f7a05c65ed2b432 Mon Sep 17 00:00:00 2001 From: v12mike Date: Wed, 11 Sep 2019 04:52:07 -0400 Subject: [ticket/9837] Make unapproved posts visible to posters Add tests Tidy up code Improve user message formatting PHPBB3-9837 --- phpBB/phpbb/content_visibility.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'phpBB/phpbb/content_visibility.php') diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 1ee3cfee8b..1c69691a2c 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -76,7 +76,7 @@ class content_visibility * @param string $topics_table Topics table name * @param string $users_table Users table name */ - public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $php_ext, $forums_table, $posts_table, $topics_table, $users_table) + public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $php_ext, $forums_table, $posts_table, $topics_table, $users_table) { $this->auth = $auth; $this->config = $config; @@ -146,10 +146,12 @@ class content_visibility { $visibility = $data[$mode . '_visibility']; $poster_key = ($mode === 'topic') ? 'topic_poster' : 'poster_id'; - $is_visible = $this->auth->acl_get('m_approve', $forum_id) || $visibility == ITEM_APPROVED; - $is_visible = $is_visible || ( - ($visibility == ITEM_UNAPPROVED || $visibility == ITEM_REAPPROVE) - && $this->user->data['user_id'] === $data[$poster_key] + $is_visible = $this->auth->acl_get('m_approve', $forum_id) || + ($visibility == ITEM_APPROVED) || + ($this->config['display_unapproved_posts'] && + ($this->user->data['user_id'] <> ANONYMOUS) && + ($visibility == ITEM_UNAPPROVED || $visibility == ITEM_REAPPROVE) && + ($this->user->data['user_id'] === $data[$poster_key]) ); /** @@ -198,8 +200,8 @@ class content_visibility * @var array forum_id The forum id in which the search is made. * @var string table_alias Table alias to prefix in SQL queries * @var mixed get_visibility_sql_overwrite If a string, forces the function to return get_forums_visibility_sql_overwrite after executing the event - * If false, get_visibility_sql continues normally - * It must be either boolean or string + * If false, get_visibility_sql continues normally + * It must be either boolean or string * @since 3.1.4-RC1 */ $vars = array( @@ -268,8 +270,8 @@ class content_visibility * @var string table_alias Table alias to prefix in SQL queries * @var array approve_forums Array of forums where the user has m_approve permissions * @var mixed get_forums_visibility_sql_overwrite If a string, forces the function to return get_forums_visibility_sql_overwrite after executing the event - * If false, get_forums_visibility_sql continues normally - * It must be either boolean or string + * If false, get_forums_visibility_sql continues normally + * It must be either boolean or string * @since 3.1.3-RC1 */ $vars = array( -- cgit v1.2.1 From 46a189fa4c5ed099eddca5b03f6fd17e057a37c6 Mon Sep 17 00:00:00 2001 From: v12mike Date: Wed, 11 Sep 2019 08:23:21 -0400 Subject: [ticket/9837] Display unapproved posts to originator Fix whitespace issues PHPBB3-9837 --- phpBB/phpbb/content_visibility.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'phpBB/phpbb/content_visibility.php') diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 1c69691a2c..276a9d9d23 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -146,11 +146,11 @@ class content_visibility { $visibility = $data[$mode . '_visibility']; $poster_key = ($mode === 'topic') ? 'topic_poster' : 'poster_id'; - $is_visible = $this->auth->acl_get('m_approve', $forum_id) || - ($visibility == ITEM_APPROVED) || - ($this->config['display_unapproved_posts'] && - ($this->user->data['user_id'] <> ANONYMOUS) && - ($visibility == ITEM_UNAPPROVED || $visibility == ITEM_REAPPROVE) && + $is_visible = $this->auth->acl_get('m_approve', $forum_id) || + ($visibility == ITEM_APPROVED) || + ($this->config['display_unapproved_posts'] && + ($this->user->data['user_id'] <> ANONYMOUS) && + ($visibility == ITEM_UNAPPROVED || $visibility == ITEM_REAPPROVE) && ($this->user->data['user_id'] === $data[$poster_key]) ); -- cgit v1.2.1 From 1f10cd51ffaa8015bf29a3ca3173528f319f8e78 Mon Sep 17 00:00:00 2001 From: v12mike Date: Tue, 10 Sep 2019 16:32:13 -0400 Subject: [ticket/9837] Display unapproved posts to posters Add tests and improve style template PHPBB3-9837 --- phpBB/phpbb/content_visibility.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'phpBB/phpbb/content_visibility.php') diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 276a9d9d23..57f47ccb82 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -76,7 +76,7 @@ class content_visibility * @param string $topics_table Topics table name * @param string $users_table Users table name */ - public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $php_ext, $forums_table, $posts_table, $topics_table, $users_table) + public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $php_ext, $forums_table, $posts_table, $topics_table, $users_table) { $this->auth = $auth; $this->config = $config; @@ -200,8 +200,8 @@ class content_visibility * @var array forum_id The forum id in which the search is made. * @var string table_alias Table alias to prefix in SQL queries * @var mixed get_visibility_sql_overwrite If a string, forces the function to return get_forums_visibility_sql_overwrite after executing the event - * If false, get_visibility_sql continues normally - * It must be either boolean or string + * If false, get_visibility_sql continues normally + * It must be either boolean or string * @since 3.1.4-RC1 */ $vars = array( @@ -270,8 +270,8 @@ class content_visibility * @var string table_alias Table alias to prefix in SQL queries * @var array approve_forums Array of forums where the user has m_approve permissions * @var mixed get_forums_visibility_sql_overwrite If a string, forces the function to return get_forums_visibility_sql_overwrite after executing the event - * If false, get_forums_visibility_sql continues normally - * It must be either boolean or string + * If false, get_forums_visibility_sql continues normally + * It must be either boolean or string * @since 3.1.3-RC1 */ $vars = array( -- cgit v1.2.1 From 9fff4cf2536821ef75e4908cc22be2122dcc67a9 Mon Sep 17 00:00:00 2001 From: v12mike Date: Wed, 11 Sep 2019 04:52:07 -0400 Subject: [ticket/9837] Make unapproved posts visible to posters Add tests Tidy up code Improve user message formatting PHPBB3-9837 --- phpBB/phpbb/content_visibility.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'phpBB/phpbb/content_visibility.php') diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 57f47ccb82..276a9d9d23 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -76,7 +76,7 @@ class content_visibility * @param string $topics_table Topics table name * @param string $users_table Users table name */ - public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $php_ext, $forums_table, $posts_table, $topics_table, $users_table) + public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $php_ext, $forums_table, $posts_table, $topics_table, $users_table) { $this->auth = $auth; $this->config = $config; @@ -200,8 +200,8 @@ class content_visibility * @var array forum_id The forum id in which the search is made. * @var string table_alias Table alias to prefix in SQL queries * @var mixed get_visibility_sql_overwrite If a string, forces the function to return get_forums_visibility_sql_overwrite after executing the event - * If false, get_visibility_sql continues normally - * It must be either boolean or string + * If false, get_visibility_sql continues normally + * It must be either boolean or string * @since 3.1.4-RC1 */ $vars = array( @@ -270,8 +270,8 @@ class content_visibility * @var string table_alias Table alias to prefix in SQL queries * @var array approve_forums Array of forums where the user has m_approve permissions * @var mixed get_forums_visibility_sql_overwrite If a string, forces the function to return get_forums_visibility_sql_overwrite after executing the event - * If false, get_forums_visibility_sql continues normally - * It must be either boolean or string + * If false, get_forums_visibility_sql continues normally + * It must be either boolean or string * @since 3.1.3-RC1 */ $vars = array( -- cgit v1.2.1 From 15da5b108e6b93fd0059b1b523b68eccec1cce5c Mon Sep 17 00:00:00 2001 From: v12mike Date: Sun, 6 Oct 2019 09:43:45 -0400 Subject: [ticket/9837] Display unapproved posts to their authors Re-order code for efficiency PHPBB3-9837 --- phpBB/phpbb/content_visibility.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'phpBB/phpbb/content_visibility.php') diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 276a9d9d23..bea49c0be1 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -146,13 +146,12 @@ class content_visibility { $visibility = $data[$mode . '_visibility']; $poster_key = ($mode === 'topic') ? 'topic_poster' : 'poster_id'; - $is_visible = $this->auth->acl_get('m_approve', $forum_id) || - ($visibility == ITEM_APPROVED) || - ($this->config['display_unapproved_posts'] && + $is_visible = ($visibility == ITEM_APPROVED) || + ($this->config['display_unapproved_posts'] && ($this->user->data['user_id'] <> ANONYMOUS) && ($visibility == ITEM_UNAPPROVED || $visibility == ITEM_REAPPROVE) && - ($this->user->data['user_id'] === $data[$poster_key]) - ); + ($this->user->data['user_id'] === $data[$poster_key])) || + $this->auth->acl_get('m_approve', $forum_id); /** * Allow changing the result of calling is_visible -- cgit v1.2.1 From 8726baea9fd0b0ba9a09a00f24c4bb616ccec8cd Mon Sep 17 00:00:00 2001 From: v12mike Date: Sun, 6 Oct 2019 09:51:45 -0400 Subject: [ticket/9837] Display unapproved posts to their authors Change code order to improve efficiency. PHPBB3-9837 --- phpBB/phpbb/content_visibility.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/content_visibility.php') diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index bea49c0be1..457b53653d 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -147,7 +147,7 @@ class content_visibility $visibility = $data[$mode . '_visibility']; $poster_key = ($mode === 'topic') ? 'topic_poster' : 'poster_id'; $is_visible = ($visibility == ITEM_APPROVED) || - ($this->config['display_unapproved_posts'] && + ($this->config['display_unapproved_posts'] && ($this->user->data['user_id'] <> ANONYMOUS) && ($visibility == ITEM_UNAPPROVED || $visibility == ITEM_REAPPROVE) && ($this->user->data['user_id'] === $data[$poster_key])) || -- cgit v1.2.1 From 0a4cc5d2018dde19754f90b30ad49ff2718efc76 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 22 Nov 2019 09:20:18 +0100 Subject: [ticket/9837] Apply suggested changes by CHItA PHPBB3-9837 --- phpBB/phpbb/content_visibility.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/phpbb/content_visibility.php') diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 457b53653d..fbc56f3db2 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -148,9 +148,9 @@ class content_visibility $poster_key = ($mode === 'topic') ? 'topic_poster' : 'poster_id'; $is_visible = ($visibility == ITEM_APPROVED) || ($this->config['display_unapproved_posts'] && - ($this->user->data['user_id'] <> ANONYMOUS) && + ($this->user->data['user_id'] != ANONYMOUS) && ($visibility == ITEM_UNAPPROVED || $visibility == ITEM_REAPPROVE) && - ($this->user->data['user_id'] === $data[$poster_key])) || + ($this->user->data['user_id'] == $data[$poster_key])) || $this->auth->acl_get('m_approve', $forum_id); /** @@ -226,7 +226,7 @@ class content_visibility $visibility_query = $table_alias . $mode . '_visibility = '; $where_sql .= '(' . $visibility_query . ITEM_APPROVED . ')'; - if ($this->config['display_unapproved_posts'] && ($this->user->data['user_id'] <> ANONYMOUS)) + if ($this->config['display_unapproved_posts'] && ($this->user->data['user_id'] != ANONYMOUS)) { $poster_key = ($mode === 'topic') ? 'topic_poster' : 'poster_id'; $where_sql .= ' OR ((' . $visibility_query . ITEM_UNAPPROVED . ' OR ' . $visibility_query . ITEM_REAPPROVE .')'; -- cgit v1.2.1