roundcubemail/program/lib/Roundcube/rcube_html2text.php
function set_base_url($url = '')
    {
        if (empty($url)) {
            if (!empty($_SERVER['HTTP_HOST'])) {
                $this->url = 'http://' . $_SERVER['HTTP_HOST'];
            }
            else {
                $this->url = '';
            }
        }
        else {
            // Strip any trailing slashes for consistency (relative
            // URLs may already start with a slash like "/file.html")
            if (substr($url, -1) == '/') {
                $url = substr($url, 0, -1);
            }
            $this->url = $url;
        }
    }
function set_base_url($url = '')
    {
        if (empty($url)) {
            if (!empty($_SERVER['HTTP_HOST'])) {
                $this->url = 'http://' . $_SERVER['HTTP_HOST'];
            }
            else {
                $this->url = '';
            }
        }
        else {
            // Strip any trailing slashes for consistency (relative
            // URLs may already start with a slash like "/file.html")
            if (substr($url, -1) == '/') {
                $url = substr($url, 0, -1);
            }
            $this->url = $url;
        }
    }
function set_base_url ( $ url = '' ) { if ( empty ( $ url ) ) { if ( ! empty ( $ _SERVER [ 'HTTP_HOST' ] ) ) { $ this -> url = 'http://' . $ _SERVER [ 'HTTP_HOST' ] ; } else { $ this -> url = '' ; } } else { // Strip any trailing slashes for consistency (relative // URLs may already start with a slash like "/file.html") if ( substr ( $ url , - 1 ) == '/' ) { $ url = substr ( $ url , 0 , - 1 ) ; } $ this -> url = $ url ; } }
Sets a base URL to handle relative links.
Sets a base URL to handle relative links .