mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 12:03:14 +00:00
Merge pull request #577 from nlegoff/protected_rss_url
[3.9] Delete unusued get_protected_rss_url function
This commit is contained in:
@@ -414,35 +414,6 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
return $this->ACL;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param boolean $renew
|
||||
* @return system_url
|
||||
*/
|
||||
public function get_protected_rss_url($renew = false)
|
||||
{
|
||||
$token = $title = false;
|
||||
|
||||
if (!$renew) {
|
||||
$sql = 'SELECT value FROM tokens WHERE usr_id = :usr_id AND type="rss"';
|
||||
$stmt = $this->app['phraseanet.appbox']->get_connection()->prepare($sql);
|
||||
$stmt->execute(array(':usr_id' => $this->get_id()));
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$stmt->closeCursor();
|
||||
$token = $row['value'];
|
||||
} else {
|
||||
$sql = 'DELETE FROM tokens WHERE usr_id = :usr_id AND type="rss"';
|
||||
$stmt = $this->app['phraseanet.appbox']->get_connection()->prepare($sql);
|
||||
$stmt->execute(array(':usr_id' => $this->get_id()));
|
||||
$stmt->closeCursor();
|
||||
}
|
||||
if ($token === false) {
|
||||
$token = $this->app['tokens']->getUrlToken(\random::TYPE_RSS, $this->id);
|
||||
}
|
||||
|
||||
return new system_url($this->app['phraseanet.registry']->get('GV_ServerName') . 'atom/' . $token);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query in the cache
|
||||
*
|
||||
|
@@ -30,8 +30,6 @@ interface User_Interface
|
||||
|
||||
public function set_email($email);
|
||||
|
||||
public function get_protected_rss_url($renew = false);
|
||||
|
||||
public function get_country();
|
||||
|
||||
public function set_mail_notifications($boolean);
|
||||
|
Reference in New Issue
Block a user