From 418c0aab69a72da512646541be2d88a866cb9fdb Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 8 Nov 2008 07:48:36 +0000 Subject: Create permanent owner_id column in the item table, and use a soft relationship to bind the two. To do this, I overrode __get in Item_Model so that $item->owner returns the appropriate User_Model. --- core/helpers/album.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/helpers/album.php') diff --git a/core/helpers/album.php b/core/helpers/album.php index 3c97f7e8..2801c570 100644 --- a/core/helpers/album.php +++ b/core/helpers/album.php @@ -32,13 +32,13 @@ class Album_Core { * @param string $description (optional) the longer description of this album * @return Item_Model */ - static function create($parent_id, $name, $title, $description=null, $user_id = null) { + static function create($parent_id, $name, $title, $description=null, $owner_id = null) { $album = ORM::factory("item"); $album->type = "album"; $album->title = $title; $album->description = $description; $album->name = $name; - $album->user_id = $user_id; + $album->owner_id = $owner_id; while (ORM::Factory("item") ->where("parent_id", $parent_id) -- cgit v1.2.3