mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/unapproved-posts-in-feed] View note for moderators on unapproved posts/topics with unapproved posts in ATOM Feed
This commit is contained in:
parent
d9567f121b
commit
46f85329da
2 changed files with 25 additions and 9 deletions
|
@ -103,6 +103,7 @@
|
||||||
<li>[Fix] Allow multibyte keys in request_var(). (Bug #51555)</li>
|
<li>[Fix] Allow multibyte keys in request_var(). (Bug #51555)</li>
|
||||||
<li>[Fix] Prevent wrong tar archive type detection. (Bug #12531)</li>
|
<li>[Fix] Prevent wrong tar archive type detection. (Bug #12531)</li>
|
||||||
<li>[Fix] Correct redirection after login to forum not in web root (Bug #58755)</li>
|
<li>[Fix] Correct redirection after login to forum not in web root (Bug #58755)</li>
|
||||||
|
<li>[Fix] View note for moderators on unapproved posts/topics with unapproved posts in ATOM Feed</li>
|
||||||
<li>[Feature] Support for Microsoft's Native SQL Server Driver for PHP (Bug #57055 - Patch by Chris Pucci at Microsoft)</li>
|
<li>[Feature] Support for Microsoft's Native SQL Server Driver for PHP (Bug #57055 - Patch by Chris Pucci at Microsoft)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -541,6 +541,19 @@ class phpbb_feed_base
|
||||||
return $forum_ids;
|
return $forum_ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function is_moderator_approve_forum($forum_id)
|
||||||
|
{
|
||||||
|
$forum_ids = $this->get_moderator_approve_forums();
|
||||||
|
|
||||||
|
if (!$forum_id)
|
||||||
|
{
|
||||||
|
// Global announcement, your a moderator in any forum than it's okay.
|
||||||
|
return (sizeof($forum_ids) > 0) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (in_array($forum_id, $forum_ids)) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
function get_excluded_forums()
|
function get_excluded_forums()
|
||||||
{
|
{
|
||||||
global $db, $cache;
|
global $db, $cache;
|
||||||
|
@ -677,7 +690,8 @@ class phpbb_feed_post_base extends phpbb_feed_base
|
||||||
if ($config['feed_item_statistics'])
|
if ($config['feed_item_statistics'])
|
||||||
{
|
{
|
||||||
$item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
|
$item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
|
||||||
. ' ' . $this->separator_stats . ' ' . $user->format_date($row['post_time']);
|
. ' ' . $this->separator_stats . ' ' . $user->format_date($row['post_time'])
|
||||||
|
. (($this->is_moderator_approve_forum($row['forum_id']) && !$row['post_approved']) ? ' ' . $this->separator_stats . ' ' . $user->lang['POST_UNAPPROVED'] : '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -719,8 +733,9 @@ class phpbb_feed_topic_base extends phpbb_feed_base
|
||||||
{
|
{
|
||||||
$item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
|
$item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
|
||||||
. ' ' . $this->separator_stats . ' ' . $user->format_date($row[$this->get('date')])
|
. ' ' . $this->separator_stats . ' ' . $user->format_date($row[$this->get('date')])
|
||||||
. ' ' . $this->separator_stats . ' ' . $user->lang['REPLIES'] . ' ' . $row['topic_replies']
|
. ' ' . $this->separator_stats . ' ' . $user->lang['REPLIES'] . ' ' . (($this->is_moderator_approve_forum($row['forum_id'])) ? $row['topic_replies_real'] : $row['topic_replies'])
|
||||||
. ' ' . $this->separator_stats . ' ' . $user->lang['VIEWS'] . ' ' . $row['topic_views'];
|
. ' ' . $this->separator_stats . ' ' . $user->lang['VIEWS'] . ' ' . $row['topic_views']
|
||||||
|
. (($this->is_moderator_approve_forum($row['forum_id']) && ($row['topic_replies_real'] != $row['topic_replies'])) ? ' ' . $this->separator_stats . ' ' . $user->lang['POSTS_UNAPPROVED'] : '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -780,7 +795,7 @@ class phpbb_feed_overall extends phpbb_feed_post_base
|
||||||
// Get the actual data
|
// Get the actual data
|
||||||
$this->sql = array(
|
$this->sql = array(
|
||||||
'SELECT' => 'f.forum_id, f.forum_name, ' .
|
'SELECT' => 'f.forum_id, f.forum_name, ' .
|
||||||
'p.post_id, p.topic_id, p.post_time, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, ' .
|
'p.post_id, p.topic_id, p.post_time, p.post_approved, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, ' .
|
||||||
'u.username, u.user_id',
|
'u.username, u.user_id',
|
||||||
'FROM' => array(
|
'FROM' => array(
|
||||||
POSTS_TABLE => 'p',
|
POSTS_TABLE => 'p',
|
||||||
|
@ -912,7 +927,7 @@ class phpbb_feed_forum extends phpbb_feed_post_base
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->sql = array(
|
$this->sql = array(
|
||||||
'SELECT' => 'p.post_id, p.topic_id, p.post_time, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, ' .
|
'SELECT' => 'p.post_id, p.topic_id, p.post_time, p.post_approved, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, ' .
|
||||||
'u.username, u.user_id',
|
'u.username, u.user_id',
|
||||||
'FROM' => array(
|
'FROM' => array(
|
||||||
POSTS_TABLE => 'p',
|
POSTS_TABLE => 'p',
|
||||||
|
@ -1077,7 +1092,7 @@ class phpbb_feed_topic extends phpbb_feed_post_base
|
||||||
global $auth, $db;
|
global $auth, $db;
|
||||||
|
|
||||||
$this->sql = array(
|
$this->sql = array(
|
||||||
'SELECT' => 'p.post_id, p.post_time, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, ' .
|
'SELECT' => 'p.post_id, p.post_time, p.post_approved, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, ' .
|
||||||
'u.username, u.user_id',
|
'u.username, u.user_id',
|
||||||
'FROM' => array(
|
'FROM' => array(
|
||||||
POSTS_TABLE => 'p',
|
POSTS_TABLE => 'p',
|
||||||
|
@ -1241,7 +1256,7 @@ class phpbb_feed_news extends phpbb_feed_topic_base
|
||||||
|
|
||||||
$this->sql = array(
|
$this->sql = array(
|
||||||
'SELECT' => 'f.forum_id, f.forum_name,
|
'SELECT' => 'f.forum_id, f.forum_name,
|
||||||
t.topic_id, t.topic_title, t.topic_poster, t.topic_first_poster_name, t.topic_replies, t.topic_views, t.topic_time,
|
t.topic_id, t.topic_title, t.topic_poster, t.topic_first_poster_name, t.topic_replies, t.topic_replies_real, t.topic_views, t.topic_time,
|
||||||
p.post_id, p.post_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url',
|
p.post_id, p.post_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url',
|
||||||
'FROM' => array(
|
'FROM' => array(
|
||||||
TOPICS_TABLE => 't',
|
TOPICS_TABLE => 't',
|
||||||
|
@ -1314,7 +1329,7 @@ class phpbb_feed_topics extends phpbb_feed_topic_base
|
||||||
|
|
||||||
$this->sql = array(
|
$this->sql = array(
|
||||||
'SELECT' => 'f.forum_id, f.forum_name,
|
'SELECT' => 'f.forum_id, f.forum_name,
|
||||||
t.topic_id, t.topic_title, t.topic_poster, t.topic_first_poster_name, t.topic_replies, t.topic_views, t.topic_time,
|
t.topic_id, t.topic_title, t.topic_poster, t.topic_first_poster_name, t.topic_replies, t.topic_replies_real, t.topic_views, t.topic_time,
|
||||||
p.post_id, p.post_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url',
|
p.post_id, p.post_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url',
|
||||||
'FROM' => array(
|
'FROM' => array(
|
||||||
TOPICS_TABLE => 't',
|
TOPICS_TABLE => 't',
|
||||||
|
@ -1412,7 +1427,7 @@ class phpbb_feed_topics_active extends phpbb_feed_topic_base
|
||||||
|
|
||||||
$this->sql = array(
|
$this->sql = array(
|
||||||
'SELECT' => 'f.forum_id, f.forum_name,
|
'SELECT' => 'f.forum_id, f.forum_name,
|
||||||
t.topic_id, t.topic_title, t.topic_replies, t.topic_views,
|
t.topic_id, t.topic_title, t.topic_replies, t.topic_replies_real, t.topic_views,
|
||||||
t.topic_last_poster_id, t.topic_last_poster_name, t.topic_last_post_time,
|
t.topic_last_poster_id, t.topic_last_poster_name, t.topic_last_post_time,
|
||||||
p.post_id, p.post_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url',
|
p.post_id, p.post_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url',
|
||||||
'FROM' => array(
|
'FROM' => array(
|
||||||
|
|
Loading…
Add table
Reference in a new issue