aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-01-04 10:55:08 +0000
committerplegall <plg@piwigo.org>2011-01-04 10:55:08 +0000
commitb4d2a1362fa6dc15d8a1e849d5e36fe341953baf (patch)
tree3b3a6a2246e00ec50dfc5d57ced6bffaad8e9012 /admin
parent621ed0b391f81bb7d636d1e447154e1f5b43fb24 (diff)
feature 2095 added: new column images.added_by (foreign key on users.id)
git-svn-id: http://piwigo.org/svn/trunk@8464 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions_upload.inc.php3
-rw-r--r--admin/site_update.php1
2 files changed, 3 insertions, 1 deletions
diff --git a/admin/include/functions_upload.inc.php b/admin/include/functions_upload.inc.php
index 84c00a90e..fe7b888bb 100644
--- a/admin/include/functions_upload.inc.php
+++ b/admin/include/functions_upload.inc.php
@@ -184,7 +184,7 @@ function add_uploaded_file($source_filepath, $original_filename=null, $categorie
// TODO
// * check md5sum (already exists?)
- global $conf;
+ global $conf, $user;
// current date
list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
@@ -306,6 +306,7 @@ function add_uploaded_file($source_filepath, $original_filename=null, $categorie
'width' => $file_infos['width'],
'height' => $file_infos['height'],
'md5sum' => $md5sum,
+ 'added_by' => $user['id'],
);
if (isset($high_infos))
diff --git a/admin/site_update.php b/admin/site_update.php
index 6c2e74c60..d0577070c 100644
--- a/admin/site_update.php
+++ b/admin/site_update.php
@@ -449,6 +449,7 @@ SELECT file,storage_category_id
? $fs[$path]['tn_ext']
: null,
'storage_category_id' => $db_fulldirs[$dirname],
+ 'added_by' => $user['id'],
);
if ( $_POST['privacy_level']!=0 )