diff --git a/3.1/modules/sharephoto/controllers/admin_sharephoto.php b/3.1/modules/sharephoto/controllers/admin_sharephoto.php index 89ebf438..d8c01022 100644 --- a/3.1/modules/sharephoto/controllers/admin_sharephoto.php +++ b/3.1/modules/sharephoto/controllers/admin_sharephoto.php @@ -1,82 +1,82 @@ -content = new View("admin_sharephoto.html"); - $view->content->sharephoto_form = $this->_get_admin_form(); - print $view; - } - - public function saveprefs() { - // Prevent Cross Site Request Forgery - access::verify_csrf(); - - $form = $this->_get_admin_form(); - - // Figure out which boxes where checked - $shareOpts_array = Input::instance()->post("ShareOptions"); - - $IconsButton = false; - $HTMLLinksButton = false; - - for ($i = 0; $i < count($shareOpts_array); $i++) { - if ($shareOpts_array[$i] == "Icons") { - $IconsButton = true; - } - if ($shareOpts_array[$i] == "HTMLLinks") { - $HTMLLinksButton = true; - } - } - - // Save Settings. - module::set_var("sharephoto", "Icons", $IconsButton); - module::set_var("sharephoto", "HTMLLinks", $HTMLLinksButton); - message::success(t("Your Selection Has Been Saved.")); - - // Load Admin page. - $view = new Admin_View("admin.html"); - $view->content = new View("admin_sharephoto.html"); - $view->content->sharephoto_form = $form; - print $view; - } - - private function _get_admin_form() { - // New Form. - $form = new Forge("admin/sharephoto/saveprefs", "", "post", - array("id" => "g-sharephoto-adminForm")); - - // Select what to show on the Photo page. - $shareTypes["Icons"] = array(t("Show Icons   "), module::get_var("sharephoto", "Icons")); - $shareTypes["HTMLLinks"] = array(t("Show HTML Links"), module::get_var("sharephoto", "HTMLLinks")); - - // Checkboxes - $add_links = $form->group("SharePhoto"); - $add_links->checklist("ShareOptions") - ->options($shareTypes); - - // Save button - $add_links->submit("SaveSettings")->value(t("Save")); - - // Return the newly generated form. - return $form; - } +content = new View("admin_sharephoto.html"); + $view->content->sharephoto_form = $this->_get_admin_form(); + print $view; + } + + public function saveprefs() { + // Prevent Cross Site Request Forgery + access::verify_csrf(); + + $form = $this->_get_admin_form(); + + // Figure out which boxes where checked + $shareOpts_array = Input::instance()->post("ShareOptions"); + + $IconsButton = false; + $HTMLLinksButton = false; + + for ($i = 0; $i < count($shareOpts_array); $i++) { + if ($shareOpts_array[$i] == "Icons") { + $IconsButton = true; + } + if ($shareOpts_array[$i] == "HTMLLinks") { + $HTMLLinksButton = true; + } + } + + // Save Settings. + module::set_var("sharephoto", "Icons", $IconsButton); + module::set_var("sharephoto", "HTMLLinks", $HTMLLinksButton); + message::success(t("Your Selection Has Been Saved.")); + + // Load Admin page. + $view = new Admin_View("admin.html"); + $view->content = new View("admin_sharephoto.html"); + $view->content->sharephoto_form = $form; + print $view; + } + + private function _get_admin_form() { + // New Form. + $form = new Forge("admin/sharephoto/saveprefs", "", "post", + array("id" => "g-sharephoto-adminForm")); + + // Select what to show on the Photo page. + $shareTypes["Icons"] = array(t("Show Icons   "), module::get_var("sharephoto", "Icons")); + $shareTypes["HTMLLinks"] = array(t("Show HTML Links"), module::get_var("sharephoto", "HTMLLinks")); + + // Checkboxes + $add_links = $form->group("SharePhoto"); + $add_links->checklist("ShareOptions") + ->options($shareTypes); + + // Save button + $add_links->submit("SaveSettings")->value(t("Save")); + + // Return the newly generated form. + return $form; + } } \ No newline at end of file diff --git a/3.1/modules/sharephoto/helpers/sharephoto_event.php b/3.1/modules/sharephoto/helpers/sharephoto_event.php index 86825968..0a65ce72 100644 --- a/3.1/modules/sharephoto/helpers/sharephoto_event.php +++ b/3.1/modules/sharephoto/helpers/sharephoto_event.php @@ -1,28 +1,28 @@ -get("settings_menu") - ->append(Menu::factory("link") - ->id("sharephoto") - ->label(t("SharePhoto")) - ->url(url::site("admin/sharephoto"))); - } -} +get("settings_menu") + ->append(Menu::factory("link") + ->id("sharephoto") + ->label(t("SharePhoto")) + ->url(url::site("admin/sharephoto"))); + } +} diff --git a/3.1/modules/sharephoto/helpers/sharephoto_theme.php b/3.1/modules/sharephoto/helpers/sharephoto_theme.php index aab17d65..035470d7 100644 --- a/3.1/modules/sharephoto/helpers/sharephoto_theme.php +++ b/3.1/modules/sharephoto/helpers/sharephoto_theme.php @@ -1,38 +1,38 @@ -css("sharephoto.css") - . $theme->script("sharephoto.js"); - } - - - static function photo_bottom($theme) { - $block = new Block; - $block->css_id = "g-sharephoto"; - $block->title = t("Share Photo"); - $block->anchor = "sharephoto"; - - $view = new View("sharephoto.html"); - - $block->content = $view; - return $block; - } +css("sharephoto.css") + . $theme->script("sharephoto.js"); + } + + + static function photo_bottom($theme) { + $block = new Block; + $block->css_id = "g-sharephoto"; + $block->title = t("Share Photo"); + $block->anchor = "sharephoto"; + + $view = new View("sharephoto.html"); + + $block->content = $view; + return $block; + } } \ No newline at end of file