mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
News feed: Correctly handle global announcements.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10345 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
6cc60ee8c2
commit
69c07b8330
2 changed files with 23 additions and 10 deletions
|
@ -119,6 +119,7 @@
|
||||||
<li>[Fix] Correct wording for "How do I show an image below my username" question answer in FAQ. (Bug #23935)</li>
|
<li>[Fix] Correct wording for "How do I show an image below my username" question answer in FAQ. (Bug #23935)</li>
|
||||||
<li>[Fix] Handle export of private messages where all recipients were deleted. (Bug #50985)</li>
|
<li>[Fix] Handle export of private messages where all recipients were deleted. (Bug #50985)</li>
|
||||||
<li>[Fix] Correctly get unread status information for global announcements in search results.</li>
|
<li>[Fix] Correctly get unread status information for global announcements in search results.</li>
|
||||||
|
<li>[Fix] Correctly handle global announcements in ATOM feeds.</li>
|
||||||
<li>[Change] Move redirect into a hidden field to avoid issues with mod_security. (Bug #54145)</li>
|
<li>[Change] Move redirect into a hidden field to avoid issues with mod_security. (Bug #54145)</li>
|
||||||
<li>[Change] Log activation through inactive users ACP. (Bug #30145)</li>
|
<li>[Change] Log activation through inactive users ACP. (Bug #30145)</li>
|
||||||
<li>[Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)</li>
|
<li>[Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)</li>
|
||||||
|
|
|
@ -93,8 +93,8 @@ while ($row = $feed->get_item())
|
||||||
'pubdate' => feed_format_date($item_time),
|
'pubdate' => feed_format_date($item_time),
|
||||||
'link' => '',
|
'link' => '',
|
||||||
'title' => censor_text($title),
|
'title' => censor_text($title),
|
||||||
'category' => ($config['feed_item_statistics']) ? $board_url . '/viewforum.' . $phpEx . '?f=' . $row['forum_id'] : '',
|
'category' => ($config['feed_item_statistics'] && !empty($row['forum_id'])) ? $board_url . '/viewforum.' . $phpEx . '?f=' . $row['forum_id'] : '',
|
||||||
'category_name' => ($config['feed_item_statistics']) ? $row['forum_name'] : '',
|
'category_name' => ($config['feed_item_statistics'] && isset($row['forum_name'])) ? $row['forum_name'] : '',
|
||||||
'description' => censor_text(feed_generate_content($row[$feed->get('text')], $row[$feed->get('bbcode_uid')], $row[$feed->get('bitfield')], $options)),
|
'description' => censor_text(feed_generate_content($row[$feed->get('text')], $row[$feed->get('bbcode_uid')], $row[$feed->get('bitfield')], $options)),
|
||||||
'statistics' => '',
|
'statistics' => '',
|
||||||
);
|
);
|
||||||
|
@ -188,7 +188,7 @@ foreach ($item_vars as $row)
|
||||||
echo '<link href="' . $row['link'] . '"/>' . "\n";
|
echo '<link href="' . $row['link'] . '"/>' . "\n";
|
||||||
echo '<title type="html"><![CDATA[' . $row['title'] . ']]></title>' . "\n\n";
|
echo '<title type="html"><![CDATA[' . $row['title'] . ']]></title>' . "\n\n";
|
||||||
|
|
||||||
if (!empty($row['category']))
|
if (!empty($row['category']) && isset($row['category_name']))
|
||||||
{
|
{
|
||||||
echo '<category term="' . $row['category_name'] . '" scheme="' . $row['category'] . '" label="' . $row['category_name'] . '"/>' . "\n";
|
echo '<category term="' . $row['category_name'] . '" scheme="' . $row['category'] . '" label="' . $row['category_name'] . '"/>' . "\n";
|
||||||
}
|
}
|
||||||
|
@ -955,6 +955,14 @@ class phpbb_feed_forums extends phpbb_feed_base
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* News feed
|
||||||
|
*
|
||||||
|
* This will give you {$this->num_items} first posts
|
||||||
|
* of all topics in the selected news forums.
|
||||||
|
*
|
||||||
|
* @package phpBB3
|
||||||
|
*/
|
||||||
class phpbb_feed_news extends phpbb_feed_base
|
class phpbb_feed_news extends phpbb_feed_base
|
||||||
{
|
{
|
||||||
function set_keys()
|
function set_keys()
|
||||||
|
@ -1016,20 +1024,24 @@ class phpbb_feed_news extends phpbb_feed_base
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build SQL Query
|
|
||||||
$this->sql = array(
|
$this->sql = array(
|
||||||
'SELECT' => 'f.forum_id, f.forum_name, f.forum_topics, f.forum_posts,
|
'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_views, t.topic_time,
|
||||||
p.post_id, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url',
|
p.post_id, 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',
|
||||||
FORUMS_TABLE => 'f',
|
|
||||||
POSTS_TABLE => 'p',
|
POSTS_TABLE => 'p',
|
||||||
),
|
),
|
||||||
'WHERE' => $db->sql_in_set('t.forum_id', $in_fid_ary) . '
|
'LEFT_JOIN' => array(
|
||||||
AND f.forum_id = t.forum_id
|
array(
|
||||||
AND p.post_id = t.topic_first_post_id
|
'FROM' => array(FORUMS_TABLE => 'f'),
|
||||||
AND t.topic_moved_id = 0',
|
'ON' => 'f.forum_id = t.forum_id',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'WHERE' => 'p.post_id = t.topic_first_post_id
|
||||||
|
AND t.topic_moved_id = 0
|
||||||
|
AND (' . $db->sql_in_set('t.forum_id', $in_fid_ary) . '
|
||||||
|
OR t.topic_type = ' . POST_GLOBAL . ')',
|
||||||
'ORDER_BY' => 't.topic_time DESC',
|
'ORDER_BY' => 't.topic_time DESC',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue