mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Fix CS
This commit is contained in:
@@ -18,46 +18,45 @@
|
||||
class Feed_TokenAggregate extends Feed_Token
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
* @param appbox $appbox
|
||||
* @param string $token
|
||||
* @return Feed_TokenAggregate
|
||||
*/
|
||||
public function __construct(appbox &$appbox, $token)
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @param appbox $appbox
|
||||
* @param string $token
|
||||
* @return Feed_TokenAggregate
|
||||
*/
|
||||
public function __construct(appbox &$appbox, $token)
|
||||
{
|
||||
|
||||
$sql = 'SELECT usr_id FROM feed_tokens
|
||||
$sql = 'SELECT usr_id FROM feed_tokens
|
||||
WHERE aggregated = "1" AND token = :token';
|
||||
|
||||
$params = array(
|
||||
':token' => $token
|
||||
);
|
||||
$params = array(
|
||||
':token' => $token
|
||||
);
|
||||
|
||||
$stmt = $appbox->get_connection()->prepare($sql);
|
||||
$stmt->execute($params);
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$stmt->closeCursor();
|
||||
$stmt = $appbox->get_connection()->prepare($sql);
|
||||
$stmt->execute($params);
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$stmt->closeCursor();
|
||||
|
||||
if (!$row)
|
||||
throw new Exception_FeedNotFound($token);
|
||||
if ( ! $row)
|
||||
throw new Exception_FeedNotFound($token);
|
||||
|
||||
$this->usr_id = $row['usr_id'];
|
||||
$this->appbox = $appbox;
|
||||
$this->usr_id = $row['usr_id'];
|
||||
$this->appbox = $appbox;
|
||||
|
||||
return $this;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Feed_Aggregate
|
||||
*/
|
||||
public function get_feed()
|
||||
{
|
||||
if (!$this->feed)
|
||||
$this->feed = Feed_Aggregate::load_with_user($this->appbox, $this->get_user());
|
||||
|
||||
return $this->feed;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @return Feed_Aggregate
|
||||
*/
|
||||
public function get_feed()
|
||||
{
|
||||
if ( ! $this->feed)
|
||||
$this->feed = Feed_Aggregate::load_with_user($this->appbox, $this->get_user());
|
||||
|
||||
return $this->feed;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user