Changeset 851:0993f64c4809 for admin/post.php
- Timestamp:
- 07/31/12 13:52:11 (13 years ago)
- Branch:
- sexy
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/post.php
r848 r851 16 16 17 17 $post_id = ''; 18 $cat_id = '';19 18 $post_dt = ''; 20 19 $post_format = $core->auth->getOption('post_format'); … … 48 47 } 49 48 50 # Getting categories51 $categories_combo = array(' ' => '');52 try {53 $categories = $core->blog->getCategories(array('post_type'=>'post'));54 while ($categories->fetch()) {55 $categories_combo[] = new formSelectOption(56 str_repeat(' ',$categories->level-1).($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title),57 $categories->cat_id58 );59 }60 } catch (Exception $e) { }61 62 49 # Status combo 63 50 foreach ($core->blog->getAllPostStatus() as $k => $v) { … … 101 88 { 102 89 $post_id = $post->post_id; 103 $cat_id = $post->cat_id;104 90 $post_dt = date('Y-m-d H:i',strtotime($post->post_dt)); 105 91 $post_format = $post->post_format; … … 153 139 $post_title = $_POST['post_title']; 154 140 155 $cat_id = (integer) $_POST['cat_id'];156 157 141 if (isset($_POST['post_status'])) { 158 142 $post_status = (integer) $_POST['post_status']; … … 188 172 189 173 $cur->post_title = $post_title; 190 $cur->cat_id = ($cat_id ? $cat_id : null);191 174 $cur->post_dt = $post_dt ? date('Y-m-d H:i:00',strtotime($post_dt)) : ''; 192 175 $cur->post_format = $post_format; … … 389 372 390 373 echo 391 '<p><label for="cat_id">'.__('Category:').392 form::combo('cat_id',$categories_combo,$cat_id,'maximal').393 '</label></p>'.394 395 374 '<p><label for="post_status">'.__('Entry status:'). 396 375 form::combo('post_status',$status_combo,$post_status,'','',!$can_publish).
Note: See TracChangeset
for help on using the changeset viewer.