Changeset 12763 for trunk/admin/include/functions.php
- Timestamp:
- Dec 18, 2011, 12:05:19 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions.php
r12642 r12763 1220 1220 $parent_id = !empty($parent_id) ? $parent_id : 'NULL'; 1221 1221 1222 $query = '1223 SELECT MAX(rank)1224 FROM '.CATEGORIES_TABLE.'1225 WHERE id_uppercat '.(is_numeric($parent_id) ? '= '.$parent_id : 'IS NULL').'1226 ;';1227 list($current_rank) = pwg_db_fetch_row(pwg_query($query));1228 1229 1222 $insert = array( 1230 1223 'name' => $category_name, 1231 'rank' => ++$current_rank,1224 'rank' => 0, 1232 1225 'commentable' => boolean_to_string($conf['newcat_default_commentable']), 1233 1226 ); … … 1298 1291 ;'; 1299 1292 pwg_query($query); 1293 1294 update_global_rank(); 1300 1295 1301 1296 if ('private' == $insert['status'])
Note: See TracChangeset
for help on using the changeset viewer.