From 320a569c104c61e103b5c6336d8f52c7677f8594 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 5 Dec 2009 20:56:16 -0800 Subject: Fix whitespace. --- modules/gallery/helpers/block_manager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gallery/helpers') diff --git a/modules/gallery/helpers/block_manager.php b/modules/gallery/helpers/block_manager.php index b003f1d8..978ef9ba 100644 --- a/modules/gallery/helpers/block_manager.php +++ b/modules/gallery/helpers/block_manager.php @@ -37,7 +37,7 @@ class block_manager_Core { $block_class = "{$module_name}_block"; if (method_exists($block_class, "get_site_list")) { $blocks = call_user_func(array($block_class, "get_site_list")); - foreach (array_keys($blocks) as $block_id) { + foreach (array_keys($blocks) as $block_id) { self::add("site_sidebar", $module_name, $block_id); } } -- cgit v1.2.3 From 1f3567ec04e372e33e6858c56ca4d8ca8949d8bc Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 5 Dec 2009 21:08:10 -0800 Subject: Update the gallery module to version 21 in the installer. --- installer/install.sql | 13 +++++++------ modules/gallery/helpers/gallery_installer.php | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'modules/gallery/helpers') diff --git a/installer/install.sql b/installer/install.sql index 38851eff..154a65fb 100644 --- a/installer/install.sql +++ b/installer/install.sql @@ -228,7 +228,7 @@ CREATE TABLE {modules} ( UNIQUE KEY `name` (`name`) ) AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -INSERT INTO {modules} VALUES (1,1,'gallery',19); +INSERT INTO {modules} VALUES (1,1,'gallery',21); INSERT INTO {modules} VALUES (2,1,'user',2); INSERT INTO {modules} VALUES (3,1,'comment',2); INSERT INTO {modules} VALUES (4,1,'organize',1); @@ -366,7 +366,7 @@ CREATE TABLE {vars} ( `value` text, PRIMARY KEY (`id`), UNIQUE KEY `module_name` (`module_name`,`name`) -) AUTO_INCREMENT=35 DEFAULT CHARSET=utf8; +) AUTO_INCREMENT=36 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; INSERT INTO {vars} VALUES (1,'gallery','active_site_theme','wind'); INSERT INTO {vars} VALUES (2,'gallery','active_admin_theme','admin_wind'); @@ -379,12 +379,13 @@ INSERT INTO {vars} VALUES (8,'gallery','image_sharpen','15'); INSERT INTO {vars} VALUES (21,'gallery','time_format','H:i:s'); INSERT INTO {vars} VALUES (22,'gallery','show_credits','1'); INSERT INTO {vars} VALUES (23,'gallery','credits','Powered by Gallery %version'); +INSERT INTO {vars} VALUES (24,'gallery','simultaneous_upload_limit','5'); INSERT INTO {vars} VALUES (10,'gallery','blocks_dashboard_sidebar','a:4:{i:2;a:2:{i:0;s:7:\"gallery\";i:1;s:11:\"block_adder\";}i:3;a:2:{i:0;s:7:\"gallery\";i:1;s:5:\"stats\";}i:4;a:2:{i:0;s:7:\"gallery\";i:1;s:13:\"platform_info\";}i:5;a:2:{i:0;s:7:\"gallery\";i:1;s:12:\"project_news\";}}'); INSERT INTO {vars} VALUES (20,'gallery','date_time_format','Y-M-d H:i:s'); INSERT INTO {vars} VALUES (19,'gallery','date_format','Y-M-d'); INSERT INTO {vars} VALUES (15,'gallery','blocks_dashboard_center','a:3:{i:6;a:2:{i:0;s:7:\"gallery\";i:1;s:7:\"welcome\";}i:7;a:2:{i:0;s:7:\"gallery\";i:1;s:12:\"photo_stream\";}i:8;a:2:{i:0;s:7:\"gallery\";i:1;s:11:\"log_entries\";}}'); INSERT INTO {vars} VALUES (18,'gallery','choose_default_tookit','1'); -INSERT INTO {vars} VALUES (26,'user','mininum_password_length','5'); -INSERT INTO {vars} VALUES (27,'comment','spam_caught','0'); -INSERT INTO {vars} VALUES (25,'gallery','identity_provider','user'); -INSERT INTO {vars} VALUES (29,'gallery','blocks_site_sidebar','a:3:{i:9;a:2:{i:0;s:4:\"info\";i:1;s:8:\"metadata\";}i:10;a:2:{i:0;s:3:\"rss\";i:1;s:9:\"rss_feeds\";}i:11;a:2:{i:0;s:3:\"tag\";i:1;s:3:\"tag\";}}'); +INSERT INTO {vars} VALUES (27,'user','mininum_password_length','5'); +INSERT INTO {vars} VALUES (28,'comment','spam_caught','0'); +INSERT INTO {vars} VALUES (26,'gallery','identity_provider','user'); +INSERT INTO {vars} VALUES (30,'gallery','blocks_site_sidebar','a:3:{i:9;a:2:{i:0;s:4:\"info\";i:1;s:8:\"metadata\";}i:10;a:2:{i:0;s:3:\"rss\";i:1;s:9:\"rss_feeds\";}i:11;a:2:{i:0;s:3:\"tag\";i:1;s:3:\"tag\";}}'); diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index 39859b36..410b6413 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -268,7 +268,8 @@ class gallery_installer { module::set_var("gallery", "show_credits", 1); // @todo this string needs to be picked up by l10n_scanner module::set_var("gallery", "credits", "Powered by Gallery %version"); - module::set_version("gallery", 19); + module::set_var("gallery", "simultaneous_upload_limit", 5); + module::set_version("gallery", 21); } static function upgrade($version) { -- cgit v1.2.3 From 16bed1ffd54000922f806af669f618970600420f Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 6 Dec 2009 21:32:27 -0800 Subject: Remove the hidden form variable _method which was used in the no longer rest controllers. --- modules/gallery/helpers/album.php | 1 - modules/gallery/helpers/item.php | 1 - modules/gallery/helpers/movie.php | 1 - modules/gallery/helpers/photo.php | 1 - modules/gallery/tests/Albums_Controller_Test.php | 1 - 5 files changed, 5 deletions(-) (limited to 'modules/gallery/helpers') diff --git a/modules/gallery/helpers/album.php b/modules/gallery/helpers/album.php index e9a0f6ec..cc631be4 100644 --- a/modules/gallery/helpers/album.php +++ b/modules/gallery/helpers/album.php @@ -115,7 +115,6 @@ class album_Core { static function get_edit_form($parent) { $form = new Forge("albums/update/{$parent->id}", "", "post", array("id" => "g-edit-album-form")); - $form->hidden("_method")->value("put"); $group = $form->group("edit_item")->label(t("Edit Album")); $group->input("title")->label(t("Title"))->value($parent->title); diff --git a/modules/gallery/helpers/item.php b/modules/gallery/helpers/item.php index 8f96c3d9..f8e6534e 100644 --- a/modules/gallery/helpers/item.php +++ b/modules/gallery/helpers/item.php @@ -127,7 +127,6 @@ class item_Core { $page_type = Input::instance()->get("page_type"); $form = new Forge( "quick/delete/$item->id?page_type=$page_type", "", "post", array("id" => "g-confirm-delete")); - $form->hidden("_method")->value("put"); $group = $form->group("confirm_delete")->label(t("Confirm Deletion")); $group->submit("")->value(t("Delete")); return $form; diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php index 536d5143..20ac8592 100644 --- a/modules/gallery/helpers/movie.php +++ b/modules/gallery/helpers/movie.php @@ -130,7 +130,6 @@ class movie_Core { static function get_edit_form($movie) { $form = new Forge("movies/update/$movie->id", "", "post", array("id" => "g-edit-movie-form")); - $form->hidden("_method")->value("put"); $group = $form->group("edit_item")->label(t("Edit Movie")); $group->input("title")->label(t("Title"))->value($movie->title); $group->textarea("description")->label(t("Description"))->value($movie->description); diff --git a/modules/gallery/helpers/photo.php b/modules/gallery/helpers/photo.php index 4188e192..dab98436 100644 --- a/modules/gallery/helpers/photo.php +++ b/modules/gallery/helpers/photo.php @@ -139,7 +139,6 @@ class photo_Core { static function get_edit_form($photo) { $form = new Forge("photos/update/$photo->id", "", "post", array("id" => "g-edit-photo-form")); - $form->hidden("_method")->value("put"); $group = $form->group("edit_item")->label(t("Edit Photo")); $group->input("title")->label(t("Title"))->value($photo->title); $group->textarea("description")->label(t("Description"))->value($photo->description); diff --git a/modules/gallery/tests/Albums_Controller_Test.php b/modules/gallery/tests/Albums_Controller_Test.php index 9b904387..5f23f821 100644 --- a/modules/gallery/tests/Albums_Controller_Test.php +++ b/modules/gallery/tests/Albums_Controller_Test.php @@ -44,7 +44,6 @@ class Albums_Controller_Test extends Unit_Test_Case { $_POST["direction"] = "ASC"; $_POST["csrf"] = access::csrf_token(); $_POST["slug"] = "new-name"; - $_POST["_method"] = "put"; access::allow(identity::everybody(), "edit", $root); ob_start(); -- cgit v1.2.3 From 3d1f166fe5747bc3d11fb6cecf2a11b143efeec4 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 10 Dec 2009 21:20:18 -0800 Subject: Log the entire stack trace when we catch an exception. --- modules/gallery/helpers/identity.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/gallery/helpers') diff --git a/modules/gallery/helpers/identity.php b/modules/gallery/helpers/identity.php index 72e3312d..83ba9e1e 100644 --- a/modules/gallery/helpers/identity.php +++ b/modules/gallery/helpers/identity.php @@ -82,7 +82,8 @@ class identity_Core { } } catch (Exception $e) { // Log it, so we at least have so notification that we swallowed the exception. - Kohana::log("error", "Load_user Exception: " . $e->__toString()); + Kohana::log("error", "Load_user Exception: " . + $e->getMessage() . "\n" . $e->getTraceAsString()); try { Session::instance()->destroy(); } catch (Exception $e) { -- cgit v1.2.3