public function before() { parent::before(); if ($this->request->method() == "POST") { $this->request->action("save"); } }
public function after() { $referrer = Request::current()->referrer(); if ($referrer === NULL or $_SERVER['HTTP_HOST'] != parse_url($referrer, PHP_URL_HOST)) { $referrer = URL::base(); } $this->template->set_filename('error')->set('BACK_URL', $referrer); parent::after(); }
public function before() { parent::before(); $labels = array(); foreach ($this->labels as $_k => $_v) { $labels[$_k] = __($_v); } $this->labels = $labels; if ($this->request->method() == "POST") { $this->request->action("save"); } }
protected function meta_seo_get() { $request = $this->request->current(); switch ($request->action()) { case 'detail': $id = $this->request->param('element_id'); $data = ORM::factory('news', $id)->as_array(); $result = $this->meta_seo_extract($data); break; case 'index': default: $result = parent::meta_seo_get(); } return $result; }
public function after() { View::set_global('CATEGORY', $this->category); parent::after(); }