function uihelper_resize_mk_img_static($pic, $max_x, $max_y, $alternate = NULL, $extra_attrs = 'alt="PA"', $opts = RESIZE_CROP, $override_base_url = NULL)
{
    if (defined("NEW_STORAGE")) {
        $pic = Storage::get_or_make_static($pic);
    } else {
        if (preg_match("|^files/|", $pic)) {
            if (defined("NEW_STORAGE")) {
                throw new PAException(INVALID_ID, "Old code is prepending files/ to an image path");
            }
        } else {
            $pic = "files/{$pic}";
        }
    }
    return ImageResize::resize_mk_img("web", $override_base_url ? $override_base_url : PA::$url, "files/rsz", $max_x, $max_y, $pic, $alternate, FALSE, $extra_attrs, $opts);
}
Ejemplo n.º 2
0
function uihelper_resize_mk_img($picture, $max_x, $max_y, $alternate = NULL, $extra_attrs = 'alt="PA"', $opts = RESIZE_CROP, $override_base_url = NULL)
{
    global $path_prefix, $base_url;
    return $image = ImageResize::resize_mk_img("{$path_prefix}/web", $override_base_url ? $override_base_url : $base_url, "files/rsz", $max_x, $max_y, $picture, $alternate, FALSE, $extra_attrs, $opts);
}