From d7fe3104e3566297b6a8ce2c5bfba0c6f7c41d72 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 14 May 2009 04:00:00 +0000 Subject: Use the active user as the new item's owner, if no owner id is specified --- core/helpers/photo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/helpers/photo.php') 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']; -- cgit v1.2.3