From b1dad9974116b5cd8236041bc276519d50ee0866 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 6 Jun 2013 18:45:46 -0400 Subject: Replace flashmediaelement.swf with a PHP wrapper that strips url fragments and query parameters. --- modules/gallery/views/movieplayer.html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/views/movieplayer.html.php b/modules/gallery/views/movieplayer.html.php index f78cc91a..e4046906 100644 --- a/modules/gallery/views/movieplayer.html.php +++ b/modules/gallery/views/movieplayer.html.php @@ -11,7 +11,8 @@ defaultVideoHeight: , startVolume: 1.0, features: ["playpause", "progress", "current", "duration", "volume", "fullscreen"], - pluginPath: "" + pluginPath: "", + flashName: "flashmediaelement.swf.php" }, ) ); -- cgit v1.2.3 From c70646237e90e998259b72ae9c2497ad1f384432 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 8 Jun 2013 16:34:16 -0400 Subject: Rename uploadify SWF wrappers to end in .swf.php for consistency. --- lib/uploadify/uploadify.allglyphs.php | 46 -------------------------- lib/uploadify/uploadify.allglyphs.swf.php | 47 +++++++++++++++++++++++++++ lib/uploadify/uploadify.php | 46 -------------------------- lib/uploadify/uploadify.swf.php | 47 +++++++++++++++++++++++++++ modules/gallery/tests/File_Structure_Test.php | 7 ++-- modules/gallery/tests/xss_data.txt | 2 +- modules/gallery/views/form_uploadify.html.php | 2 +- 7 files changed, 100 insertions(+), 97 deletions(-) delete mode 100644 lib/uploadify/uploadify.allglyphs.php create mode 100644 lib/uploadify/uploadify.allglyphs.swf.php delete mode 100644 lib/uploadify/uploadify.php create mode 100644 lib/uploadify/uploadify.swf.php (limited to 'modules') diff --git a/lib/uploadify/uploadify.allglyphs.php b/lib/uploadify/uploadify.allglyphs.php deleted file mode 100644 index 18b75a50..00000000 --- a/lib/uploadify/uploadify.allglyphs.php +++ /dev/null @@ -1,46 +0,0 @@ -id}") modules/gallery/views/form_uploadify.html.php 31 DIRTY_JS implode(";",$extensions) modules/gallery/views/form_uploadify.html.php 33 DIRTY_JS url::file("lib/uploadify/cancel.png") diff --git a/modules/gallery/views/form_uploadify.html.php b/modules/gallery/views/form_uploadify.html.php index 4963d185..bba6db73 100644 --- a/modules/gallery/views/form_uploadify.html.php +++ b/modules/gallery/views/form_uploadify.html.php @@ -25,7 +25,7 @@ $("#g-uploadify").uploadify({ width: 298, height: 32, - uploader: "", + uploader: "", script: "id}") ?>", scriptData: , fileExt: "", -- cgit v1.2.3 From 3c100d06ff10d12b1b6b960ba52c5206bac855c4 Mon Sep 17 00:00:00 2001 From: shadlaws Date: Wed, 12 Jun 2013 07:25:26 +0200 Subject: #2074 - Mirror some additional file_proxy checks in data_rest. --- modules/gallery/helpers/data_rest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/helpers/data_rest.php b/modules/gallery/helpers/data_rest.php index d4f456d7..a0a225f9 100644 --- a/modules/gallery/helpers/data_rest.php +++ b/modules/gallery/helpers/data_rest.php @@ -25,7 +25,6 @@ class data_rest_Core { static function get($request) { $item = rest::resolve($request->url); - access::required("view", $item); $p = $request->params; if (!isset($p->size) || !in_array($p->size, array("thumb", "resize", "full"))) { @@ -36,10 +35,16 @@ class data_rest_Core { // see if you should make the same change there as well. if ($p->size == "full") { + if ($item->is_album()) { + throw new Kohana_404_Exception(); + } + access::required("view_full", $item); $file = $item->file_path(); } else if ($p->size == "resize") { + access::required("view", $item); $file = $item->resize_path(); } else { + access::required("view", $item); $file = $item->thumb_path(); } -- cgit v1.2.3 From 632285ee0c7d9b8aa89c1197739b5a521f9c5e9c Mon Sep 17 00:00:00 2001 From: jamaa Date: Mon, 20 May 2013 22:19:34 +0200 Subject: add the image size (in pixels) to the info module adds a new variable "show_size", so had to increment the version number to 3 --- modules/info/helpers/info_block.php | 7 +++++++ modules/info/helpers/info_installer.php | 5 +++++ modules/info/module.info | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php index 62aa0746..f4fe5a6e 100644 --- a/modules/info/helpers/info_block.php +++ b/modules/info/helpers/info_block.php @@ -72,6 +72,13 @@ class info_block_Core { ); } } + if (($theme->item->width && $theme->item->height) && module::get_var("info", "show_size")) { + $info["size"] = array( + "label" => t("Size:"), + "value" => $theme->item->width . " x " . $theme->item->height + ); + } + $block->content->metadata = $info; module::event("info_block_get_metadata", $block, $theme->item); diff --git a/modules/info/helpers/info_installer.php b/modules/info/helpers/info_installer.php index 43c216dc..5a79c1cc 100644 --- a/modules/info/helpers/info_installer.php +++ b/modules/info/helpers/info_installer.php @@ -25,6 +25,7 @@ class info_installer { module::set_var("info", "show_owner", 1); module::set_var("info", "show_name", 1); module::set_var("info", "show_captured", 1); + module::set_var("info", "show_size", 1); } static function upgrade($version) { @@ -35,6 +36,10 @@ class info_installer { module::set_var("info", "show_name", 1); module::set_var("info", "show_captured", 1); module::set_version("info", $version = 2); + } + else if ($version == 2) { + module::set_var("info", "show_size", 1); + module::set_version("info", $version = 3); } } } diff --git a/modules/info/module.info b/modules/info/module.info index 0f35c922..33b16222 100644 --- a/modules/info/module.info +++ b/modules/info/module.info @@ -1,6 +1,6 @@ name = "Info" description = "Display extra information about photos and albums" -version = 2 +version = 3 author_name = "Gallery Team" author_url = "http://codex.galleryproject.org/Gallery:Team" info_url = "http://codex.galleryproject.org/Gallery3:Modules:info" -- cgit v1.2.3 From 5d8ac644a5db74c9ca3bf563e80643233b49e28c Mon Sep 17 00:00:00 2001 From: jamaa Date: Tue, 11 Jun 2013 21:44:02 +0200 Subject: fix whitespace --- modules/info/helpers/info_installer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/info/helpers/info_installer.php b/modules/info/helpers/info_installer.php index 5a79c1cc..f45f4a27 100644 --- a/modules/info/helpers/info_installer.php +++ b/modules/info/helpers/info_installer.php @@ -25,7 +25,7 @@ class info_installer { module::set_var("info", "show_owner", 1); module::set_var("info", "show_name", 1); module::set_var("info", "show_captured", 1); - module::set_var("info", "show_size", 1); + module::set_var("info", "show_size", 1); } static function upgrade($version) { @@ -37,7 +37,7 @@ class info_installer { module::set_var("info", "show_captured", 1); module::set_version("info", $version = 2); } - else if ($version == 2) { + else if ($version == 2) { module::set_var("info", "show_size", 1); module::set_version("info", $version = 3); } -- cgit v1.2.3 From ad634512756b11569cb649ce4322e9ec2c59eb5f Mon Sep 17 00:00:00 2001 From: jamaa Date: Tue, 11 Jun 2013 23:06:09 +0200 Subject: fix upgrade function allow for sequential upgrades --- modules/info/helpers/info_installer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/info/helpers/info_installer.php b/modules/info/helpers/info_installer.php index f45f4a27..2d13eec5 100644 --- a/modules/info/helpers/info_installer.php +++ b/modules/info/helpers/info_installer.php @@ -37,7 +37,7 @@ class info_installer { module::set_var("info", "show_captured", 1); module::set_version("info", $version = 2); } - else if ($version == 2) { + if ($version == 2) { module::set_var("info", "show_size", 1); module::set_version("info", $version = 3); } -- cgit v1.2.3 From 8b14cc5a78ca7cd86ead250916f3437af7bf77af Mon Sep 17 00:00:00 2001 From: jamaa Date: Tue, 11 Jun 2013 23:10:47 +0200 Subject: internationalize image size display as per comment https://github.com/gallery/gallery3/pull/394/files#r4643737 --- modules/info/helpers/info_block.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php index f4fe5a6e..f3c8cf65 100644 --- a/modules/info/helpers/info_block.php +++ b/modules/info/helpers/info_block.php @@ -75,7 +75,7 @@ class info_block_Core { if (($theme->item->width && $theme->item->height) && module::get_var("info", "show_size")) { $info["size"] = array( "label" => t("Size:"), - "value" => $theme->item->width . " x " . $theme->item->height + "value" => t("%width x %height", array("width" => $theme->item->width, "height" => $theme->item->height)) ); } -- cgit v1.2.3 From 2d2503680ec3cd90d07a871a71a8e6d2f21c6c3d Mon Sep 17 00:00:00 2001 From: jamaa Date: Thu, 13 Jun 2013 00:00:13 +0200 Subject: change "size" to "dimensions" and display unit "px" --- modules/info/helpers/info_block.php | 6 +++--- modules/info/helpers/info_installer.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'modules') diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php index f3c8cf65..238b18b5 100644 --- a/modules/info/helpers/info_block.php +++ b/modules/info/helpers/info_block.php @@ -72,10 +72,10 @@ class info_block_Core { ); } } - if (($theme->item->width && $theme->item->height) && module::get_var("info", "show_size")) { + if (($theme->item->width && $theme->item->height) && module::get_var("info", "show_dimensions")) { $info["size"] = array( - "label" => t("Size:"), - "value" => t("%width x %height", array("width" => $theme->item->width, "height" => $theme->item->height)) + "label" => t("Dimensions:"), + "value" => t("%width x %height px", array("width" => $theme->item->width, "height" => $theme->item->height)) ); } diff --git a/modules/info/helpers/info_installer.php b/modules/info/helpers/info_installer.php index 2d13eec5..2d06a0ef 100644 --- a/modules/info/helpers/info_installer.php +++ b/modules/info/helpers/info_installer.php @@ -25,7 +25,7 @@ class info_installer { module::set_var("info", "show_owner", 1); module::set_var("info", "show_name", 1); module::set_var("info", "show_captured", 1); - module::set_var("info", "show_size", 1); + module::set_var("info", "show_dimensions", 1); } static function upgrade($version) { @@ -38,7 +38,7 @@ class info_installer { module::set_version("info", $version = 2); } if ($version == 2) { - module::set_var("info", "show_size", 1); + module::set_var("info", "show_dimensions", 1); module::set_version("info", $version = 3); } } -- cgit v1.2.3