Fix class visibility
This commit is contained in:
parent
f0c2b3a151
commit
73b359c124
@ -30,7 +30,7 @@
|
|||||||
abstract class Stats
|
abstract class Stats
|
||||||
{
|
{
|
||||||
protected $db;
|
protected $db;
|
||||||
protected $_lastfetchdate=array(); // Dates of cache file read by methods
|
protected $lastfetchdate=array(); // Dates of cache file read by methods
|
||||||
public $cachefilesuffix=''; // Suffix to add to name of cache file (to avoid file name conflicts)
|
public $cachefilesuffix=''; // Suffix to add to name of cache file (to avoid file name conflicts)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -70,7 +70,7 @@ abstract class Stats
|
|||||||
{
|
{
|
||||||
$foundintocache=1;
|
$foundintocache=1;
|
||||||
|
|
||||||
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$filedate;
|
$this->lastfetchdate[get_class($this).'_'.__FUNCTION__]=$filedate;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -117,7 +117,7 @@ abstract class Stats
|
|||||||
if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
|
if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
|
||||||
@chmod($newpathofdestfile, octdec($newmask));
|
@chmod($newpathofdestfile, octdec($newmask));
|
||||||
|
|
||||||
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
|
$this->lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
// return array(array('Month',val1,val2,val3),...)
|
// return array(array('Month',val1,val2,val3),...)
|
||||||
@ -164,7 +164,7 @@ abstract class Stats
|
|||||||
{
|
{
|
||||||
$foundintocache=1;
|
$foundintocache=1;
|
||||||
|
|
||||||
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$filedate;
|
$this->lastfetchdate[get_class($this).'_'.__FUNCTION__]=$filedate;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -215,7 +215,7 @@ abstract class Stats
|
|||||||
@chmod($newpathofdestfile, octdec($newmask));
|
@chmod($newpathofdestfile, octdec($newmask));
|
||||||
}
|
}
|
||||||
else dol_syslog("Failed to write cache file", LOG_ERR);
|
else dol_syslog("Failed to write cache file", LOG_ERR);
|
||||||
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
|
$this->lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
@ -290,7 +290,7 @@ abstract class Stats
|
|||||||
{
|
{
|
||||||
$foundintocache=1;
|
$foundintocache=1;
|
||||||
|
|
||||||
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$filedate;
|
$this->lastfetchdate[get_class($this).'_'.__FUNCTION__]=$filedate;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -323,7 +323,7 @@ abstract class Stats
|
|||||||
if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
|
if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
|
||||||
@chmod($newpathofdestfile, octdec($newmask));
|
@chmod($newpathofdestfile, octdec($newmask));
|
||||||
}
|
}
|
||||||
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
|
$this->lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
|||||||
@ -281,7 +281,7 @@ class ProjectStats extends Stats
|
|||||||
{
|
{
|
||||||
$foundintocache=1;
|
$foundintocache=1;
|
||||||
|
|
||||||
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$filedate;
|
$this->lastfetchdate[get_class($this).'_'.__FUNCTION__]=$filedate;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -332,7 +332,7 @@ class ProjectStats extends Stats
|
|||||||
@chmod($newpathofdestfile, octdec($newmask));
|
@chmod($newpathofdestfile, octdec($newmask));
|
||||||
}
|
}
|
||||||
else dol_syslog("Failed to write cache file", LOG_ERR);
|
else dol_syslog("Failed to write cache file", LOG_ERR);
|
||||||
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
|
$this->lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
@ -401,7 +401,7 @@ class ProjectStats extends Stats
|
|||||||
if ($filedate >= ($nowgmt - $cachedelay)) {
|
if ($filedate >= ($nowgmt - $cachedelay)) {
|
||||||
$foundintocache = 1;
|
$foundintocache = 1;
|
||||||
|
|
||||||
$this->_lastfetchdate[get_class($this) . '_' . __FUNCTION__] = $filedate;
|
$this->lastfetchdate[get_class($this) . '_' . __FUNCTION__] = $filedate;
|
||||||
} else {
|
} else {
|
||||||
dol_syslog(get_class($this) . '::' . __FUNCTION__ . " cache file " . $newpathofdestfile . " is not found or older than now - cachedelay (" . $nowgmt . " - " . $cachedelay . ") so we can't use it.");
|
dol_syslog(get_class($this) . '::' . __FUNCTION__ . " cache file " . $newpathofdestfile . " is not found or older than now - cachedelay (" . $nowgmt . " - " . $cachedelay . ") so we can't use it.");
|
||||||
}
|
}
|
||||||
@ -443,7 +443,7 @@ class ProjectStats extends Stats
|
|||||||
$newmask = $conf->global->MAIN_UMASK;
|
$newmask = $conf->global->MAIN_UMASK;
|
||||||
@chmod($newpathofdestfile, octdec($newmask));
|
@chmod($newpathofdestfile, octdec($newmask));
|
||||||
|
|
||||||
$this->_lastfetchdate[get_class($this) . '_' . __FUNCTION__] = $nowgmt;
|
$this->lastfetchdate[get_class($this) . '_' . __FUNCTION__] = $nowgmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user