mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 04:23:19 +00:00
Coding Standards
This commit is contained in:
@@ -302,6 +302,7 @@ class Basket
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($total_el1 === $total_el2)
|
if($total_el1 === $total_el2)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return $total_el1 < $total_el2 ? 1 : -1;
|
return $total_el1 < $total_el2 ? 1 : -1;
|
||||||
@@ -328,6 +329,7 @@ class Basket
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($total_el1 === $total_el2)
|
if($total_el1 === $total_el2)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return $total_el1 < $total_el2 ? 1 : -1;
|
return $total_el1 < $total_el2 ? 1 : -1;
|
||||||
|
@@ -411,6 +411,7 @@ class Feed_Entry_Adapter implements Feed_Entry_Interface, cache_cacheableInterfa
|
|||||||
public function get_content()
|
public function get_content()
|
||||||
{
|
{
|
||||||
if ($this->items)
|
if ($this->items)
|
||||||
|
|
||||||
return $this->items;
|
return $this->items;
|
||||||
|
|
||||||
$rs = $this->retrieve_elements();
|
$rs = $this->retrieve_elements();
|
||||||
|
@@ -582,6 +582,7 @@ class User_Query implements User_QueryInterface
|
|||||||
public function get_total()
|
public function get_total()
|
||||||
{
|
{
|
||||||
if ($this->total)
|
if ($this->total)
|
||||||
|
|
||||||
return $this->total;
|
return $this->total;
|
||||||
|
|
||||||
$conn = $this->appbox->get_connection();
|
$conn = $this->appbox->get_connection();
|
||||||
@@ -742,6 +743,7 @@ class User_Query implements User_QueryInterface
|
|||||||
public function on_base_ids(Array $base_ids = null)
|
public function on_base_ids(Array $base_ids = null)
|
||||||
{
|
{
|
||||||
if (!$base_ids)
|
if (!$base_ids)
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
||||||
$this->bases_restrictions = true;
|
$this->bases_restrictions = true;
|
||||||
@@ -766,6 +768,7 @@ class User_Query implements User_QueryInterface
|
|||||||
public function on_sbas_ids(Array $sbas_ids = null)
|
public function on_sbas_ids(Array $sbas_ids = null)
|
||||||
{
|
{
|
||||||
if (!$sbas_ids)
|
if (!$sbas_ids)
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
||||||
$this->sbas_restrictions = true;
|
$this->sbas_restrictions = true;
|
||||||
|
@@ -79,6 +79,7 @@ class gatekeeper
|
|||||||
$session = $appbox->get_session();
|
$session = $appbox->get_session();
|
||||||
|
|
||||||
if (http_request::is_command_line())
|
if (http_request::is_command_line())
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (isset($_SERVER['PHP_SELF']) && trim($_SERVER['PHP_SELF']))
|
if (isset($_SERVER['PHP_SELF']) && trim($_SERVER['PHP_SELF']))
|
||||||
@@ -140,6 +141,7 @@ class gatekeeper
|
|||||||
break;
|
break;
|
||||||
case 'admin':
|
case 'admin':
|
||||||
if ($this->_script_name === 'runscheduler.php')
|
if ($this->_script_name === 'runscheduler.php')
|
||||||
|
|
||||||
return;
|
return;
|
||||||
phrasea::redirect('/login/?redirect=' . $_SERVER['REQUEST_URI']);
|
phrasea::redirect('/login/?redirect=' . $_SERVER['REQUEST_URI']);
|
||||||
break;
|
break;
|
||||||
@@ -159,6 +161,7 @@ class gatekeeper
|
|||||||
return;
|
return;
|
||||||
case 'setup':
|
case 'setup':
|
||||||
if ($appbox->upgradeavailable())
|
if ($appbox->upgradeavailable())
|
||||||
|
|
||||||
return;
|
return;
|
||||||
else
|
else
|
||||||
phrasea::redirect('/login/');
|
phrasea::redirect('/login/');
|
||||||
@@ -275,6 +278,7 @@ class gatekeeper
|
|||||||
$parm = $request->get_parms('LOG');
|
$parm = $request->get_parms('LOG');
|
||||||
|
|
||||||
if (is_null($parm["LOG"]))
|
if (is_null($parm["LOG"]))
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@@ -82,6 +82,7 @@ class module_console_fieldsDelete extends Command
|
|||||||
if($continue != 'y')
|
if($continue != 'y')
|
||||||
{
|
{
|
||||||
$output->writeln("Request canceled by user");
|
$output->writeln("Request canceled by user");
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -89,6 +89,7 @@ class module_console_fieldsRename extends Command
|
|||||||
if($continue != 'y')
|
if($continue != 'y')
|
||||||
{
|
{
|
||||||
$output->writeln("Request canceled by user");
|
$output->writeln("Request canceled by user");
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -64,12 +64,14 @@ class module_console_sphinxGenerateSuggestion extends Command
|
|||||||
if(!is_executable("/usr/local/bin/indexer"))
|
if(!is_executable("/usr/local/bin/indexer"))
|
||||||
{
|
{
|
||||||
$output->writeln("<error>'/usr/local/bin/indexer' is not executable</error>");
|
$output->writeln("<error>'/usr/local/bin/indexer' is not executable</error>");
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!file_exists($tmp_file))
|
if(!file_exists($tmp_file))
|
||||||
{
|
{
|
||||||
$output->writeln("<error> file '".$tmp_file."' does not exist</error>");
|
$output->writeln("<error> file '".$tmp_file."' does not exist</error>");
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -608,6 +608,7 @@ $('#users_rights_form button#reset_rights').bind('click', function(){
|
|||||||
$('#right-ajax').removeClass('loading').html(data);
|
$('#right-ajax').removeClass('loading').html(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user