mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/11271] Formatting code and removing null assignment.
Formatted code and replaced null assignment with empty array assignment to attachments parameter in method 'feed_generate_content'. PHPBB3-11271
This commit is contained in:
parent
31957abeb1
commit
08fdd30917
1 changed files with 5 additions and 5 deletions
10
phpBB/feed.php
Normal file → Executable file
10
phpBB/feed.php
Normal file → Executable file
|
@ -110,7 +110,7 @@ while ($row = $feed->get_item())
|
||||||
'title' => censor_text($title),
|
'title' => censor_text($title),
|
||||||
'category' => ($config['feed_item_statistics'] && !empty($row['forum_id'])) ? $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'] && isset($row['forum_name'])) ? $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, $row['forum_id'], (($row['post_attachment']) ? $feed->attachments[$row['post_id']] : null))),
|
'description' => censor_text(feed_generate_content($row[$feed->get('text')], $row[$feed->get('bbcode_uid')], $row[$feed->get('bitfield')], $options, $row['forum_id'], (($row['post_attachment']) ? $feed->attachments[$row['post_id']] : array()))),
|
||||||
'statistics' => '',
|
'statistics' => '',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -334,7 +334,7 @@ function feed_generate_content($content, $uid, $bitfield, $options, $forum_id, $
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove Comments from inline attachments [ia]
|
// Remove Comments from inline attachments [ia]
|
||||||
$content = preg_replace('#<dd>(.*?)</dd>#','',$content);
|
$content = preg_replace('#<dd>(.*?)</dd>#','',$content);
|
||||||
|
|
||||||
// Replace some entities with their unicode counterpart
|
// Replace some entities with their unicode counterpart
|
||||||
$entities = array(
|
$entities = array(
|
||||||
|
@ -709,7 +709,7 @@ class phpbb_feed_post_base extends phpbb_feed_base
|
||||||
function fetch_attachments()
|
function fetch_attachments()
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
$sql_array = array(
|
$sql_array = array(
|
||||||
'SELECT' => 'a.*',
|
'SELECT' => 'a.*',
|
||||||
'FROM' => array(
|
'FROM' => array(
|
||||||
|
@ -718,7 +718,7 @@ class phpbb_feed_post_base extends phpbb_feed_base
|
||||||
'WHERE' => 'a.in_message = 0 ',
|
'WHERE' => 'a.in_message = 0 ',
|
||||||
'ORDER_BY' => 'a.filetime DESC, a.post_msg_id ASC'
|
'ORDER_BY' => 'a.filetime DESC, a.post_msg_id ASC'
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isset($this->topic_id))
|
if (isset($this->topic_id))
|
||||||
{
|
{
|
||||||
$sql_array['WHERE'] .= 'AND a.topic_id = ' . $this->topic_id;
|
$sql_array['WHERE'] .= 'AND a.topic_id = ' . $this->topic_id;
|
||||||
|
@ -736,7 +736,7 @@ class phpbb_feed_post_base extends phpbb_feed_base
|
||||||
|
|
||||||
$sql = $db->sql_build_query('SELECT', $sql_array);
|
$sql = $db->sql_build_query('SELECT', $sql_array);
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
// Set attachments in feed items
|
// Set attachments in feed items
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue