mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
Add curly braces
This commit is contained in:
@@ -130,8 +130,9 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
|
||||
*/
|
||||
public function get_icon_url()
|
||||
{
|
||||
if ($this->icon_url)
|
||||
if ($this->icon_url) {
|
||||
return $this->icon_url;
|
||||
}
|
||||
|
||||
$url = '/skins/icons/rss32.gif';
|
||||
|
||||
|
@@ -83,8 +83,9 @@ class Feed_Aggregate extends Feed_Abstract implements Feed_Interface
|
||||
{
|
||||
$result = new Feed_Entry_Collection();
|
||||
|
||||
if (count($this->feeds) === 0)
|
||||
if (count($this->feeds) === 0) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
$offset_start = (int) $offset_start;
|
||||
$how_many = $how_many > 20 ? 20 : (int) $how_many;
|
||||
@@ -117,8 +118,10 @@ class Feed_Aggregate extends Feed_Abstract implements Feed_Interface
|
||||
*/
|
||||
public function get_count_total_entries()
|
||||
{
|
||||
if (count($this->feeds) === 0)
|
||||
if (count($this->feeds) === 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$sql = 'SELECT count(id) as number
|
||||
FROM feed_entries
|
||||
WHERE feed_id
|
||||
|
@@ -406,8 +406,9 @@ class Feed_Entry_Adapter implements Feed_Entry_Interface, cache_cacheableInterfa
|
||||
*/
|
||||
public function get_content()
|
||||
{
|
||||
if ($this->items)
|
||||
if ($this->items) {
|
||||
return $this->items;
|
||||
}
|
||||
|
||||
$rs = $this->retrieve_elements();
|
||||
$items = array();
|
||||
|
@@ -210,7 +210,9 @@ class Feed_Publisher_Adapter implements Feed_Publisher_Interface, cache_cacheabl
|
||||
{
|
||||
foreach ($feed->get_publishers() as $publisher) {
|
||||
if ($publisher->get_user()->get_id() === $user->get_id())
|
||||
{
|
||||
return $publisher;
|
||||
}
|
||||
}
|
||||
throw new Exception_Feed_PublisherNotFound('Publisher not found');
|
||||
}
|
||||
|
@@ -227,11 +227,13 @@ abstract class Feed_XML_Abstract
|
||||
|
||||
$medium = strtolower($content->get_record()->get_type());
|
||||
|
||||
if ( ! in_array($medium, array('image', 'audio', 'video')))
|
||||
if ( ! in_array($medium, array('image', 'audio', 'video'))) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
if ( ! $preview_permalink || ! $thumbnail_permalink)
|
||||
if ( ! $preview_permalink || ! $thumbnail_permalink) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
$group = $this->addTag($document, $item, 'media:group');
|
||||
|
||||
|
@@ -357,11 +357,13 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface
|
||||
|
||||
$medium = strtolower($content->get_record()->get_type());
|
||||
|
||||
if ( ! in_array($medium, array('image', 'audio', 'video')))
|
||||
if ( ! in_array($medium, array('image', 'audio', 'video'))) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
if ( ! $preview_permalink || ! $thumbnail_permalink)
|
||||
if ( ! $preview_permalink || ! $thumbnail_permalink) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
//add item node to channel node
|
||||
$item = $this->addTag($document, $node, 'item');
|
||||
|
Reference in New Issue
Block a user