From 91bdcfe1c50e775d46b58c3815eb30874ad3a96e Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 2 Oct 2011 15:34:37 -0700 Subject: Close the breadcrumb list --- themes/wind/views/page.html.php | 1 + 1 file changed, 1 insertion(+) diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php index ca6d2bb1..24d3347e 100644 --- a/themes/wind/views/page.html.php +++ b/themes/wind/views/page.html.php @@ -115,6 +115,7 @@ last): ?> title, module::get_var("gallery", "visible_title_length"))) ?> last): ?> + -- cgit v1.2.3 From 519b1ff11b3cde136e6091e244c5840e0629a0b9 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Sun, 2 Oct 2011 15:34:37 -0700 Subject: Automated update of .build_number to 175 for branch master Last update: dfbfe090168ee4ed44e2c8208e79d3fe40f90437 (1 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index a8c3e6c9..6d62d211 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=174 +build_number=175 -- cgit v1.2.3 From 79a2e3f1a7debdf62c66797446b2615e0a55000c Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 3 Oct 2011 21:47:18 -0700 Subject: Use a stdClass wrapper around the data in the before_combine and after_combine events so that event handlers can modify the data. Fixes #1789. --- modules/gallery/libraries/Gallery_View.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php index e04b9169..9c672770 100644 --- a/modules/gallery/libraries/Gallery_View.php +++ b/modules/gallery/libraries/Gallery_View.php @@ -157,7 +157,10 @@ class Gallery_View_Core extends View { $contents = $cache->get($key); if (empty($contents)) { - module::event("before_combine", $type, $this->combine_queue[$type][$group]); + $combine_data = new stdClass(); + $combine_data->type = $type; + $combine_data->contents = $this->combine_queue[$type][$group]; + module::event("before_combine", $combine_data); $contents = ""; foreach (array_keys($this->combine_queue[$type][$group]) as $path) { @@ -168,14 +171,17 @@ class Gallery_View_Core extends View { } } - module::event("after_combine", $type, $contents); + $combine_data = new stdClass(); + $combine_data->type = $type; + $combine_data->contents = $contents; + module::event("after_combine", $combine_data); - $cache->set($key, $contents, array($type), 30 * 84600); + $cache->set($key, $combine_data->contents, array($type), 30 * 84600); $use_gzip = function_exists("gzencode") && (int) ini_get("zlib.output_compression") === 0; if ($use_gzip) { - $cache->set("{$key}_gz", gzencode($contents, 9, FORCE_GZIP), + $cache->set("{$key}_gz", gzencode($combine_data->contents, 9, FORCE_GZIP), array($type, "gzip"), 30 * 84600); } -- cgit v1.2.3 From 1410ba44eac7d65f2fb21ab259e4df01482e81d0 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Mon, 3 Oct 2011 21:48:28 -0700 Subject: Automated update of .build_number to 176 for branch master Last update: 5639ff342195ec80f125f4b09ccc5ae5932c2197 (3 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index 6d62d211..cbd4e1ee 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=175 +build_number=176 -- cgit v1.2.3 From 948bfeff210325fa9b0ca189030ebb9ac53063c5 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 3 Oct 2011 22:30:14 -0700 Subject: Work around a JS bug in IE9 that breaks the organize module. Fixes #1790. --- modules/organize/views/organize_frame.html.php | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/modules/organize/views/organize_frame.html.php b/modules/organize/views/organize_frame.html.php index 650574ab..47828944 100644 --- a/modules/organize/views/organize_frame.html.php +++ b/modules/organize/views/organize_frame.html.php @@ -109,7 +109,7 @@ item_ids = []; for (var i = 0; i != nodes.length; i++) { var node = Ext.fly(nodes[i]); - item_ids.push(node.getAttribute("rel")); + item_ids.push(get_id_from_node(node)); } start_busy(for_js() ?>); Ext.Ajax.request({ @@ -127,6 +127,16 @@ }); }; + var get_id_from_node = function(node) { + var id = node.getAttribute("rel"); + if (!id) { + // IE9 has a bug which causes it to be unable to read the "rel" attr + // so hack it by extracting the id the CSS class id. This is fragile. + // ref: https://sourceforge.net/apps/trac/gallery/ticket/1790 + return node.getAttribute("id").replace("thumb-", ""); + } + } + /* * ******************************************************************************** * JsonStore, DataView and Panel for viewing albums @@ -143,7 +153,7 @@ "dblclick": function(v, index, node, e) { node = Ext.get(node); if (node.hasClass("thumb-album")) { - var id = node.getAttribute("rel"); + var id = get_id_from_node(node); tree_panel.fireEvent("click", tree_panel.getNodeById(id)) } }, @@ -218,7 +228,7 @@ var nodes = data.nodes; source_ids = []; for (var i = 0; i != nodes.length; i++) { - source_ids.push(Ext.fly(nodes[i]).getAttribute("rel")); + source_ids.push(get_id_from_node(Ext.fly(nodes[i]))); } start_busy(for_js() ?>); target = Ext.fly(target); @@ -232,7 +242,7 @@ failure: show_generic_error, params: { source_ids: source_ids.join(","), - target_id: target.getAttribute("rel"), + target_id: get_id_from_node(target), relative: this.drop_side, // calculated in onNodeOver csrf: '' } @@ -448,7 +458,7 @@ var moving_albums = 0; for (var i = 0; i != nodes.length; i++) { var node = Ext.fly(nodes[i]); - source_ids.push(node.getAttribute("rel")); + source_ids.push(get_id_from_node(node)); moving_albums |= node.hasClass("thumb-album"); } start_busy(for_js() ?>); -- cgit v1.2.3 From 0e10151eb4c92bca13ae415ccd03cce1109682fa Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Mon, 3 Oct 2011 22:31:01 -0700 Subject: Automated update of .build_number to 177 for branch master Last update: 5639ff342195ec80f125f4b09ccc5ae5932c2197 (5 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index cbd4e1ee..b4620f4f 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=176 +build_number=177 -- cgit v1.2.3 From e5175fd277d597acce1d824c8c82da08d15b407a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 3 Oct 2011 23:19:44 -0700 Subject: Fix the standard and REST uploaders to use a callback function to delete temporary files during shutdown. Fixes #1788. --- modules/gallery/controllers/uploader.php | 5 +---- modules/rest/controllers/rest.php | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/gallery/controllers/uploader.php b/modules/gallery/controllers/uploader.php index 9c2bf7d7..05b3bf7b 100644 --- a/modules/gallery/controllers/uploader.php +++ b/modules/gallery/controllers/uploader.php @@ -55,6 +55,7 @@ class Uploader_Controller extends Controller { if ($form->validate() && $file_validation->validate()) { $temp_filename = upload::save("Filedata"); + Event::add("system.shutdown", create_function("", "unlink(\"$temp_filename\");")); try { $item = ORM::factory("item"); $item->name = substr(basename($temp_filename), 10); // Skip unique identifier Kohana adds @@ -87,14 +88,10 @@ class Uploader_Controller extends Controller { Kohana_Log::add("error", "Validation errors: " . print_r($e->validation->errors(), 1)); } - if (file_exists($temp_filename)) { - unlink($temp_filename); - } header("HTTP/1.1 500 Internal Server Error"); print "ERROR: " . $e->getMessage(); return; } - unlink($temp_filename); print "FILEID: $item->id"; } else { header("HTTP/1.1 400 Bad Request"); diff --git a/modules/rest/controllers/rest.php b/modules/rest/controllers/rest.php index 52d9925b..624a02a0 100644 --- a/modules/rest/controllers/rest.php +++ b/modules/rest/controllers/rest.php @@ -69,6 +69,7 @@ class Rest_Controller extends Controller { $request->params = (object) $input->post(); if (isset($_FILES["file"])) { $request->file = upload::save("file"); + Event::add("system.shutdown", create_function("", "unlink(\"{$request->file}\");")); } break; } -- cgit v1.2.3 From 5a11684486e82758a9ea0764e779726252c17dea Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Mon, 3 Oct 2011 23:20:57 -0700 Subject: Automated update of .build_number to 178 for branch master Last update: 5639ff342195ec80f125f4b09ccc5ae5932c2197 (7 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index b4620f4f..5594e328 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=177 +build_number=178 -- cgit v1.2.3