$res = false;
}
$time = round(microtime(true) - $start, 4);
- $log = '[' . $farmer['name'] . ']' . "\t\t\t\t" . $time . "\t\t\t\t$page|$format|$resolution|$withText|$withGraphics|$version\t\t\t\t$res\t\t\t\t$cl->output\n";
+ $log = '[' . $farmer['name'] . ']' . "\t" . date('Y-m-d H:i:s') . "\t\t\t\t" . $time . "\t\t\t\t$page|$format|$resolution|$withText|$withGraphics|$version\t\t\t\t$res\t\t\t\t$cl->output\n";
$fp = fopen(WS_DOCS . '/' . $this->document_id . '/farm.log', 'a+');
fwrite($fp, $log);
return $res;
}
- public static function isFarmUser(){
+ public static function isFarmUser()
+ {
global $core;
$farmTesters = [3, 5];
return in_array($core->user->utilisateur_id, $farmTesters);
{
global $core;
- if (self::isFarmUser()) {
- return $this->_getFileFarm($page, $format, $resolution, $withText, $withGraphics, $version, $force);
- }
-
if ($format === 'jpeg') {
$format = 'jpg';
}
$do = $t < 1603181003 && $t > 1602662603;
}
+
if ($do || $force) {
- $this->makeFile($file, $page, $format, $resolution, $withText, $withGraphics, $version);
+ if (self::isFarmUser()) {
+ return $this->_getFileFarm($page, $format, $resolution, $withText, $withGraphics, $version, $force);
+ } else {
+ $this->makeFile($file, $page, $format, $resolution, $withText, $withGraphics, $version);
+ }
} else {
touch($file);
}