bigin / ItemManager_2.0

ItemManager (IM) is a simple flat-file framework for GetSimple-CMS that allows you to develop completely customizable PHP applications bundled with GetSimple-CMS.
MIT License
5 stars 3 forks source link

imagefullurl not respecting potential subdirectories #1

Closed VIPStephan closed 8 years ago

VIPStephan commented 9 years ago

I’ve installed the CMS in a subdirectory (i. e. http://example.com/subdir/…) and apparently the ItemManager doesn’t check for this when it comes to creating an image URL and assumes I’m in the root. I’ve created an image upload field, uploaded an image and when I do $item->fields->[fieldname]->imagefullurl[0] I get “http://example.com/data/uploads/imanager/1.1/filename.jpg” when it should be “http://example.com/**subdir**/data/uploads/imanager/1.1/filename.jpg”.

The respective function seems to be the one starting on line 117 in im.input.imageupload.php. As far as I can make sense of it it just checks for the protocol, the host name, and the protocol. It should check for the system’s root path, too.

bigin commented 8 years ago

fixed since 2.2.0