Advertisement
jamboljack

MY_Config.php

Nov 21st, 2014
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.90 KB | None | 0 0
  1. <?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2.  
  3. // Originaly CodeIgniter i18n library by Jérôme Jaglale
  4. // http://maestric.com/en/doc/php/codeigniter_i18n
  5. //modification by Yeb Reitsma
  6.  
  7. /*
  8. in case you use it with the HMVC modular extention
  9. uncomment this and remove the other lines
  10. load the MX_Loader class */
  11. //require APPPATH."third_party/MX/Config.php";
  12.  
  13. //class MY_Config extends MX_Config {
  14.  
  15.  
  16. class MY_Config extends CI_Config {
  17.  
  18.     function site_url($uri = '')
  19.     {    
  20.         if (is_array($uri))
  21.         {
  22.             $uri = implode('/', $uri);
  23.         }
  24.  
  25.         if (function_exists('get_instance'))        
  26.         {
  27.             $CI =& get_instance();
  28.             $uri = $CI->lang->localized($uri);            
  29.         }
  30.  
  31.         return parent::site_url($uri);
  32.     }
  33.    
  34. }
  35.  
  36. /* End of file */
  37. /* Location: ./application/core/MY_Config.php */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement