if (!@move_uploaded_file($val['tmp_name'], $cols[$col]['target'])) {
$colwarn[$col] = "Fout bij opslaan.";
}
+ foreach (@glob('thumb/*/') as $thumbres) {
+ # attempt to remove old derivations
+ @unlink($thumbres.'/'.$cols[$col]['target']);
+ }
$cols[$col]['value'] = '';
}
print "\t";
printf('<li><label for="%s">%s:</label>', $col, ucfirst($colconf['label']));
if (@$colconf['type'] == 'file' and isset($colconf['value'])) {
- printf('<a href="/%s"><img src="/thumb/%s/%s" /></a><br />',
+ printf('<a href="/%s"><img src="/thumb/%s/%s?%s" /></a><br />',
$colconf['target'],
- 200, $colconf['target']
+ 200, $colconf['target'], filemtime($colconf['target'])
);
}
print "<input";