diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2008-11-08 07:48:36 +0000 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2008-11-08 07:48:36 +0000 |
| commit | 418c0aab69a72da512646541be2d88a866cb9fdb (patch) | |
| tree | fea9ea900fbf33d3e94082b901922ad74b832f50 /core/helpers/photo.php | |
| parent | ea7cc4f46edc730ff873c579a6c63490d24496a6 (diff) | |
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.
Diffstat (limited to 'core/helpers/photo.php')
| -rw-r--r-- | core/helpers/photo.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/helpers/photo.php b/core/helpers/photo.php index 231e3a9c..44350f2f 100644 --- a/core/helpers/photo.php +++ b/core/helpers/photo.php @@ -33,13 +33,13 @@ class Photo_Core { * @param string $description (optional) the longer description of this photo * @return Item_Model */ - static function create($parent_id, $filename, $name, $title, $description=null, $user_id = null) { + static function create($parent_id, $filename, $name, $title, $description=null, $owner_id = null) { $photo = ORM::factory("item"); $photo->type = "photo"; $photo->title = $title; $photo->description = $description; $photo->name = $name; - $photo->user_id = $user_id; + $photo->owner_id = $owner_id; $pi = pathinfo(basename($filename)); if (empty($pi["extension"])) { |
