mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 03:23:19 +00:00
Coding standards
This commit is contained in:
@@ -907,6 +907,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
public static function get_usr_id_from_email($email)
|
||||
{
|
||||
if (is_null($email))
|
||||
|
||||
return false;
|
||||
|
||||
$conn = connection::getPDOConnection();
|
||||
@@ -1277,6 +1278,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
protected function load_preferences()
|
||||
{
|
||||
if ($this->_prefs)
|
||||
|
||||
return $this;
|
||||
|
||||
$registry = \registry::get_instance();
|
||||
@@ -1485,6 +1487,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
{
|
||||
$this->load_preferences();
|
||||
if (isset($this->_prefs[$prop]) && $this->_prefs[$prop] === $value)
|
||||
|
||||
return $value;
|
||||
|
||||
$ok = true;
|
||||
@@ -1522,6 +1525,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
$appbox = appbox::get_instance();
|
||||
$session = $appbox->get_session();
|
||||
if (!$session->is_authenticated())
|
||||
|
||||
return;
|
||||
|
||||
$ses_id = $session->get_ses_id();
|
||||
@@ -1796,6 +1800,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
public function get_nonce()
|
||||
{
|
||||
if ($this->nonce)
|
||||
|
||||
return $this->nonce;
|
||||
$nonce = false;
|
||||
|
||||
|
@@ -542,6 +542,7 @@ class User_Query implements User_QueryInterface
|
||||
public function get_total()
|
||||
{
|
||||
if ($this->total)
|
||||
|
||||
return $this->total;
|
||||
|
||||
$conn = $this->appbox->get_connection();
|
||||
@@ -702,6 +703,7 @@ class User_Query implements User_QueryInterface
|
||||
public function on_base_ids(Array $base_ids = null)
|
||||
{
|
||||
if (!$base_ids)
|
||||
|
||||
return $this;
|
||||
|
||||
$this->bases_restrictions = true;
|
||||
@@ -726,6 +728,7 @@ class User_Query implements User_QueryInterface
|
||||
public function on_sbas_ids(Array $sbas_ids = null)
|
||||
{
|
||||
if (!$sbas_ids)
|
||||
|
||||
return $this;
|
||||
|
||||
$this->sbas_restrictions = true;
|
||||
|
@@ -192,6 +192,7 @@ class connection
|
||||
self::$_PDO_instance[$name] = null;
|
||||
unset(self::$_PDO_instance[$name]);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -829,8 +829,10 @@ class task_period_archive extends task_abstract
|
||||
{
|
||||
$magicmethod = strtoupper($sxDotPhrasea->magicfile['method']);
|
||||
if($magicmethod == 'LOCK' && file_exists($path . '/' . $magicfile))
|
||||
|
||||
return;
|
||||
elseif($magicmethod == 'UNLOCK' && !file_exists($path . '/' . $magicfile))
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user