Merge pull request #577 from nlegoff/protected_rss_url

[3.9] Delete unusued get_protected_rss_url function
This commit is contained in:
Romain Neutron
2013-08-24 05:43:49 -07:00
2 changed files with 0 additions and 31 deletions

View File

@@ -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
*

View File

@@ -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);