Changeset 31031
- Timestamp:
- Mar 12, 2015, 8:51:21 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/ws_functions/pwg.images.php
r30375 r31031 83 83 WHERE id IN ('.implode(',', $cat_ids).') 84 84 ;'; 85 $db_cat_ids = array_from_query($query, 'id');85 $db_cat_ids = query2array($query, null, 'id'); 86 86 87 87 $unknown_cat_ids = array_diff($cat_ids, $db_cat_ids); … … 101 101 WHERE image_id = '.$image_id.' 102 102 ;'; 103 $existing_cat_ids = array_from_query($query, 'category_id');103 $existing_cat_ids = query2array($query, null, 'category_id'); 104 104 105 105 if ($replace_mode) … … 134 134 GROUP BY category_id 135 135 ;'; 136 $current_rank_of = simple_hash_from_query(136 $current_rank_of = query2array( 137 137 $query, 138 138 'category_id', … … 482 482 WHERE '. $where_comments .' 483 483 ;'; 484 list($nb_comments) = array_from_query($query, 'nb_comments');484 list($nb_comments) = query2array($query, null, 'nb_comments'); 485 485 $nb_comments = (int)$nb_comments; 486 486 … … 1270 1270 // return new PwgError(405, 'The image (file) is missing'); 1271 1271 // } 1272 1272 1273 1273 // file_put_contents('/tmp/plupload.log', "[".date('c')."] ".__FUNCTION__."\n\n", FILE_APPEND); 1274 1274 // file_put_contents('/tmp/plupload.log', '$_FILES = '.var_export($_FILES, true)."\n", FILE_APPEND); … … 1343 1343 if (!$chunks || $chunk == $chunks - 1) 1344 1344 { 1345 // Strip the temp .part suffix off 1345 // Strip the temp .part suffix off 1346 1346 rename("{$filePath}.part", $filePath); 1347 1347 1348 1348 include_once(PHPWG_ROOT_PATH.'admin/include/functions_upload.inc.php'); 1349 1349 1350 1350 $image_id = add_uploaded_file( 1351 1351 $filePath, … … 1355 1355 null // image_id = not provided, this is a new photo 1356 1356 ); 1357 1357 1358 1358 $query = ' 1359 1359 SELECT … … 1376 1376 1377 1377 $category_name = get_cat_display_name_from_id($params['category'][0], null); 1378 1378 1379 1379 return array( 1380 1380 'image_id' => $image_id, … … 1421 1421 WHERE md5sum IN (\''. implode("','", $md5sums) .'\') 1422 1422 ;'; 1423 $id_of_md5 = simple_hash_from_query($query, 'md5sum', 'id');1423 $id_of_md5 = query2array($query, 'md5sum', 'id'); 1424 1424 1425 1425 foreach ($md5sums as $md5sum) … … 1432 1432 } 1433 1433 } 1434 else 1434 elseif ('filename' == $conf['uniqueness_mode']) 1435 1435 { 1436 1436 // search among photos the list of photos already added, based on … … 1448 1448 WHERE file IN (\''. implode("','", $filenames) .'\') 1449 1449 ;'; 1450 $id_of_filename = simple_hash_from_query($query, 'file', 'id');1450 $id_of_filename = query2array($query, 'file', 'id'); 1451 1451 1452 1452 foreach ($filenames as $filename) … … 1503 1503 $compare_type = 'high'; 1504 1504 } 1505 else 1505 elseif (isset($params['file_sum'])) 1506 1506 { 1507 1507 $compare_type = 'file';
Note: See TracChangeset
for help on using the changeset viewer.