summaryrefslogtreecommitdiff
path: root/modules/gallery/models
diff options
context:
space:
mode:
authorRomain LE DISEZ <romain.git@ledisez.net>2009-07-25 19:06:54 +0200
committerRomain LE DISEZ <romain.git@ledisez.net>2009-07-25 19:06:54 +0200
commit23bb6eb7e35637c8a2124216dbb6d3246ad3d702 (patch)
treeff81a60c9deadcc1edda801d4680f567ee3a9b18 /modules/gallery/models
parent0aa3ec3ae90a101b2bfc1b395a1749551da22287 (diff)
Rename columns that use reserved SQL words : items.left and items.right
Diffstat (limited to 'modules/gallery/models')
-rw-r--r--modules/gallery/models/item.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php
index 58ac8f18..d9dd88f5 100644
--- a/modules/gallery/models/item.php
+++ b/modules/gallery/models/item.php
@@ -150,7 +150,7 @@ class Item_Model extends ORM_MPTT {
Database::instance()
->update("items",
array("relative_path_cache" => null),
- array("left >" => $this->left, "right <" => $this->right));
+ array("left_ptr >" => $this->left_ptr, "right_ptr <" => $this->right_ptr));
} else {
@rename($original_resize_path, $this->resize_path());
@rename($original_thumb_path, $this->thumb_path());
@@ -186,7 +186,7 @@ class Item_Model extends ORM_MPTT {
Database::instance()
->update("items",
array("relative_path_cache" => null),
- array("left >" => $this->left, "right <" => $this->right));
+ array("left_ptr >" => $this->left_ptr, "right_ptr <" => $this->right_ptr));
}
return $this;
@@ -302,10 +302,10 @@ class Item_Model extends ORM_MPTT {
foreach (Database::instance()
->select("name")
->from("items")
- ->where("left <=", $this->left)
- ->where("right >=", $this->right)
+ ->where("left_ptr <=", $this->left_ptr)
+ ->where("right_ptr >=", $this->right_ptr)
->where("id <>", 1)
- ->orderby("left", "ASC")
+ ->orderby("left_ptr", "ASC")
->get() as $row) {
$paths[] = $row->name;
}