public function do_drop($name) { if ($this->login()) { $class = $this->get_class($name); $obj = $class->sync(); if ($this->isPost()) { $obj->set_model($this->vars()); $obj->delete(); C($obj)->commit(); $tools = new CrudTools($name); Http::redirect(Http::referer()); } } return $this->do_find($name); }
/** * ログインを必須とする * @param string $redirect_to リダイレクト先 */ protected function login_required($redirect_to = null) { if (!$this->is_login()) { if (!isset($redirect_to)) { $redirect_to = $this->in_sessions('logined_redirect_to', Http::referer()); } $this->sessions('logined_redirect_to', App::url($redirect_to)); $this->redirect_method('do_login'); } }
/** * refererを返す * * @return string */ public function referer() { return Http::referer(); }
/** * refererを返す * * @return string */ public static final function referer() { return Http::referer(); }