From d2c59740b11c0764967410b233f3b01fc3dab85d Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 15 Aug 2010 00:00:31 -0700 Subject: Updated organize SWF to understand data resources. --- modules/organize/lib/Gallery3WebClient.swf | Bin 147776 -> 145197 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'modules/organize') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index 40249a73..b37a74c3 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ -- cgit v1.2.3 From 387d30da764b152a9bb40ac6db7d9ce5282aa7a3 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 17 Aug 2010 22:32:47 -0700 Subject: use HTTP_HOST instead of SERVER_NAME so that we're sending requests back to the same canonical domain that we came from. Else Flash makes crossdomain.xml requests, fails, and falls over. Fixes ticket #1298. --- modules/organize/controllers/organize.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/organize') diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index 3005eb67..7b2ba8ef 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -38,7 +38,7 @@ class Organize_Controller extends Controller { $v = new View("organize_dialog.html"); $v->album = $album; - $v->domain = $input->server("SERVER_NAME"); + $v->domain = $input->server("HTTP_HOST"); $v->access_key = rest::access_key(); $v->file_filter = addslashes($file_filter); $v->sort_order = addslashes(json_encode($sort_order)); -- cgit v1.2.3 From ae618840b6672444c1e3a92d1907b4a1306146df Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 21 Aug 2010 15:25:06 -0700 Subject: Tighten up whitespace. --- modules/organize/controllers/organize.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'modules/organize') diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index 7b2ba8ef..d2f3fbf5 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -31,10 +31,9 @@ class Organize_Controller extends Controller { $sort_fields[$field] = (string)$description; } $sort_order = array("ASC" => (string)t("Ascending"), "DESC" => (string)t("Descending")); - $file_filter = json_encode( - array("photo" => array("label" => "Images", - "types" => array("*.jpg", "*.jpeg", "*.png", "*.gif")), - "movie" => array("label" => "Movies", "types" => array("*.flv", "*.mp4", "*.m4v")))); + $file_filter = json_encode(array( + "photo" => array("label" => "Images", "types" => array("*.jpg", "*.jpeg", "*.png", "*.gif")), + "movie" => array("label" => "Movies", "types" => array("*.flv", "*.mp4", "*.m4v")))); $v = new View("organize_dialog.html"); $v->album = $album; -- cgit v1.2.3 From 4d55166eba06a968c954fd5f5dca267d131c281e Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 21 Aug 2010 16:52:46 -0700 Subject: Fix a bug where we were using names in a string context resulting in sending the wrong custom headers back. Fixed the names of the headers to be slightly more meta. Fixes #1305 Implemented in gallery3-flex bea5f67efa93a3921eec8cd03a15d68f513f1dc0 --- modules/organize/lib/Gallery3WebClient.swf | Bin 145197 -> 145257 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'modules/organize') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index b37a74c3..f90b51c4 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ -- cgit v1.2.3 From 91fab0fcf5fb65d9e210abb031a4ddfee31b1f9e Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 22 Aug 2010 00:26:52 -0700 Subject: Compiled version of http://github.com/gallery/gallery3-flex/commit/88efbd77b45ae888b035295a8034229c645267c2 --- modules/organize/lib/Gallery3WebClient.swf | Bin 145257 -> 145162 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'modules/organize') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index f90b51c4..f64c0c26 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ -- cgit v1.2.3 From 04add75f6ff7596319b01c635cb62fafacf504cf Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 22 Aug 2010 00:27:24 -0700 Subject: Get rid of the move dialog and move option. Instead, replace it with a call to Organize with the appropriate album open. I have not yet figured out how to get the SWF code to highlight the active image, but that's coming. Partial fix for #1204. --- modules/gallery/controllers/move.php | 71 ------------------------- modules/gallery/helpers/gallery_event.php | 12 ----- modules/gallery/views/move_browse.html.php | 50 ----------------- modules/gallery/views/move_tree.html.php | 19 ------- modules/organize/controllers/organize.php | 1 + modules/organize/helpers/organize_event.php | 24 ++++++--- modules/organize/views/organize_dialog.html.php | 1 + 7 files changed, 19 insertions(+), 159 deletions(-) delete mode 100644 modules/gallery/controllers/move.php delete mode 100644 modules/gallery/views/move_browse.html.php delete mode 100644 modules/gallery/views/move_tree.html.php (limited to 'modules/organize') diff --git a/modules/gallery/controllers/move.php b/modules/gallery/controllers/move.php deleted file mode 100644 index 7b2d6165..00000000 --- a/modules/gallery/controllers/move.php +++ /dev/null @@ -1,71 +0,0 @@ -source = $source; - $view->tree = $this->_get_tree_html($source, ORM::factory("item", 1)); - print $view; - } - - public function save($source_id) { - access::verify_csrf(); - $source = ORM::factory("item", $source_id); - $target = ORM::factory("item", Input::instance()->post("target_id")); - - access::required("view", $source); - access::required("edit", $source); - access::required("view", $target); - access::required("edit", $target); - - item::move($source, $target); - - json::reply(array("result" => "success", "location" => $target->url())); - } - - public function show_sub_tree($source_id, $target_id) { - $source = ORM::factory("item", $source_id); - $target = ORM::factory("item", $target_id); - access::required("view", $source); - access::required("edit", $source); - access::required("view", $target); - // show targets even if they're not editable because they may contain children which *are* - // editable - - print $this->_get_tree_html($source, $target); - } - - private function _get_tree_html($source, $target) { - $view = new View("move_tree.html"); - $view->source = $source; - $view->parent = $target; - $view->children = ORM::factory("item") - ->viewable() - ->where("type", "=", "album") - ->where("parent_id", "=", $target->id) - ->find_all(); - return $view; - } - -} diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index e048118b..df5394c9 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -447,7 +447,6 @@ class gallery_event_Core { break; } $cover_title = t("Choose as the album cover"); - $move_title = t("Move to another album"); $csrf = access::csrf_token(); @@ -478,17 +477,6 @@ class gallery_event_Core { ->url(url::site("quick/rotate/$item->id/cw?csrf=$csrf&from_id={$theme_item->id}&page_type=$page_type"))); } - // @todo Don't move photos from the photo page; we don't yet have a good way of redirecting - // after move - if ($theme->page_subtype() == "album") { - $options_menu - ->append(Menu::factory("dialog") - ->id("move") - ->label($move_title) - ->css_class("ui-icon-folder-open") - ->url(url::site("move/browse/$item->id"))); - } - $parent = $item->parent(); if (access::can("edit", $parent)) { // We can't make this item the highlight if it's an album with no album cover, or if it's diff --git a/modules/gallery/views/move_browse.html.php b/modules/gallery/views/move_browse.html.php deleted file mode 100644 index f77c724c..00000000 --- a/modules/gallery/views/move_browse.html.php +++ /dev/null @@ -1,50 +0,0 @@ - -
- -

- type == "photo"): ?> - - type == "movie"): ?> - - type == "album"): ?> - - -

-
-
    -
  • - -
  • -
-
id") ?>"> - - - for_html_attr() ?>" - disabled="disabled" class="submit" /> -
-
-
diff --git a/modules/gallery/views/move_tree.html.php b/modules/gallery/views/move_tree.html.php deleted file mode 100644 index e629e1bb..00000000 --- a/modules/gallery/views/move_tree.html.php +++ /dev/null @@ -1,19 +0,0 @@ - -thumb_img(array(), 25); ?> -contains($parent)): ?> - title) ?> - - title) ?> - - diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index d2f3fbf5..2b6e4186 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -42,6 +42,7 @@ class Organize_Controller extends Controller { $v->file_filter = addslashes($file_filter); $v->sort_order = addslashes(json_encode($sort_order)); $v->sort_fields = addslashes(json_encode($sort_fields)); + $v->selected_id = Input::instance()->get("selected_id", null); $v->rest_uri = url::site("rest") . "/"; $v->controller_uri = url::site("organize") . "/"; $v->swf_uri = url::file("modules/organize/lib/Gallery3WebClient.swf?") . diff --git a/modules/organize/helpers/organize_event.php b/modules/organize/helpers/organize_event.php index ae05fb5d..1593d30e 100644 --- a/modules/organize/helpers/organize_event.php +++ b/modules/organize/helpers/organize_event.php @@ -32,13 +32,23 @@ class organize_event_Core { } static function context_menu($menu, $theme, $item) { - if ($item->is_album() && access::can("edit", $item)) { - $menu->get("options_menu") - ->append(Menu::factory("dialog") - ->id("organize") - ->label(t("Organize album")) - ->css_class("ui-icon-folder-open g-organize-link") - ->url(url::site("organize/dialog/{$item->id}"))); + if (access::can("edit", $item)) { + if ($item->is_album()) { + $menu->get("options_menu") + ->append(Menu::factory("dialog") + ->id("organize") + ->label(t("Organize album")) + ->css_class("ui-icon-folder-open g-organize-link") + ->url(url::site("organize/dialog/{$item->id}"))); + } else { + $parent = $item->parent(); + $menu->get("options_menu") + ->append(Menu::factory("dialog") + ->id("move") + ->label(t("Move to another album")) + ->css_class("ui-icon-folder-open g-organize-link") + ->url(url::site("organize/dialog/{$parent->id}?selected_id={$item->id}"))); + } } } diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index 4cc6385e..83143f97 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -94,6 +94,7 @@ sortOrder: "", sortFields: "", albumId: "id ?>", + selectedId: "", restUri: "", controllerUri: "" }; -- cgit v1.2.3 From 922b810c56bc42a5d3df957cae82c0e70642f8fa Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 28 Aug 2010 21:25:09 -0700 Subject: Oops, forgot to create an install() function and set the version of the organize module to 2 in 8fb56abf034dd1f5c561e7af12bf6e097a3de6f6 --- installer/install.sql | 2 +- modules/organize/helpers/organize_installer.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/organize') diff --git a/installer/install.sql b/installer/install.sql index c6314aa7..058bc882 100644 --- a/installer/install.sql +++ b/installer/install.sql @@ -247,7 +247,7 @@ CREATE TABLE {modules} ( INSERT INTO {modules} VALUES (1,1,'gallery',34,1); INSERT INTO {modules} VALUES (2,1,'user',3,2); INSERT INTO {modules} VALUES (3,1,'comment',3,3); -INSERT INTO {modules} VALUES (4,1,'organize',1,4); +INSERT INTO {modules} VALUES (4,1,'organize',2,4); INSERT INTO {modules} VALUES (5,1,'info',1,5); INSERT INTO {modules} VALUES (6,1,'rest',3,6); INSERT INTO {modules} VALUES (7,1,'rss',1,7); diff --git a/modules/organize/helpers/organize_installer.php b/modules/organize/helpers/organize_installer.php index bbe6fc65..12d8147f 100644 --- a/modules/organize/helpers/organize_installer.php +++ b/modules/organize/helpers/organize_installer.php @@ -22,6 +22,10 @@ class organize_installer { site_status::clear("organize_needs_rest"); } + static function install() { + module::set_version("organize", $version = 2); + } + static function upgrade($version) { if ($version == 1) { if (!module::is_active("rest")) { -- cgit v1.2.3 From efa1fce9de1acc126ce0f2f607cf568e1f6a43af Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 29 Aug 2010 10:28:50 -0700 Subject: Update the Organize flash object with the fixes for ticket #1174. --- modules/organize/lib/Gallery3WebClient.swf | Bin 145162 -> 148700 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'modules/organize') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index f64c0c26..87ea485c 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ -- cgit v1.2.3 From a184142d6f3fc9b790e58d44606ff1576891a6ee Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 29 Aug 2010 11:56:21 -0700 Subject: Revert "Update the Organize flash object with the fixes for ticket #1174." This commit reintroduces the bug in https://sourceforge.net/apps/trac/gallery/ticket/1305 This reverts commit efa1fce9de1acc126ce0f2f607cf568e1f6a43af. --- modules/organize/lib/Gallery3WebClient.swf | Bin 148700 -> 145162 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'modules/organize') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index 87ea485c..f64c0c26 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ -- cgit v1.2.3 From de93507d1387aa2245801ce9279b6b8985b1a250 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 29 Aug 2010 12:10:20 -0700 Subject: Regenerated version from http://github.com/gallery/gallery3-flex/commit/1e42ddf6574d7632474b8cfbd5b9171a9bb53552 which contains fixes for both #1174 and #1305. --- modules/organize/lib/Gallery3WebClient.swf | Bin 145162 -> 145857 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'modules/organize') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index f64c0c26..674e775c 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ -- cgit v1.2.3 From 2c717b18d36f8d4ae6b7b94beeb0fd99a2984c9a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 29 Aug 2010 20:04:02 -0700 Subject: Don't concatenate two strings together as an argument for t() or t2(); the l10n_scanner cannot parse it properly and drops those from the localization list. Fixes ticket #1284. --- modules/g2_import/helpers/g2_import.php | 3 +-- modules/gallery/helpers/gallery_task.php | 3 +-- modules/gallery/helpers/graphics.php | 6 ++---- modules/gallery/libraries/IdentityProvider.php | 6 ++---- modules/organize/helpers/organize_event.php | 3 +-- modules/organize/helpers/organize_installer.php | 3 +-- modules/organize/views/organize_dialog.html.php | 3 +-- modules/slideshow/helpers/slideshow_event.php | 3 +-- 8 files changed, 10 insertions(+), 20 deletions(-) (limited to 'modules/organize') diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index f2e9dad9..3753c5f2 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -689,8 +689,7 @@ class g2_import_Core { $title = $g2_item->getTitle(); $title or $title = $g2_item->getPathComponent(); $messages[] = - t("%title from Gallery 2 could not be processed; " . - "(imported as %title)", + t("%title from Gallery 2 could not be processed; (imported as %title)", array("g2_url" => $g2_item_url, "g3_url" => $item->url(), "title" => $title)); diff --git a/modules/gallery/helpers/gallery_task.php b/modules/gallery/helpers/gallery_task.php index 6a1fc28a..0886aad0 100644 --- a/modules/gallery/helpers/gallery_task.php +++ b/modules/gallery/helpers/gallery_task.php @@ -58,8 +58,7 @@ class gallery_task_Core { $tasks[] = Task_Definition::factory() ->callback("gallery_task::fix") ->name(t("Fix your Gallery")) - ->description(t("Fix a variety of problems that might cause your Gallery to act " . - "strangely. Requires maintenance mode.")) + ->description(t("Fix a variety of problems that might cause your Gallery to act strangely. Requires maintenance mode.")) ->severity(log::SUCCESS); return $tasks; diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index cc4d2e76..bb085ea5 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -338,8 +338,7 @@ class graphics_Core { } else { $toolkits->imagemagick->installed = false; $toolkits->imagemagick->error = - t("ImageMagick is installed, but PHP's open_basedir restriction " . - "prevents Gallery from using it."); + t("ImageMagick is installed, but PHP's open_basedir restriction prevents Gallery from using it."); } } else { $toolkits->imagemagick->installed = false; @@ -363,8 +362,7 @@ class graphics_Core { } else { $toolkits->graphicsmagick->installed = false; $toolkits->graphicsmagick->error = - t("GraphicsMagick is installed, but PHP's open_basedir restriction " . - "prevents Gallery from using it."); + t("GraphicsMagick is installed, but PHP's open_basedir restriction prevents Gallery from using it."); } } else { $toolkits->graphicsmagick->installed = false; diff --git a/modules/gallery/libraries/IdentityProvider.php b/modules/gallery/libraries/IdentityProvider.php index 5f341c90..4ef07e1a 100644 --- a/modules/gallery/libraries/IdentityProvider.php +++ b/modules/gallery/libraries/IdentityProvider.php @@ -61,8 +61,7 @@ class IdentityProvider_Core { * Return a commen confirmation message */ static function confirmation_message() { - return t("Are you sure you want to change your Identity Provider? " . - "Continuing will delete all existing users."); + return t("Are you sure you want to change your Identity Provider? Continuing will delete all existing users."); } static function change_provider($new_provider) { @@ -113,8 +112,7 @@ class IdentityProvider_Core { } message::error( - t("Error attempting to enable \"%new_provider\" identity provider, " . - "reverted to \"%old_provider\" identity provider", + t("Error attempting to enable \"%new_provider\" identity provider, reverted to \"%old_provider\" identity provider", array("new_provider" => $new_provider, "old_provider" => $current_provider))); $restore_already_running = false; diff --git a/modules/organize/helpers/organize_event.php b/modules/organize/helpers/organize_event.php index 1593d30e..2f997600 100644 --- a/modules/organize/helpers/organize_event.php +++ b/modules/organize/helpers/organize_event.php @@ -61,8 +61,7 @@ class organize_event_Core { static function module_change($changes) { if (!module::is_active("rest") || in_array("rest", $changes->deactivate)) { site_status::warning( - t("The Organize module requires the Rest module. " . - "Activate the Rest module now", + t("The Organize module requires the Rest module. Activate the Rest module now", array("url" => html::mark_clean(url::site("admin/modules")))), "organize_needs_rest"); } else { diff --git a/modules/organize/helpers/organize_installer.php b/modules/organize/helpers/organize_installer.php index 12d8147f..2faa598b 100644 --- a/modules/organize/helpers/organize_installer.php +++ b/modules/organize/helpers/organize_installer.php @@ -30,8 +30,7 @@ class organize_installer { if ($version == 1) { if (!module::is_active("rest")) { site_status::warning( - t("The Organize module requires the Rest module. " . - "Activate the Rest module now", + t("The Organize module requires the Rest module. Activate the Rest module now", array("url" => html::mark_clean(url::site("admin/modules")))), "organize_needs_rest"); } diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index 83143f97..cafc4418 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -130,8 +130,7 @@

html::purify($album->title))) ?>

- $flash_minimum_version)) ?> + $flash_minimum_version)) ?>

deactivate)) { site_status::warning( - t("The Slideshow module requires the RSS module. " . - "Activate the RSS module now", + t("The Slideshow module requires the RSS module. Activate the RSS module now", array("url" => html::mark_clean(url::site("admin/modules")))), "slideshow_needs_rss"); } else { -- cgit v1.2.3 From 0f2daf29acc051e7fe79abc625406684e9da8196 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 30 Aug 2010 22:05:01 -0700 Subject: Fix for ticket #1320. Hook the loading of the initial albums and check to see if the loaded item is the requested item. --- modules/organize/lib/Gallery3WebClient.swf | Bin 148700 -> 148793 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'modules/organize') diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index 87ea485c..eee45e08 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ -- cgit v1.2.3 From 5568ab24decd31e185fa1b19d29838ec3b30e570 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 30 Aug 2010 22:21:00 -0700 Subject: Normalize the "flash missing" message string with the one in the uploader for convenient localization. --- modules/organize/views/organize_dialog.html.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'modules/organize') diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index cafc4418..b76813ad 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -1,10 +1,6 @@