ezsystems/ezpublish-legacy — pull request #621 by bdunogier (2013-04-27 14:43:37+00:00)
Title: Fix for EZP-20687: files outside the VarDir break the IOService

This pull request implements an update script, update/common/scripts/5.1/fiximagesoutsidevardir.php.

It will iterate over images in ezimagefile where filepath doesn't start with VarDir, and:
- move the file
- update the record in ezimagefile
- update references to this image in ezcontentobject_attribute

# Testing done
To test:
- change your vardir to something else
- create an image
- change the vardir back

An error will occur with eZ Publish 5, for example using REST if you do a GET of/api/ezp/v2/content/objects/id with Accept:application/vnd.ez.api.Content

Running the script will move the image back.