mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Fix coding standards
This commit is contained in:
@@ -26,7 +26,7 @@ abstract class Feed_Abstract
|
||||
*/
|
||||
const FORMAT_ATOM = 'atom';
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
const FORMAT_COOLIRIS = 'cooliris';
|
||||
|
||||
|
@@ -91,7 +91,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
$sql = 'SELECT id, title, subtitle, created_on, updated_on, base_id, public
|
||||
@@ -135,6 +135,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
|
||||
public function get_icon_url()
|
||||
{
|
||||
if ($this->icon_url)
|
||||
|
||||
return $this->icon_url;
|
||||
|
||||
$url = '/skins/icons/rss32.gif';
|
||||
@@ -248,6 +249,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
|
||||
public function has_access(User_Adapter $user)
|
||||
{
|
||||
if ($this->get_collection() instanceof collection)
|
||||
|
||||
return $user->ACL()->has_access_to_base($this->collection->get_base_id());
|
||||
return true;
|
||||
}
|
||||
@@ -262,7 +264,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return $this->public;
|
||||
}
|
||||
|
||||
@@ -292,6 +294,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
|
||||
public function add_publisher(User_Adapter $user)
|
||||
{
|
||||
if (in_array($user->get_id(), array_keys($this->get_publishers())))
|
||||
|
||||
return $this;
|
||||
|
||||
Feed_Publisher_Adapter::create($this->appbox, $user, $this, false);
|
||||
@@ -307,6 +310,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
|
||||
protected function load_publishers()
|
||||
{
|
||||
if (is_array($this->publishers))
|
||||
|
||||
return $this->publishers;
|
||||
|
||||
$sql = 'SELECT id, usr_id, owner FROM feed_publishers
|
||||
@@ -493,7 +497,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
$sql = 'SELECT count(id) as number
|
||||
@@ -596,6 +600,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
|
||||
public function get_homepage_link(registryInterface $registry, $format, $page = null)
|
||||
{
|
||||
if (!$this->is_public())
|
||||
|
||||
return null;
|
||||
switch ($format)
|
||||
{
|
||||
@@ -637,11 +642,12 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
|
||||
try
|
||||
{
|
||||
if (!$renew)
|
||||
|
||||
return $this->get_data_from_cache($cache_key);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
$sql = 'SELECT token FROM feed_tokens
|
||||
|
@@ -357,11 +357,11 @@ class Feed_Entry_Adapter implements Feed_Entry_Interface, cache_cacheableInterfa
|
||||
|
||||
return $this->publisher;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param User_adapter $user
|
||||
* @return boolean
|
||||
* @return boolean
|
||||
*/
|
||||
public function is_publisher(User_adapter $user)
|
||||
{
|
||||
|
@@ -370,9 +370,11 @@ 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')))
|
||||
|
||||
return $this;
|
||||
|
||||
if (!$preview_permalink || !$thumbnail_permalink)
|
||||
|
||||
return $this;
|
||||
|
||||
//add item node to channel node
|
||||
|
Reference in New Issue
Block a user