Changeset 15850
- Timestamp:
- Jun 20, 2012, 5:41:31 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/ws_functions.inc.php
r15586 r15850 2303 2303 return new PwgError(500, $creation_output['error']); 2304 2304 } 2305 2306 $updates = array(); 2307 if ( !empty($params['status']) and in_array($params['status'], array('private','public')) ) 2308 { 2309 $updates['status'] = $params['status']; 2310 } 2311 if ( !empty($params['visible']) and in_array($params['visible'], array('true','false')) ) 2312 { 2313 $updates['visible'] = $params['visible']; 2314 } 2315 if ( !empty($params['commentable']) and in_array($params['commentable'], array('true','false')) ) 2316 { 2317 $updates['commentable'] = $params['commentable']; 2318 } 2319 if ( !empty($params['comment']) ) 2320 { 2321 $updates['comment'] = strip_tags($params['comment']); 2322 } 2323 2324 if (!empty($updates)) 2325 { 2326 single_update( 2327 CATEGORIES_TABLE, 2328 $updates, 2329 array('id'=>$creation_output['id']) 2330 ); 2331 } 2305 2332 2306 2333 invalidate_user_cache(); -
trunk/ws.php
r13544 r15850 309 309 'name' => array(), 310 310 'parent' => array('default' => null), 311 'comment' => array('default' => null), 312 'visible' => array('default' => boolean_to_string($conf['newcat_default_visible'])), 313 'status' => array('default' => $conf['newcat_default_status']), 314 'commentable' => array('default' => 'true'), 311 315 ), 312 316 'administration method only'
Note: See TracChangeset
for help on using the changeset viewer.