From 2fbc03437ac6f861f597778964cf01737968bb94 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 27 Jun 2009 15:55:47 -0700 Subject: Digibug simplification cleanup. Upgrade digibug module to version 2. 1) Simplify the admin settings page to what most of our users want. Eliminate basic_ and default_ ids. We just have company_id and default_id. Advanced users can use advanced settings for now. 2) Fix security in print_photos (didn't get it right in my last commit) 3) Use the regular thumb and full urls if the images are publicly available to reduce load on the proxy. 4) Simplify proxy expiration code. 5) Eliminate all specialized styles from the admin theme. --- modules/digibug/controllers/admin_digibug.php | 50 +-------------------------- 1 file changed, 1 insertion(+), 49 deletions(-) (limited to 'modules/digibug/controllers/admin_digibug.php') diff --git a/modules/digibug/controllers/admin_digibug.php b/modules/digibug/controllers/admin_digibug.php index bd9e9d95..7124338f 100644 --- a/modules/digibug/controllers/admin_digibug.php +++ b/modules/digibug/controllers/admin_digibug.php @@ -19,56 +19,8 @@ */ class Admin_Digibug_Controller extends Admin_Controller { public function index() { - print $this->_get_view(); - } - - public function update() { - access::verify_csrf(); - - $form = $this->_get_form(); - if ($form->validate()) { - module::set_var("digibug", "company_id", $form->group->company_id->value); - module::set_var("digibug", "event_id", $form->group->event_id->value); - message::success(t("Successfully updated Digibug company and event id's")); - - url::redirect("admin/digibug"); - } - - print $this->_get_view($form); - } - - public function default_settings() { - access::verify_csrf(); - - module::set_var("digibug", "company_id", null); - module::set_var("digibug", "event_id", null); - message::success(t("Successfully set Digibug company and event id's to default")); - - url::redirect("admin/digibug"); - } - - private function _get_view($form=null) { $v = new Admin_View("admin.html"); $v->content = new View("admin_digibug.html"); - $v->content->form = empty($form) ? $this->_get_form() : $form; - return $v; - } - - private function _get_form() { - $form = new Forge("admin/digibug/update", "", "post", - array("id" => "gDigibugForm")); - $group = $form->group("group") - ->label(t("Enter your account information.")); - $group->input("company_id") - ->label(t("Company Id")) - ->rules("required") - ->value(module::get_var("digibug", "company_id", "")); - $group->input("event_id") - ->label(t("Event Id")) - ->rules("required") - ->value(module::get_var("digibug", "event_id", "")); - $group->submit("")->value(t("Submit")); - - return $form; + print $v; } } \ No newline at end of file -- cgit v1.2.3