mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge branch 'feature/nickvergessen/unapproved-posts-in-feed' into develop-olympus
* feature/nickvergessen/unapproved-posts-in-feed: [feature/unapproved-posts-in-feed] Little changelog correction [feature/unapproved-posts-in-feed] Increase performance of is_moderator_approve_forum() as per bantu [feature/unapproved-posts-in-feed] View note for moderators on unapproved posts/topics with unapproved posts in ATOM Feed Conflicts: phpBB/docs/CHANGELOG.html
This commit is contained in:
commit
1af1a96501
2 changed files with 30 additions and 9 deletions
|
@ -114,6 +114,7 @@
|
||||||
<li>[Fix] Fix dead link in MCP on reports for global announcements in prosilver. (Bug #9512)</li>
|
<li>[Fix] Fix dead link in MCP on reports for global announcements in prosilver. (Bug #9512)</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>
|
||||||
<li>[Feature] The memcache acm plugin now supports multiple memcache servers.</li>
|
<li>[Feature] The memcache acm plugin now supports multiple memcache servers.</li>
|
||||||
|
<li>[Feature] Show note for moderators on unapproved posts/topics with unapproved posts in ATOM Feed (Bug #9511)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a name="v307"></a><h3>1.i. Changes since 3.0.7</h3>
|
<a name="v307"></a><h3>1.i. Changes since 3.0.7</h3>
|
||||||
|
|
|
@ -541,6 +541,24 @@ class phpbb_feed_base
|
||||||
return $forum_ids;
|
return $forum_ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function is_moderator_approve_forum($forum_id)
|
||||||
|
{
|
||||||
|
static $forum_ids;
|
||||||
|
|
||||||
|
if (!isset($forum_ids))
|
||||||
|
{
|
||||||
|
$forum_ids = array_flip($this->get_moderator_approve_forums());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$forum_id)
|
||||||
|
{
|
||||||
|
// Global announcement, your a moderator in any forum than it's okay.
|
||||||
|
return (!empty($forum_ids)) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (isset($forum_ids[$forum_id])) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
function get_excluded_forums()
|
function get_excluded_forums()
|
||||||
{
|
{
|
||||||
global $db, $cache;
|
global $db, $cache;
|
||||||
|
@ -677,7 +695,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 +738,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 +800,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(
|
||||||
USERS_TABLE => 'u',
|
USERS_TABLE => 'u',
|
||||||
|
@ -912,7 +932,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 +1097,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 +1261,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 +1334,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 +1432,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