diff options
author | z0rglub <z0rglub@piwigo.org> | 2004-10-24 18:57:19 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2004-10-24 18:57:19 +0000 |
commit | 9b3138c6afdfbdb52b2d0efa0fd3b0696b8d363a (patch) | |
tree | 23b65281621c14fbf00186851a380859b85173a2 /admin/include | |
parent | dc20a55d4a801058145d4de2a47bfcb2904da250 (diff) |
- bug correction : only local categories can be metadata synchronized
git-svn-id: http://piwigo.org/svn/trunk@582 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/include/functions_metadata.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/admin/include/functions_metadata.php b/admin/include/functions_metadata.php index 9dadd29d3..60a826774 100644 --- a/admin/include/functions_metadata.php +++ b/admin/include/functions_metadata.php @@ -66,7 +66,12 @@ function get_sync_iptc_data($file) function update_metadata($files) { global $conf; - + + if (!defined('CURRENT_DATE')) + { + define('CURRENT_DATE', "'".date('Y-m-d')."'"); + } + $inserts = array(); foreach ($files as $id => $file) @@ -251,6 +256,7 @@ function get_filelist($category_id = '', $recursive = false, $only_new = false) $query = ' SELECT id, dir FROM '.CATEGORIES_TABLE.' + WHERE dir IS NOT NULL ;'; $result = mysql_query($query); $cat_dirs = array(); @@ -265,19 +271,21 @@ SELECT id, dir $query = ' SELECT id, uppercats - FROM '.CATEGORIES_TABLE; + FROM '.CATEGORIES_TABLE.' + WHERE site_id = 1 + AND dir IS NOT NULL'; if (is_numeric($category_id)) { if ($recursive) { $query.= ' - WHERE uppercats REGEXP \'(^|,)'.$category_id.'(,|$)\' + AND uppercats REGEXP \'(^|,)'.$category_id.'(,|$)\' '; } else { $query.= ' - WHERE id = '.$category_id.' + AND id = '.$category_id.' '; } } |