// Back office is now always accessible even with a wrong base uri

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17450 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dMetzger
2012-09-21 08:57:58 +00:00
parent f7ac3955e1
commit 702b93aa25
4 changed files with 24 additions and 9 deletions
+5 -1
View File
@@ -75,7 +75,11 @@ class ImageManagerCore
ImageManager::resize($image, _PS_TMP_IMG_DIR_.$cache_image, $ratio_x, $size, $image_type);
}
}
return '<img src="'._PS_TMP_IMG_.$cache_image.(!$disable_cache ? '?time='.time() : '').'" alt="" class="imgm" />';
// Relative link will always work, whatever the base uri set in the admin
if (Context::getContext()->controller->controller_type == 'admin')
return '<img src="../img/tmp/'.$cache_image.(!$disable_cache ? '?time='.time() : '').'" alt="" class="imgm" />';
else
return '<img src="'._PS_TMP_IMG_.$cache_image.(!$disable_cache ? '?time='.time() : '').'" alt="" class="imgm" />';
}
/**