Changeset 2592 for trunk/include
- Timestamp:
- Sep 26, 2008, 1:01:35 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/ws_functions.inc.php
r2585 r2592 903 903 // fwrite($fh_log, 'input: '.$params['thumbnail_sum']."\n"); 904 904 905 // does the image already exists ? 906 $query = ' 907 SELECT 908 COUNT(*) AS counter 909 FROM '.IMAGES_TABLE.' 910 WHERE md5sum = \''.$params['file_sum'].'\' 911 ;'; 912 list($counter) = mysql_fetch_row(pwg_query($query)); 913 if ($counter != 0) { 914 return new PwgError(500, 'file already exists'); 915 } 916 905 917 // current date 906 918 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();')); … … 987 999 'width' => $width, 988 1000 'height' => $height, 1001 'md5sum' => $params['file_sum'], 989 1002 ); 990 1003
Note: See TracChangeset
for help on using the changeset viewer.