diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-05-14 04:00:00 +0000 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-14 04:00:00 +0000 |
| commit | d7fe3104e3566297b6a8ce2c5bfba0c6f7c41d72 (patch) | |
| tree | 251b6beea4b28d6402e8e36a4470096d734c8c81 /core/helpers/photo.php | |
| parent | 627e83adc13005b2431d49d98c0a2dc05a8e65a6 (diff) | |
Use the active user as the new item's owner, if no owner id is specified
Diffstat (limited to 'core/helpers/photo.php')
| -rw-r--r-- | core/helpers/photo.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/helpers/photo.php b/core/helpers/photo.php index 1d7bef11..ff4936b4 100644 --- a/core/helpers/photo.php +++ b/core/helpers/photo.php @@ -57,7 +57,7 @@ class photo_Core { $photo->title = $title; $photo->description = $description; $photo->name = $name; - $photo->owner_id = $owner_id; + $photo->owner_id = $owner_id ? $owner_id : user::active(); $photo->width = $image_info[0]; $photo->height = $image_info[1]; $photo->mime_type = empty($image_info['mime']) ? "application/unknown" : $image_info['mime']; |
