"Rename image" option which changes file name to MD5 hash is broken.

The cause is the following code starting from line 80:

 if (variable_get('get_image_rename', 0)) {
          $filename = md5($file->filename) .'.'. end(explode('.', $file->filename));
}

$filename should be changed to $file->filename in line 81 to make things work properly:

 if (variable_get('get_image_rename', 0)) {
          $file->filename = md5($file->filename) .'.'. end(explode('.', $file->filename));
}

BTW cool module, have been searching for something like this for a long time, thx a lot to authors! :)

Comments

superfedya’s picture

Thanks for your fix!

eastcn’s picture

Version: 6.x-1.0-beta7 » 6.x-1.0-beta8
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.