Cleanup namepaces, variables uses

This commit is contained in:
Romain Neutron
2012-09-28 16:06:28 +02:00
parent 372861deb4
commit 1700565862
232 changed files with 593 additions and 1446 deletions

View File

@@ -249,7 +249,6 @@ class Session_Authentication_Native implements Session_Authentication_Interface
protected function check_and_revoke_badlogs($ip)
{
$conn = $this->app['phraseanet.appbox']->get_connection();
$registry = $this->app['phraseanet.registry'];
$sql = 'SELECT id FROM badlog
WHERE (login = :login OR ip = :ip) AND locked="1"';
@@ -271,7 +270,7 @@ class Session_Authentication_Native implements Session_Authentication_Interface
$stmt->execute(array(':login' => $this->login, ':ip' => $ip));
$stmt->closeCursor();
} elseif ($row_count > 9) {
if ($this->is_captcha_activated($registry))
if ($this->is_captcha_activated($this->app['phraseanet.registry']))
throw new Exception_Session_RequireCaptcha('Require captcha');
}
@@ -285,8 +284,6 @@ class Session_Authentication_Native implements Session_Authentication_Interface
*/
protected function is_captcha_activated(registryInterface $registry)
{
$registry = $this->app['phraseanet.registry'];
return ($registry->get('GV_captchas')
&& trim($registry->get('GV_captcha_private_key')) !== ''
&& trim($registry->get('GV_captcha_public_key') !== ''));

View File

@@ -37,12 +37,6 @@ class Session_Authentication_PersistentCookie implements Session_Authentication_
*/
protected $ses_id;
/**
*
* @param Application $appbox
* @param type $persistent_cookie
* @return Session_Authentication_PersistentCookie
*/
public function __construct(Application $app, $persistent_cookie)
{
$this->app= $app;

View File

@@ -32,12 +32,6 @@ class Session_Authentication_Token implements Session_Authentication_Interface
protected $token;
protected $user;
/**
*
* @param appbox $appbox
* @param type $token
* @return Session_Authentication_Token
*/
public function __construct(Application $app, $token)
{
$this->app = $app;

View File

@@ -100,7 +100,6 @@ class Session_Logger
public static function create(Application $app, databox $databox, Browser $browser)
{
$colls = array();
$registry = $app['phraseanet.registry'];
if ($app['phraseanet.user']) {
$bases = $app['phraseanet.user']->ACL()->get_granted_base(array(), array($databox->get_sbas_id()));