Changeset 1500:555ae7c1320a
- Timestamp:
- 08/21/13 00:04:50 (10 years ago)
- Branch:
- 2.5
- Location:
- admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/_index.js
r1418 r1500 33 33 post_status: status, 34 34 post_format: $('#post_format',f).val(), 35 post_lang: $('#post_lang',f).val() 35 post_lang: $('#post_lang',f).val(), 36 new_cat_title: $('#new_cat_title',f).val(), 37 new_cat_parent: $('#new_cat_parent',f).val() 36 38 } 37 39 … … 56 58 contentTb.syncContents('textarea'); 57 59 } 60 $('#cat_id',f).val('0'); 61 $('#new_cat_title',f).val(''); 62 $('#new_cat_parent',f).val('0'); 58 63 } 59 64 -
admin/services.php
r1179 r1500 141 141 public static function quickPost($core,$get,$post) 142 142 { 143 # Create category 144 if (!empty($post['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) { 145 146 $cur_cat = $core->con->openCursor($core->prefix.'category'); 147 $cur_cat->cat_title = $post['new_cat_title']; 148 $cur_cat->cat_url = ''; 149 150 $parent_cat = !empty($post['new_cat_parent']) ? $post['new_cat_parent'] : ''; 151 152 # --BEHAVIOR-- adminBeforeCategoryCreate 153 $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 154 155 $post['cat_id'] = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 156 157 # --BEHAVIOR-- adminAfterCategoryCreate 158 $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $post['cat_id']); 159 } 160 143 161 $cur = $core->con->openCursor($core->prefix.'post'); 144 162
Note: See TracChangeset
for help on using the changeset viewer.