- Timestamp:
- Jul 4, 2011, 8:16:38 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Icy_Picture_Modify/include/functions_icy_picture_modify.inc.php
r11610 r11614 33 33 if (!preg_match(PATTERN_ID, $image_id)) 34 34 { 35 fatal_error('[Hacking attempt] the input parameter "'.$image_id.'" is not valid');35 bad_request('invalid picture identifier'); 36 36 } 37 37 if (!preg_match(PATTERN_ID, $user_id)) 38 38 { 39 fatal_error('[Hacking attempt] the input parameter "'.$user_id.'" is not valid');39 bad_request('invalid category identifier'); 40 40 } 41 41 … … 51 51 return ($count > 0 ? true: false); 52 52 } 53 54 /* 55 * Check if an image does exist 56 * @return bool 57 * @author icy 58 * 59 */ 60 function icy_does_image_exist($image_id) 61 { 62 if (!preg_match(PATTERN_ID, $image_id)) 63 { 64 bad_request('invalid picture identifier'); 65 } 66 $query = ' 67 SELECT COUNT(id) 68 FROM '.IMAGES_TABLE.' 69 WHERE id = '.$image_id.' 70 ;'; 71 list($count) = pwg_db_fetch_row(pwg_query($query)); 72 return ($count > 0 ? true: false); 73 } 53 74 ?>
Note: See TracChangeset
for help on using the changeset viewer.