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
*Need $this->element & $this->id
*
* @param int $resource_id Resource id
* @param int $resource_id Resource id
* @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)
{
@ -3327,7 +3329,7 @@ abstract class CommonObject
return 0;
}
}
/**
* Delete a link to resource line
*
@ -3339,12 +3341,12 @@ abstract class CommonObject
function delete_resource($rowid, $element, $notrigger=0)
{
global $user,$langs,$conf;
$error=0;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."element_resources";
$sql.= " WHERE rowid =".$rowid;
dol_syslog(get_class($this)."::delete_resource sql=".$sql);
if ($this->db->query($sql))
{
@ -3359,7 +3361,7 @@ abstract class CommonObject
}
// End call triggers
}
return 1;
}
else

View File

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

View File

@ -722,7 +722,7 @@ class Translate
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']))
{
@ -742,7 +742,7 @@ class Translate
* @param string $currency_code Get only currency. Get all if ''.
* @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;
@ -754,7 +754,7 @@ class Translate
if (! empty($currency_code)) $sql.=" AND code_iso = '".$currency_code."'";
//$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);
if ($resql)
{

View File

@ -17,11 +17,17 @@
*/
/**
* \file lib/resource.lib.php
* \file htdocs/core/lib/resource.lib.php
* \ingroup resource
* \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)
{
global $langs, $conf, $user;