Coding Standards

This commit is contained in:
Romain Neutron
2012-03-19 19:04:48 +01:00
parent f8ad7136cf
commit fa698fbdda
22 changed files with 56 additions and 41 deletions

View File

@@ -302,6 +302,7 @@ class Basket
}
if($total_el1 === $total_el2)
return 0;
return $total_el1 < $total_el2 ? 1 : -1;
@@ -328,6 +329,7 @@ class Basket
}
if($total_el1 === $total_el2)
return 0;
return $total_el1 < $total_el2 ? 1 : -1;

View File

@@ -411,6 +411,7 @@ class Feed_Entry_Adapter implements Feed_Entry_Interface, cache_cacheableInterfa
public function get_content()
{
if ($this->items)
return $this->items;
$rs = $this->retrieve_elements();

View File

@@ -582,6 +582,7 @@ class User_Query implements User_QueryInterface
public function get_total()
{
if ($this->total)
return $this->total;
$conn = $this->appbox->get_connection();
@@ -742,6 +743,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;
@@ -766,6 +768,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;

View File

@@ -79,6 +79,7 @@ class gatekeeper
$session = $appbox->get_session();
if (http_request::is_command_line())
return;
if (isset($_SERVER['PHP_SELF']) && trim($_SERVER['PHP_SELF']))
@@ -140,6 +141,7 @@ class gatekeeper
break;
case 'admin':
if ($this->_script_name === 'runscheduler.php')
return;
phrasea::redirect('/login/?redirect=' . $_SERVER['REQUEST_URI']);
break;
@@ -159,6 +161,7 @@ class gatekeeper
return;
case 'setup':
if ($appbox->upgradeavailable())
return;
else
phrasea::redirect('/login/');
@@ -275,6 +278,7 @@ class gatekeeper
$parm = $request->get_parms('LOG');
if (is_null($parm["LOG"]))
return $this;
try

View File

@@ -82,6 +82,7 @@ class module_console_fieldsDelete extends Command
if($continue != 'y')
{
$output->writeln("Request canceled by user");
return 1;
}

View File

@@ -89,6 +89,7 @@ class module_console_fieldsRename extends Command
if($continue != 'y')
{
$output->writeln("Request canceled by user");
return 1;
}

View File

@@ -64,12 +64,14 @@ class module_console_sphinxGenerateSuggestion extends Command
if(!is_executable("/usr/local/bin/indexer"))
{
$output->writeln("<error>'/usr/local/bin/indexer' is not executable</error>");
return 1;
}
if(!file_exists($tmp_file))
{
$output->writeln("<error> file '".$tmp_file."' does not exist</error>");
return 1;
}

View File

@@ -608,6 +608,7 @@ $('#users_rights_form button#reset_rights').bind('click', function(){
$('#right-ajax').removeClass('loading').html(data);
}
});
return false;
}
else