Skip to content

Commit

Permalink
Fix blog posts fail with permalink & feed_id requiring values
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchellMcKenna committed Jan 19, 2017
1 parent f852478 commit a7eb3b6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions application/controllers/admin/write.php
Expand Up @@ -131,8 +131,15 @@ function index()

if ($this->input->post('draft') == 'true') {
$new_post->item_status = 'draft';
} else {
$new_post->item_status = 'publish';
}

// Set the permalink to blank for new items
$new_post->item_permalink = '';
// Set the item feed to 0 for new items
$new_post->item_feed_id = 0;

$this->item_model->add_blog_post($new_post);

header('Location: '.$this->config->item('base_url').'admin/items');
Expand Down

0 comments on commit a7eb3b6

Please sign in to comment.