Changeset 13083
- Timestamp:
- Feb 10, 2012, 4:31:42 PM (13 years ago)
- Location:
- branches/2.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3/include/ws_functions.inc.php
r12809 r13083 1661 1661 { 1662 1662 ws_logfile('[pwg.images.add] resize activated'); 1663 1664 // updating a photo is possible only combined with the resize option 1665 $params['image_id'] = (int)$params['image_id']; 1666 if ($params['image_id'] > 0) 1667 { 1668 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 1669 1670 $query=' 1671 SELECT * 1672 FROM '.IMAGES_TABLE.' 1673 WHERE id = '.$params['image_id'].' 1674 ;'; 1675 1676 $image_row = pwg_db_fetch_assoc(pwg_query($query)); 1677 if ($image_row == null) 1678 { 1679 return new PwgError(404, "image_id not found"); 1680 } 1681 } 1663 1682 1664 1683 // temporary file path … … 1673 1692 $image_id = add_uploaded_file( 1674 1693 $file_path, 1675 $params['original_filename'] 1694 $params['original_filename'], 1695 null, 1696 null, 1697 $params['image_id'] > 0 ? $params['image_id'] : null 1676 1698 ); 1677 1699 -
branches/2.3/ws.php
r12729 r13083 243 243 'resize' => array('default' => false), 244 244 'check_uniqueness' => array('default' => true), 245 'image_id' => array('default' => null), 245 246 ), 246 247 'POST method only.
Note: See TracChangeset
for help on using the changeset viewer.