From f4810345b48d321460d32481e5665ea4602c9207 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 5 Dec 2009 09:13:04 -0800 Subject: Correct inconsistent capitalization on "Server Add" --- modules/server_add/helpers/server_add.php | 2 +- modules/server_add/helpers/server_add_event.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/server_add/helpers/server_add.php b/modules/server_add/helpers/server_add.php index 27794855..60c6426e 100644 --- a/modules/server_add/helpers/server_add.php +++ b/modules/server_add/helpers/server_add.php @@ -24,7 +24,7 @@ class server_add_Core { } if (empty($paths)) { site_status::warning( - t("Server Add needs configuration. Configure it now!", + t("Server add module needs configuration. Configure it now!", array("url" => html::mark_clean(url::site("admin/server_add")))), "server_add_configuration"); } else { diff --git a/modules/server_add/helpers/server_add_event.php b/modules/server_add/helpers/server_add_event.php index e1295bd4..9b28fd70 100644 --- a/modules/server_add/helpers/server_add_event.php +++ b/modules/server_add/helpers/server_add_event.php @@ -22,7 +22,7 @@ class server_add_event_Core { $menu->get("settings_menu") ->append(Menu::factory("link") ->id("server_add") - ->label(t("Server Add")) + ->label(t("Server add")) ->url(url::site("admin/server_add"))); } @@ -35,7 +35,7 @@ class server_add_event_Core { $menu->get("add_menu") ->append(Menu::factory("dialog") ->id("server_add") - ->label(t("Server Add")) + ->label(t("Server add")) ->url(url::site("server_add/browse/$item->id"))); } } -- cgit v1.2.3 From 03ea1ee701986d76738778f475d3ec1b01755e65 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 5 Dec 2009 12:00:50 -0800 Subject: Change the default image to be the full size so that the slideshow shows the big one. --- modules/rss/views/feed.mrss.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/rss/views/feed.mrss.php b/modules/rss/views/feed.mrss.php index 5fce8699..a61ee96c 100644 --- a/modules/rss/views/feed.mrss.php +++ b/modules/rss/views/feed.mrss.php @@ -56,7 +56,6 @@ type="mime_type ?>" height="resize_height ?>" width="resize_width ?>" - isDefault="true" /> -- cgit v1.2.3 From 4a6b62c285fb384739b5d918113758209a259e9e Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 5 Dec 2009 12:07:24 -0800 Subject: Revert "Correct inconsistent capitalization on "Server Add"" This reverts commit f4810345b48d321460d32481e5665ea4602c9207. Bharat is a correct as in that "Server Add" is a proper name and should be exempt from the capitalization rules. --- modules/server_add/helpers/server_add.php | 2 +- modules/server_add/helpers/server_add_event.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/server_add/helpers/server_add.php b/modules/server_add/helpers/server_add.php index 60c6426e..27794855 100644 --- a/modules/server_add/helpers/server_add.php +++ b/modules/server_add/helpers/server_add.php @@ -24,7 +24,7 @@ class server_add_Core { } if (empty($paths)) { site_status::warning( - t("Server add module needs configuration. Configure it now!", + t("Server Add needs configuration. Configure it now!", array("url" => html::mark_clean(url::site("admin/server_add")))), "server_add_configuration"); } else { diff --git a/modules/server_add/helpers/server_add_event.php b/modules/server_add/helpers/server_add_event.php index 9b28fd70..e1295bd4 100644 --- a/modules/server_add/helpers/server_add_event.php +++ b/modules/server_add/helpers/server_add_event.php @@ -22,7 +22,7 @@ class server_add_event_Core { $menu->get("settings_menu") ->append(Menu::factory("link") ->id("server_add") - ->label(t("Server add")) + ->label(t("Server Add")) ->url(url::site("admin/server_add"))); } @@ -35,7 +35,7 @@ class server_add_event_Core { $menu->get("add_menu") ->append(Menu::factory("dialog") ->id("server_add") - ->label(t("Server add")) + ->label(t("Server Add")) ->url(url::site("server_add/browse/$item->id"))); } } -- cgit v1.2.3 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') 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') 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 0bb742ef33fe8f4ab8f4745b94355dab36ccb6cb Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 5 Dec 2009 21:21:08 -0800 Subject: Use NULL instead of actual values in the vars table, so that var tweaks result in smaller diffs. --- modules/gallery/controllers/packager.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules') diff --git a/modules/gallery/controllers/packager.php b/modules/gallery/controllers/packager.php index 82c3c938..1354a01b 100644 --- a/modules/gallery/controllers/packager.php +++ b/modules/gallery/controllers/packager.php @@ -134,6 +134,11 @@ class Packager_Controller extends Controller { $line = preg_replace("/ENGINE=\S+ /", "", $line); } + // Null out ids in the vars table since it's an auto_increment table and this will result in + // more stable values so we'll have less churn in install.sql. + $line = preg_replace( + "/^INSERT INTO {vars} VALUES \(\d+/", "INSERT INTO {vars} VALUES (NULL", $line); + $buf .= $line; } $fd = fopen($sql_file, "wb"); -- 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') 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') 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 From b4a35a8e2cc38a2d8aff2cf1ba16f4357aa1a52a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 16 Dec 2009 09:37:28 -0800 Subject: Show the right edit form for movies. --- modules/gallery/controllers/quick.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'modules') diff --git a/modules/gallery/controllers/quick.php b/modules/gallery/controllers/quick.php index f2a77033..7f1ad43b 100644 --- a/modules/gallery/controllers/quick.php +++ b/modules/gallery/controllers/quick.php @@ -131,11 +131,15 @@ class Quick_Controller extends Controller { access::required("view", $item); access::required("edit", $item); - if ($item->is_album()) { - $form = album::get_edit_form($item); - } else { - $form = photo::get_edit_form($item); + switch ($item->type) { + case "album": + return print album::get_edit_form($item); + + case "photo": + return print photo::get_edit_form($item); + + case "movie": + return print movie::get_edit_form($item); } - print $form; } } -- cgit v1.2.3 From 02b3c4e70478519e3baa7df80fefd19ebdd6e2e3 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 16 Dec 2009 15:18:08 -0800 Subject: Adjust for the fact that movies have JPG thumbnails. Fixes ticket --- modules/gallery/models/item.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index d27e331b..96415b3d 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -157,7 +157,16 @@ class Item_Model extends ORM_MPTT { @rename(VARPATH . "albums/$old_relative_path", VARPATH . "albums/$new_relative_path"); @rename(VARPATH . "resizes/$old_relative_path", VARPATH . "resizes/$new_relative_path"); - @rename(VARPATH . "thumbs/$old_relative_path", VARPATH . "thumbs/$new_relative_path"); + if ($this->is_movie()) { + // Movie thumbnails have a .jpg extension + $old_relative_thumb_path = preg_replace("/...$/", "jpg", $old_relative_path); + $new_relative_thumb_path = preg_replace("/...$/", "jpg", $new_relative_path); + @rename(VARPATH . "thumbs/$old_relative_thumb_path", + VARPATH . "thumbs/$new_relative_thumb_path"); + } else { + @rename(VARPATH . "thumbs/$old_relative_path", VARPATH . "thumbs/$new_relative_path"); + } + $this->name = $new_name; if ($this->is_album()) { -- cgit v1.2.3 From 86e0bc863a1c6739a9cd153931c099307e4c1000 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 18 Dec 2009 14:25:35 -0800 Subject: Use url::base() instead of item::root()->url because we can't be sure that will work (if your database is sitll at Beta 1, you don't have the slug column, for example). --- modules/gallery/views/upgrader.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/views/upgrader.html.php b/modules/gallery/views/upgrader.html.php index 5cd1cd77..6cf0068d 100644 --- a/modules/gallery/views/upgrader.html.php +++ b/modules/gallery/views/upgrader.html.php @@ -26,7 +26,7 @@

Gallery is up to date.", - array("url" => html::mark_clean(item::root()->url()))) ?> + array("url" => html::mark_clean(url::base()))) ?>

-- cgit v1.2.3