Fix: checkstyle errors

This commit is contained in:
Laurent Destailleur 2014-05-14 12:19:45 +02:00
parent 0027dc30f5
commit 15796ec592
4 changed files with 20 additions and 12 deletions

View File

@ -3290,9 +3290,11 @@ abstract class CommonObject
* Add resources to the current object : add entry into llx_element_resources * Add resources to the current object : add entry into llx_element_resources
*Need $this->element & $this->id *Need $this->element & $this->id
* *
* @param int $resource_id Resource id * @param int $resource_id Resource id
* @param string $resource_element Resource element * @param string $resource_element Resource element
* @return int <=0 if KO, >0 if OK * @param int $busy Busy or not
* @param int $mandatory Mandatory or not
* @return int <=0 if KO, >0 if OK
*/ */
function add_element_resource($resource_id,$resource_element,$busy=0,$mandatory=0) function add_element_resource($resource_id,$resource_element,$busy=0,$mandatory=0)
{ {
@ -3327,7 +3329,7 @@ abstract class CommonObject
return 0; return 0;
} }
} }
/** /**
* Delete a link to resource line * Delete a link to resource line
* *
@ -3339,12 +3341,12 @@ abstract class CommonObject
function delete_resource($rowid, $element, $notrigger=0) function delete_resource($rowid, $element, $notrigger=0)
{ {
global $user,$langs,$conf; global $user,$langs,$conf;
$error=0; $error=0;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."element_resources"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."element_resources";
$sql.= " WHERE rowid =".$rowid; $sql.= " WHERE rowid =".$rowid;
dol_syslog(get_class($this)."::delete_resource sql=".$sql); dol_syslog(get_class($this)."::delete_resource sql=".$sql);
if ($this->db->query($sql)) if ($this->db->query($sql))
{ {
@ -3359,7 +3361,7 @@ abstract class CommonObject
} }
// End call triggers // End call triggers
} }
return 1; return 1;
} }
else else

View File

@ -3264,7 +3264,7 @@ class Form
{ {
global $conf,$langs,$user; global $conf,$langs,$user;
$langs->load_cache_currencies(''); $langs->loadCacheCurrencies('');
$out=''; $out='';

View File

@ -722,7 +722,7 @@ class Translate
if (function_exists("mb_convert_encoding")) if (function_exists("mb_convert_encoding"))
{ {
$this->load_cache_currencies($forceloadall?'':$currency_code); $this->loadCacheCurrencies($forceloadall?'':$currency_code);
if (isset($this->cache_currencies[$currency_code]) && ! empty($this->cache_currencies[$currency_code]['unicode']) && is_array($this->cache_currencies[$currency_code]['unicode'])) if (isset($this->cache_currencies[$currency_code]) && ! empty($this->cache_currencies[$currency_code]['unicode']) && is_array($this->cache_currencies[$currency_code]['unicode']))
{ {
@ -742,7 +742,7 @@ class Translate
* @param string $currency_code Get only currency. Get all if ''. * @param string $currency_code Get only currency. Get all if ''.
* @return int Nb of loaded lines, 0 if already loaded, <0 if KO * @return int Nb of loaded lines, 0 if already loaded, <0 if KO
*/ */
public function load_cache_currencies($currency_code) public function loadCacheCurrencies($currency_code)
{ {
global $db; global $db;
@ -754,7 +754,7 @@ class Translate
if (! empty($currency_code)) $sql.=" AND code_iso = '".$currency_code."'"; if (! empty($currency_code)) $sql.=" AND code_iso = '".$currency_code."'";
//$sql.= " ORDER BY code_iso ASC"; // Not required, a sort is done later //$sql.= " ORDER BY code_iso ASC"; // Not required, a sort is done later
dol_syslog(get_class($this).'::load_cache_currencies sql='.$sql, LOG_DEBUG); dol_syslog(get_class($this).'::loadCacheCurrencies sql='.$sql, LOG_DEBUG);
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) if ($resql)
{ {

View File

@ -17,11 +17,17 @@
*/ */
/** /**
* \file lib/resource.lib.php * \file htdocs/core/lib/resource.lib.php
* \ingroup resource * \ingroup resource
* \brief This file is library for resource module * \brief This file is library for resource module
*/ */
/**
* Prepare head for tabs
*
* @param Object $object Object
* @return array Array of head entries
*/
function resourcePrepareHead($object) function resourcePrepareHead($object)
{ {
global $langs, $conf, $user; global $langs, $conf, $user;