Beispiel #1
0
 public function pagnation_config()
 {
     if (preg_match("#^([1-9][0-9]*)\$#", \lib\router::get_url_property('page'), $_page)) {
         $page = intval($_page[1]);
         \lib\router::set_storage('pagnation', $page);
         $this->pagnation['current'] = $page;
         \lib\router::remove_url_property('page');
         if ($page == 1) {
             $redirect = new \lib\redirector(null, true);
             $redirect->url = preg_replace("/\\/page=1/", "", $redirect->url);
             $redirect->redirect();
         }
     }
     if (preg_match("#^(\\d+)\$#", \lib\router::get_url_property('length'), $length)) {
         $this->pagnation_set('length', intval($length[1]));
         $this->pagnation_set('custom_length', true);
         \lib\router::remove_url_property('length');
     }
 }
Beispiel #2
0
 public function set_language($_language)
 {
     router::set_storage('language', $_language);
     // gettext setup
     T_setlocale(LC_MESSAGES, $_language);
     // Set the text domain as 'messages'
     T_bindtextdomain('messages', root . 'includes/languages');
     T_bind_textdomain_codeset('messages', 'UTF-8');
     T_textdomain('messages');
 }