Import photo ownership.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
class Asset
|
||||
{
|
||||
protected $id_asset;
|
||||
protected $id_user_uploaded;
|
||||
protected $subdir;
|
||||
protected $filename;
|
||||
protected $title;
|
||||
@@ -186,13 +187,14 @@ class Asset
|
||||
$db = Registry::get('db');
|
||||
$res = $db->query('
|
||||
INSERT INTO assets
|
||||
(subdir, filename, title, slug, mimetype, image_width, image_height, date_captured, priority)
|
||||
(id_user_uploaded, subdir, filename, title, slug, mimetype, image_width, image_height, date_captured, priority)
|
||||
VALUES
|
||||
({string:subdir}, {string:filename}, {string:title}, {string:slug}, {string:mimetype},
|
||||
({int:id_user_uploaded}, {string:subdir}, {string:filename}, {string:title}, {string:slug}, {string:mimetype},
|
||||
{int:image_width}, {int:image_height},
|
||||
IF({int:date_captured} > 0, FROM_UNIXTIME({int:date_captured}), NULL),
|
||||
{int:priority})',
|
||||
[
|
||||
'id_user_uploaded' => isset($id_user) ? $id_user : Registry::get('user')->getUserId(),
|
||||
'subdir' => $preferred_subdir,
|
||||
'filename' => $new_filename,
|
||||
'title' => $title,
|
||||
|
||||
Reference in New Issue
Block a user