Changeset 7275
- Timestamp:
- Oct 19, 2010, 10:29:29 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pwg_images_addSimple/main.inc.php
r6697 r7275 33 33 'maxValue' => $conf['available_permission_levels'] 34 34 ), 35 'tags' => array('default' => null), 35 36 ), 36 37 'POST method only.<br>Use the <b>image</b> field for uploading file.<br>Set the form encoding to "form-data"<br><b>category</b> is the numeric identifier of the destination category.' … … 99 100 100 101 101 if (isset($params['tags']) )102 if (isset($params['tags']) and !empty($params['tags'])) 102 103 { 103 104 $tag_ids = array(); … … 111 112 add_tags($tag_ids, array($image_id)); 112 113 } 114 115 $query = ' 116 SELECT id, name, permalink 117 FROM '.CATEGORIES_TABLE.' 118 WHERE id = '.$params['category'].' 119 ;'; 120 $result = pwg_query($query); 121 $category = pwg_db_fetch_assoc($result); 122 123 return array( 124 'image_id' => $image_id, 125 'url' => make_picture_url( 126 array( 127 'image_id' => $image_id, 128 'section' => 'categories', 129 'category' => $category 130 ) 131 ), 132 ); 113 133 } 114 134 ?>
Note: See TracChangeset
for help on using the changeset viewer.