content = new View("admin_theme_options.html"); $theme_name = theme::$site; $info = theme::get_info($theme_name); // Don't use the Kohana cascading file system because we don't want to mess up the admin theme $theme_helper = THEMEPATH . "$theme_name/helpers/{$theme_name}.php"; @require_once($theme_helper); $view->content->form = call_user_func_array(array(theme::$site, "get_admin_form"), array("admin/theme_options/save/")); $view->content->title = t("%name options", array("name" => $info->name)); print $view; } public function save() { access::verify_csrf(); // Don't use the Kohana cascading file system because we don't want to mess up the admin theme $theme_name = theme::$site; $theme_helper = THEMEPATH . "$theme_name/helpers/{$theme_name}.php"; @require_once($theme_helper); $info = theme::get_info($theme_name); $form = call_user_func_array(array(theme::$site, "get_admin_form"), array("admin/theme_options/save/")); if ($form->validate()) { $view->content->form = call_user_func_array(array(theme::$site, "update_options"), array($form)); message::success(t("Updated %name options", array("name" => $info->name))); url::redirect("admin/theme_options"); } else { $view = new Admin_View("admin.html"); $view->content = $form; $view->content->title = t("%name options", array("name" => $info->name)); print $view; } } }