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');
     }
 }