Commit 8d783a4f authored by Jonny Bradley's avatar Jonny Bradley

[FIX] filegals: If feature_draw was disabled and fgal_allow_duplicates was not...

[FIX] filegals: If feature_draw was disabled and fgal_allow_duplicates was not allowed, then uploading new filegal-based avatars was not possible.
Regression from way back in r52286 (by me, sorry - thanks marclaporte)
parent 5783823f
......@@ -48,15 +48,14 @@ class FileGalLib extends TikiLib
private function get_file_checksum($galleryId, $path, $data)
{
global $prefs;
$savedir = $this->get_gallery_save_dir($galleryId);
if (false !== $savedir) {
if ( filesize($savedir . $path) > 0 ) {
if ($prefs['feature_draw'] === 'n' || empty($data)) {
if (empty($data)) {
return md5_file($savedir . $path);
} else {
return md5($savedir . $path . $data); // for svg images with a background
return md5($savedir . $path . $data); // for svg images with a background or avatars
}
} else {
return md5(time());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment