Changeset 20407 for extensions/url_uploader/include/ws_functions.inc.php
- Timestamp:
- Jan 26, 2013, 2:50:41 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/url_uploader/include/ws_functions.inc.php
r19804 r20407 18 18 'maxValue' => $conf['available_permission_levels'] 19 19 ), 20 'url_in_comment' => array('default' => true), 20 21 ), 21 22 'Add image from remote URL.' … … 84 85 ); 85 86 87 $updates = array(); 86 88 if (!empty($params['name'])) 87 89 { 88 single_update( 89 IMAGES_TABLE, 90 array('name'=>$params['name']), 91 array('id' => $image_id) 92 ); 90 $updates['name'] = $params['name']; 93 91 } 92 if ($params['url_in_comment']=='true') 93 { 94 $url = parse_url($params['file_url']); 95 $url = $url['scheme'].'://'.$url['host']; 96 $updates['comment'] = '<a href="'. $url . '">'. $url .'</a>'; 97 } 98 99 single_update( 100 IMAGES_TABLE, 101 $updates, 102 array('id' => $image_id) 103 ); 94 104 95 105
Note: See TracChangeset
for help on using the changeset viewer.