mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
Cleanup namepaces, variables uses
This commit is contained in:
@@ -59,12 +59,6 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
|
||||
const CACHE_USER_TOKEN = 'usr_token';
|
||||
const MAX_ENTRIES = 20;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param appbox $appbox
|
||||
* @param int $id
|
||||
* @return Feed_Adapter
|
||||
*/
|
||||
public function __construct(Application $app, $id)
|
||||
{
|
||||
$this->app = $app;
|
||||
@@ -161,10 +155,8 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
|
||||
throw new \Alchemy\Phrasea\Exception\InvalidArgumentException('File does not exists');
|
||||
}
|
||||
|
||||
$registry = $this->app['phraseanet.registry'];
|
||||
|
||||
$config_file = $registry->get('GV_RootPath') . 'config/feed_' . $this->get_id() . '.jpg';
|
||||
$www_file = $registry->get('GV_RootPath') . 'www/custom/feed_' . $this->get_id() . '.jpg';
|
||||
$config_file = $this->app['phraseanet.registry']->get('GV_RootPath') . 'config/feed_' . $this->get_id() . '.jpg';
|
||||
$www_file = $this->app['phraseanet.registry']->get('GV_RootPath') . 'www/custom/feed_' . $this->get_id() . '.jpg';
|
||||
|
||||
copy($file, $config_file);
|
||||
copy($file, $www_file);
|
||||
@@ -192,10 +184,9 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
|
||||
|
||||
public function reset_icon()
|
||||
{
|
||||
$registry = $this->app['phraseanet.registry'];
|
||||
$config_file = $registry->get('GV_RootPath')
|
||||
$config_file = $this->app['phraseanet.registry']->get('GV_RootPath')
|
||||
. 'config/feed_' . $this->get_id() . '.jpg';
|
||||
$www_file = $registry->get('GV_RootPath')
|
||||
$www_file = $this->app['phraseanet.registry']->get('GV_RootPath')
|
||||
. 'www/custom/feed_' . $this->get_id() . '.jpg';
|
||||
|
||||
if (is_file($config_file))
|
||||
@@ -440,14 +431,6 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param appbox $appbox
|
||||
* @param User_Adapter $user
|
||||
* @param string $title
|
||||
* @param string $subtitle
|
||||
* @return Feed_Adapter
|
||||
*/
|
||||
public static function create(Application $app, User_Adapter $user, $title, $subtitle)
|
||||
{
|
||||
$sql = 'INSERT INTO feeds (id, title, subtitle, created_on, updated_on)
|
||||
@@ -465,13 +448,6 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
|
||||
return $feed;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param appbox $appbox
|
||||
* @param User_Adapter $user
|
||||
* @param int $id
|
||||
* @return Feed_Adapter
|
||||
*/
|
||||
public static function load_with_user(Application $app, User_Adapter $user, $id)
|
||||
{
|
||||
$feed = new self($app, $id);
|
||||
|
@@ -25,12 +25,6 @@ class Feed_Aggregate extends Feed_Abstract implements Feed_Interface
|
||||
*/
|
||||
protected $feeds;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param appbox $appbox
|
||||
* @param array $feeds
|
||||
* @return Feed_Aggregate
|
||||
*/
|
||||
public function __construct(Application $app, Array $feeds)
|
||||
{
|
||||
$this->title = 'AGGREGGATE';
|
||||
|
@@ -170,11 +170,9 @@ class Feed_Entry_Adapter implements Feed_Entry_Interface, cache_cacheableInterfa
|
||||
|
||||
public function get_link()
|
||||
{
|
||||
$registry = $this->app['phraseanet.registry'];
|
||||
|
||||
$href = sprintf(
|
||||
'%slightbox/feeds/entry/%d/'
|
||||
, $registry->get('GV_ServerName')
|
||||
, $this->app['phraseanet.registry']->get('GV_ServerName')
|
||||
, $this->get_id()
|
||||
);
|
||||
|
||||
@@ -496,17 +494,6 @@ class Feed_Entry_Adapter implements Feed_Entry_Interface, cache_cacheableInterfa
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param appbox $appbox
|
||||
* @param Feed_Adapter $feed
|
||||
* @param Feed_Publisher_Adapter $publisher
|
||||
* @param string $title
|
||||
* @param string $subtitle
|
||||
* @param string $author_name
|
||||
* @param string $author_mail
|
||||
* @return Feed_Entry_Adapter
|
||||
*/
|
||||
public static function create(Application $app, Feed_Adapter $feed
|
||||
, Feed_Publisher_Adapter $publisher, $title, $subtitle, $author_name, $author_mail)
|
||||
{
|
||||
|
Reference in New Issue
Block a user