Minor fixes
This commit is contained in:
parent
63d2d38c5f
commit
7ea96d53a2
@ -278,6 +278,8 @@ class RssParser
|
|||||||
dol_syslog(get_class($this)."::parser cache file ".$newpathofdestfile." is saved onto disk.");
|
dol_syslog(get_class($this)."::parser cache file ".$newpathofdestfile." is saved onto disk.");
|
||||||
if (! dol_is_dir($cachedir)) dol_mkdir($cachedir);
|
if (! dol_is_dir($cachedir)) dol_mkdir($cachedir);
|
||||||
$fp = fopen($newpathofdestfile, 'w');
|
$fp = fopen($newpathofdestfile, 'w');
|
||||||
|
if ($fp)
|
||||||
|
{
|
||||||
fwrite($fp, $str);
|
fwrite($fp, $str);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
|
if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
|
||||||
@ -285,6 +287,11 @@ class RssParser
|
|||||||
|
|
||||||
$this->_lastfetchdate=$nowgmt;
|
$this->_lastfetchdate=$nowgmt;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print 'Error, failed to open file '.$newpathofdestfile.' for write';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unset($str); // Free memory
|
unset($str); // Free memory
|
||||||
|
|
||||||
|
|||||||
@ -80,7 +80,12 @@ class modAgenda extends DolibarrModules
|
|||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
//-----------
|
//-----------
|
||||||
|
// List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
|
||||||
|
// Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',1),
|
||||||
|
// 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1)
|
||||||
|
// );
|
||||||
$this->const = array();
|
$this->const = array();
|
||||||
|
//$this->const[] = array('AGENDA_DEFAULT_FILTER_TYPE', 'chaine', 'AC_NON_AUTO', 'Default filter for type of event on agenda', 0, 'current');
|
||||||
$sqlreadactions="SELECT code, label, description FROM ".MAIN_DB_PREFIX."c_action_trigger ORDER by rang";
|
$sqlreadactions="SELECT code, label, description FROM ".MAIN_DB_PREFIX."c_action_trigger ORDER by rang";
|
||||||
$resql = $this->db->query($sqlreadactions);
|
$resql = $this->db->query($sqlreadactions);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
@ -90,7 +95,7 @@ class modAgenda extends DolibarrModules
|
|||||||
//if (preg_match('/_CREATE$/',$obj->code) && (! in_array($obj->code, array('COMPANY_CREATE','PRODUCT_CREATE','TASK_CREATE')))) continue; // We don't track such events (*_CREATE) by default, we prefer validation (except thirdparty/product/task creation because there is no validation).
|
//if (preg_match('/_CREATE$/',$obj->code) && (! in_array($obj->code, array('COMPANY_CREATE','PRODUCT_CREATE','TASK_CREATE')))) continue; // We don't track such events (*_CREATE) by default, we prefer validation (except thirdparty/product/task creation because there is no validation).
|
||||||
if (preg_match('/^TASK_/',$obj->code)) continue; // We don't track such events by default.
|
if (preg_match('/^TASK_/',$obj->code)) continue; // We don't track such events by default.
|
||||||
//if (preg_match('/^_MODIFY/',$obj->code)) continue; // We don't track such events by default.
|
//if (preg_match('/^_MODIFY/',$obj->code)) continue; // We don't track such events by default.
|
||||||
$this->const[] = array('MAIN_AGENDA_ACTIONAUTO_'.$obj->code, "chaine", "1");
|
$this->const[] = array('MAIN_AGENDA_ACTIONAUTO_'.$obj->code, "chaine", "1", '', 0, 'current');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user