From e754bc18ea5dfd93beae5bad1c743610ceeef6e3 Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Mon, 15 Feb 2010 13:44:37 -0800 Subject: Input sanitization --- modules/organize/controllers/organize.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/organize') diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index 9d9da65e..c92d711f 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -127,7 +127,7 @@ class Organize_Controller extends Controller { "sort_order" => $album->sort_order)); } - function sort_order($album_id, $col, $dir) { + public function sort_order($album_id, $col, $dir) { access::verify_csrf(); $album = ORM::factory("item", $album_id); @@ -149,10 +149,10 @@ class Organize_Controller extends Controller { "sort_order" => $album->sort_order)); } - private static function _get_micro_thumb_grid($album, $offset) { + private static function _get_micro_thumb_grid(Item_Model $album, $offset) { $v = new View("organize_thumb_grid.html"); $v->album = $album; - $v->offset = $offset; + $v->offset = (int) $offset; return $v; } -- cgit v1.2.3 From f116af5287f7809e907ee56dbfa582f474738ae6 Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Thu, 18 Feb 2010 17:54:29 -0800 Subject: Fix for tickets #1024 and #1025: Fix formatting of album tree list in the organize dialog, and (magically) drag and drop move to another album works as well again. Tested in FF3.5, Chrome5 on Ubuntu Linux. --- modules/organize/views/organize_tree.html.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'modules/organize') diff --git a/modules/organize/views/organize_tree.html.php b/modules/organize/views/organize_tree.html.php index 33d7b4c9..044b6858 100644 --- a/modules/organize/views/organize_tree.html.php +++ b/modules/organize/views/organize_tree.html.php @@ -3,24 +3,27 @@ ref="id ?>"> - " + " ref="id ?>"> title) ?> -
    - children(null, null, array(array("type", "=", "album"))) as $child): ?> + viewable()->children(null, null, array(array("type", "=", "album"))); ?> + +
      + contains($selected)): ?> $selected, "album" => $child)); ?>
    • " ref="id ?>"> - " ref="id ?>"> + " ref="id ?>"> title) ?>
    + -- cgit v1.2.3 From adb1db6b7d1d10772b893047d8297a89ca9c615e Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Mon, 22 Feb 2010 22:00:23 -0800 Subject: Fix typo in selector expression. The handling of view-only albums is still not great, but at least the code is closer to doing what it's supposed to. --- modules/organize/js/organize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/organize') diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js index 5b90f402..5a483caf 100644 --- a/modules/organize/js/organize.js +++ b/modules/organize/js/organize.js @@ -270,7 +270,7 @@ if ($(event.currentTarget).hasClass("ui-state-focus")) { return; } - var parent = $(event.currentTarget).parents(".g-organize-branch"); + var parent = $(event.currentTarget).parents(".g-organize-album"); if ($(parent).hasClass("g-view-only")) { return; } -- cgit v1.2.3