Welcome Guest, Not a member yet? Register   Sign In
=& get_instance in MY_Exceptions
#7

[eluser]freshface[/eluser]
lredirect is a small helper i created that is language aware.

Code:
function site_lurl($uri = '')
{
    $CI                 =& get_instance();
     $actual_lang         = $CI->config->item('language_abbreviation');
    return $CI->config->site_url($actual_lang.'/'.$uri);
}

function lredirect($uri = '', $method = 'location', $http_response_code = 302)
{
    switch($method)
    {
        case 'refresh'    : header("Refresh:0;url=".site_lurl($uri));
            break;
        default            : header("Location: ".site_lurl($uri), TRUE, $http_response_code);
            break;
    }
    exit;
}


Messages In This Thread
=& get_instance in MY_Exceptions - by El Forum - 09-21-2009, 06:44 AM
=& get_instance in MY_Exceptions - by El Forum - 09-21-2009, 09:14 PM
=& get_instance in MY_Exceptions - by El Forum - 09-22-2009, 01:16 AM
=& get_instance in MY_Exceptions - by El Forum - 09-22-2009, 06:30 AM
=& get_instance in MY_Exceptions - by El Forum - 09-22-2009, 07:59 AM
=& get_instance in MY_Exceptions - by El Forum - 09-22-2009, 08:09 AM
=& get_instance in MY_Exceptions - by El Forum - 09-22-2009, 02:03 PM
=& get_instance in MY_Exceptions - by El Forum - 10-22-2009, 05:52 AM
=& get_instance in MY_Exceptions - by El Forum - 10-22-2009, 10:13 AM
=& get_instance in MY_Exceptions - by El Forum - 10-22-2009, 03:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB