mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-30 19:50:36 -04:00
ORM_MPTT::parents() should not include the node itself.
This commit is contained in:
@@ -87,11 +87,11 @@ class ORM_MPTT_Core extends ORM {
|
||||
* @return array ORM
|
||||
*/
|
||||
function parents() {
|
||||
$id = (int)$this->id;
|
||||
if (!isset($this->parents)) {
|
||||
$this->parents = $this
|
||||
->where("`left` <= {$this->left}")
|
||||
->where("`right` >= {$this->right}")
|
||||
->where("id <> {$this->id}")
|
||||
->orderby("left", "ASC")
|
||||
->find_all();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user