<?php
if (!defined('IN_OELOVE')) {
    exit('OElove[OEPHP] Access Denied');
}
function smarty_modifier_httpurl($url){
    if (!empty($url)) {
        $count_url = strlen($url);
        $count_path = strlen(PATH_URL);

        /*
        if (substr($url, 0, 7) != "http://") {
            $url = str_replace(PATH_URL."data/", "data/", $url);
            $url = OE::$cfg['siteurl'].$url;
        }
        */
        if (substr($url, 0, 7) == "http://" || substr($url, 0, 8) == "https://") {
            //nothing to do!
        }
        else {
            $url = str_replace(PATH_URL."data/", "data/", $url);
            $url = OE::$cfg['siteurl'].$url;
        }
    }
    return $url;
}
?>