Qual: Removed codesniffer errors

This commit is contained in:
Laurent Destailleur 2011-09-20 15:48:06 +00:00
parent 7b6b77ddac
commit 38cdb8961e
3 changed files with 13 additions and 14 deletions

View File

@ -234,8 +234,9 @@ class Import
$this->db->begin(); $this->db->begin();
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'import_model ('; $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'import_model (';
$sql.= 'label, type, field)'; $sql.= 'fk_user, label, type, field';
$sql.= " VALUES ('".$this->db->escape($this->model_name)."', '".$this->datatoimport."', '".$this->hexa."')"; $sql.= ')';
$sql.= " VALUES (".($user->id > 0 ? $user->id : 0).", '".$this->db->escape($this->model_name)."', '".$this->datatoimport."', '".$this->hexa."')";
dol_syslog("Import::create sql=".$sql, LOG_DEBUG); dol_syslog("Import::create sql=".$sql, LOG_DEBUG);
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
@ -318,15 +319,12 @@ class Import
{ {
if (! $notrigger) if (! $notrigger)
{ {
// Uncomment this and change MYOBJECT to your own tag if you // Call triggers
// want this action call a trigger. include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
$interface=new Interfaces($this->db);
//// Call triggers $result=$interface->run_triggers('IMPORT_DELETE',$this,$user,$langs,$conf);
//include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); if ($result < 0) { $error++; $this->errors=$interface->errors; }
//$interface=new Interfaces($this->db); // End call triggers
//$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
//// End call triggers
} }
} }

View File

@ -27,8 +27,9 @@ set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
$datatoimport=isset($_GET["datatoimport"])? $_GET["datatoimport"] : (isset($_POST["datatoimport"])?$_POST["datatoimport"]:''); $datatoimport=isset($_GET["datatoimport"])? $_GET["datatoimport"] : (isset($_POST["datatoimport"])?$_POST["datatoimport"]:'');
$format=isset($_GET["format"])? $_GET["format"] : (isset($_POST["format"])?$_POST["format"]:''); $format=isset($_GET["format"])? $_GET["format"] : (isset($_POST["format"])?$_POST["format"]:'');
// C'est un wrapper, donc header vierge // This file is a wrapper, so empty header
function llxHeader() { print '<html><title>Build an import example file</title><body>'; } function llxHeader() { print '<html><title>Build an import example file</title><body>'; }
// This file is a wrapper, so empty footer
function llxFooter() { print '</body></html>'; } function llxFooter() { print '</body></html>'; }
require("../main.inc.php"); require("../main.inc.php");

View File

@ -1641,8 +1641,8 @@ function show_elem($fieldssource,$pos,$key,$var,$nostyle='')
/** /**
* Return not used field number * Return not used field number
* *
* @param array $fieldssource * @param array &$fieldssource Array of field source
* @param array $listofkey * @param array &$listofkey Array of keys
* @return void * @return void
*/ */
function getnewkey(&$fieldssource,&$listofkey) function getnewkey(&$fieldssource,&$listofkey)