<?php
/**
*@desc This class adds new functions
* @author Mohammad Sajjad Hossain
*/
class MY_Config extends CI_Config
{
    function MY_Config()
    {
        parent::__construct();
    }

    /**
     * Non Secure Site URL
     *
     * @author Jilani Jidni
     * @access    public
     * @param    string    the URI string
     * @return    string
     */
    function non_secure_site_url($uri = '')
    {
        if (is_array($uri))
        {
            $uri = implode('/', $uri);
        }

        if ($uri == '')
        {
            return $this->slash_item('non_secure_base_url').$this->item('index_page');
        }
        else
        {
            $suffix = ($this->item('url_suffix') == FALSE) ? '' : $this->item('url_suffix');
            return $this->slash_item('non_secure_base_url').$this->slash_item('index_page').preg_replace("|^/*(.+?)/*$|", "\\1", $uri).$suffix;
        }
    }
}
?>
