diff options
Diffstat (limited to 'modules/gallery')
-rw-r--r-- | modules/gallery/css/gallery.css | 2 | ||||
-rw-r--r-- | modules/gallery/libraries/InPlaceEdit.php | 8 | ||||
-rw-r--r-- | modules/gallery/models/item.php | 4 | ||||
-rw-r--r-- | modules/gallery/tests/Item_Model_Test.php | 1 | ||||
-rw-r--r-- | modules/gallery/views/in_place_edit.html.php | 4 |
5 files changed, 10 insertions, 9 deletions
diff --git a/modules/gallery/css/gallery.css b/modules/gallery/css/gallery.css index 18d9a522..3262dee2 100644 --- a/modules/gallery/css/gallery.css +++ b/modules/gallery/css/gallery.css @@ -50,7 +50,7 @@ /* In-place edit ~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#g-inplace-edit-form ul { +#g-in-place-edit-form ul { margin: 0; } diff --git a/modules/gallery/libraries/InPlaceEdit.php b/modules/gallery/libraries/InPlaceEdit.php index 057874e3..67ab3805 100644 --- a/modules/gallery/libraries/InPlaceEdit.php +++ b/modules/gallery/libraries/InPlaceEdit.php @@ -35,22 +35,22 @@ class InPlaceEdit_Core { return $instance; } - public function add_action($action) { + public function action($action) { $this->action = $action; return $this; } - public function add_rules($rules) { + public function rules($rules) { $this->rules += $rules; return $this; } - public function add_messages($messages) { + public function messages($messages) { $this->messages += $messages; return $this; } - public function add_callback($callback) { + public function callback($callback) { $this->callback = $callback; return $this; } diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index 9735ed62..d27e331b 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -444,11 +444,11 @@ class Item_Model extends ORM_MPTT { $position = $db->from("items") ->where("parent_id", $this->id) - ->where("$sort_column < ", $child->$sort_column) + ->where("$sort_column $comp ", $child->$sort_column) ->where($where) ->count_records(); - // We stopped short of our target value in the sort (notice that we're using a < comparator + // We stopped short of our target value in the sort (notice that we're using a < comparator // above) because it's possible that we have duplicate values in the sort column. An // equality check would just arbitrarily pick one of those multiple possible equivalent // columns, which would mean that if you choose a sort order that has duplicates, it'd pick diff --git a/modules/gallery/tests/Item_Model_Test.php b/modules/gallery/tests/Item_Model_Test.php index fefc9383..e7dce893 100644 --- a/modules/gallery/tests/Item_Model_Test.php +++ b/modules/gallery/tests/Item_Model_Test.php @@ -232,6 +232,7 @@ class Item_Model_Test extends Unit_Test_Case { $this->assert_equal("resize", file_get_contents($photo->resize_path())); $this->assert_equal("file", file_get_contents($photo->file_path())); } + public function move_album_fails_invalid_target_test() { // Create an album with a photo in it $root = ORM::factory("item", 1); diff --git a/modules/gallery/views/in_place_edit.html.php b/modules/gallery/views/in_place_edit.html.php index 64671d57..03cbdc69 100644 --- a/modules/gallery/views/in_place_edit.html.php +++ b/modules/gallery/views/in_place_edit.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<?= form::open($action, array("method" => "post", "id" => "g-inplace-edit-form", "class" => "g-short-form"), $hidden) ?> +<?= form::open($action, array("method" => "post", "id" => "g-in-place-edit-form", "class" => "g-short-form"), $hidden) ?> <ul> <li <? if (!empty($errors["input"])): ?> class="g-error"<? endif ?>> <?= form::input("input", $form["input"], " class='textbox'") ?> @@ -11,6 +11,6 @@ </ul> <?= form::close() ?> <? if (!empty($errors["input"])): ?> -<div id="g-inplace-edit-message" class="g-error"><?= $errors["input"] ?></div> +<div id="g-in-place-edit-message" class="g-error"><?= $errors["input"] ?></div> <? endif ?> |