aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/feed.php
diff options
context:
space:
mode:
authorerangamapa <erangamapa@gmail.com>2013-04-08 08:10:36 +0530
committerDhruv <dhruv.goel92@gmail.com>2013-12-27 00:22:24 +0530
commit08d69de933e2ca9ef40a6bf4f9273bae88de0199 (patch)
treec64a794be95bdd1d95a6332e8a5284885044d6fb /phpBB/feed.php
parentcca4067694137f32dd08705e239e62bd5b0980ee (diff)
downloadforums-08d69de933e2ca9ef40a6bf4f9273bae88de0199.tar
forums-08d69de933e2ca9ef40a6bf4f9273bae88de0199.tar.gz
forums-08d69de933e2ca9ef40a6bf4f9273bae88de0199.tar.bz2
forums-08d69de933e2ca9ef40a6bf4f9273bae88de0199.tar.xz
forums-08d69de933e2ca9ef40a6bf4f9273bae88de0199.zip
[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
Diffstat (limited to 'phpBB/feed.php')
-rwxr-xr-x[-rw-r--r--]phpBB/feed.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/feed.php b/phpBB/feed.php
index 1b854c1705..d19aa48f17 100644..100755
--- a/phpBB/feed.php
+++ b/phpBB/feed.php
@@ -110,7 +110,7 @@ while ($row = $feed->get_item())
'title' => censor_text($title),
'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'] : '',
- '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' => '',
);
@@ -334,7 +334,7 @@ function feed_generate_content($content, $uid, $bitfield, $options, $forum_id, $
}
// 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
$entities = array(
@@ -709,7 +709,7 @@ class phpbb_feed_post_base extends phpbb_feed_base
function fetch_attachments()
{
global $db;
-
+
$sql_array = array(
'SELECT' => 'a.*',
'FROM' => array(
@@ -718,7 +718,7 @@ class phpbb_feed_post_base extends phpbb_feed_base
'WHERE' => 'a.in_message = 0 ',
'ORDER_BY' => 'a.filetime DESC, a.post_msg_id ASC'
);
-
+
if (isset($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);
$result = $db->sql_query($sql);
-
+
// Set attachments in feed items
while ($row = $db->sql_fetchrow($result))
{