function resmushit_log in reSmush.it image style optimizer 7.2
Same name and namespace in other branches
- 7 resmushit.inc \resmushit_log()
Parameters
$imagesource:
$error:
$sizebefore:
$sizeafter:
$gain: Keep a log of last few optimalizations.
1 call to resmushit_log()
File
- ./
resmushit.inc, line 208 - Additional functions.
Code
function resmushit_log($imagesource, $error, $sizebefore, $sizeafter, $gain) {
$recent_optimalizations = resmushit_trimmed_log();
$this_operation = array(
date("Y-m-d H:i:s", REQUEST_TIME),
$imagesource,
$error,
$sizebefore,
$sizeafter,
$gain,
);
$recent_optimalizations[] = $this_operation;
variable_set('resmushit_recent_optimalizations', $recent_optimalizations);
$all_optimalizations = variable_get('resmushit_all_optimalizations', 0) + 1;
variable_set('resmushit_all_optimalizations', $all_optimalizations);
}