From a4ba3012e7735c5e29051784c66ad3b616ff228a Mon Sep 17 00:00:00 2001 From: Romain LE DISEZ Date: Sun, 28 Nov 2010 23:03:57 +0800 Subject: [PATCH] - Overload a forgotten method - Code cleanup --- 3.0/modules/user_chroot/helpers/MY_item.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/3.0/modules/user_chroot/helpers/MY_item.php b/3.0/modules/user_chroot/helpers/MY_item.php index 423b8ddc..d6368f18 100644 --- a/3.0/modules/user_chroot/helpers/MY_item.php +++ b/3.0/modules/user_chroot/helpers/MY_item.php @@ -24,11 +24,17 @@ class item extends item_Core { if( user_chroot::album() ) { $model->and_open() - ->and_where("items.left_ptr", ">=", user_chroot::album()->left_ptr) - ->and_where("items.right_ptr", "<=", user_chroot::album()->right_ptr) + ->and_where('items.left_ptr', '>=', user_chroot::album()->left_ptr) + ->and_where('items.right_ptr', '<=', user_chroot::album()->right_ptr) ->close(); } return $model; } + + static function root() { + return ( user_chroot::album() ) + ? user_chroot::album() + : parent::root(); + } }