Add option to help debug of ical export
This commit is contained in:
parent
58a5a866f3
commit
f3bedb2ddc
@ -655,8 +655,10 @@ class ActionComm extends CommonObject
|
||||
{
|
||||
if ($key == 'notolderthan') $sql.=" AND a.datep >= '".$this->db->idate($now-($value*24*60*60))."'";
|
||||
if ($key == 'year') $sql.=" AND a.datep BETWEEN '".$this->db->idate(dol_get_first_day($value,1))."' AND '".$this->db->idate(dol_get_last_day($value,12))."'";
|
||||
if ($key == 'id') $sql.=' AND a.id='.$value;
|
||||
if ($key == 'login')
|
||||
if ($key == 'id') $sql.=" AND a.id=".(is_numeric($value)?$value:0);
|
||||
if ($key == 'idfrom') $sql.=" AND a.id >= ".(is_numeric($value)?$value:0);
|
||||
if ($key == 'idto') $sql.=" AND a.id <= ".(is_numeric($value)?$value:0);
|
||||
if ($key == 'login')
|
||||
{
|
||||
$login=$value;
|
||||
$userforfilter=new User($this->db);
|
||||
|
||||
@ -504,14 +504,14 @@ class DoliDb
|
||||
|
||||
$ret = @pg_query($this->db, $query);
|
||||
//print $query;
|
||||
if (! preg_match("/^COMMIT/i",$query) && ! preg_match("/^ROLLBACK/i",$query))
|
||||
if (! preg_match("/^COMMIT/i",$query) && ! preg_match("/^ROLLBACK/i",$query)) // Si requete utilisateur, on la sauvegarde ainsi que son resultset
|
||||
{
|
||||
// Si requete utilisateur, on la sauvegarde ainsi que son resultset
|
||||
if (! $ret)
|
||||
{
|
||||
$this->lastqueryerror = $query;
|
||||
$this->lasterror = $this->error();
|
||||
$this->lasterrno = $this->errno();
|
||||
dol_syslog("Postgresql request error: ".$query, LOG_ERR);
|
||||
//print "\n>> ".$query."<br>\n";
|
||||
//print '>> '.$this->lasterrno.' - '.$this->lasterror.' - '.$this->lastqueryerror."<br>\n";
|
||||
|
||||
|
||||
@ -46,7 +46,9 @@ if (! empty($_GET["format"])) $format=$_GET["format"];
|
||||
if (! empty($_GET["type"])) $type=$_GET["type"];
|
||||
$filters=array();
|
||||
if (! empty($_GET["year"])) $filters['year']=$_GET["year"];
|
||||
if (! empty($_GET["idaction"])) $filters['idaction']=$_GET["idaction"];
|
||||
if (! empty($_GET["id"])) $filters['id']=$_GET["id"];
|
||||
if (! empty($_GET["idfrom"])) $filters['idfrom']=$_GET["idfrom"];
|
||||
if (! empty($_GET["idto"])) $filters['idto']=$_GET["idto"];
|
||||
if (! empty($_GET["login"])) $filters['login']=$_GET["login"];
|
||||
if (! empty($_GET["logina"])) $filters['logina']=$_GET["logina"];
|
||||
if (! empty($_GET["logint"])) $filters['logint']=$_GET["logint"];
|
||||
@ -85,8 +87,10 @@ $filename=$shortfilename;
|
||||
foreach ($filters as $key => $value)
|
||||
{
|
||||
if ($key == 'year') $filename.='-year'.$value;
|
||||
if ($key == 'idaction') $filename.='-id'.$value;
|
||||
if ($key == 'login') $filename.='-login'.$value;
|
||||
if ($key == 'id') $filename.='-id'.$value;
|
||||
if ($key == 'idfrom') $filename.='-idfrom'.$value;
|
||||
if ($key == 'idto') $filename.='-idto'.$value;
|
||||
if ($key == 'login') $filename.='-login'.$value;
|
||||
if ($key == 'logina') $filename.='-logina'.$value; // Author
|
||||
if ($key == 'logind') $filename.='-logind'.$value; // Affected to
|
||||
if ($key == 'logint') $filename.='-logint'.$value; // Done by
|
||||
|
||||
Loading…
Reference in New Issue
Block a user