public function BlogEntryForm()
 {
     $postId = 0;
     if ($this->request->latestParam('ID')) {
         $postId = (int) $this->request->latestParam('ID');
     }
     /*
      * I add the ($postID == 0) control for manage the edit form submit 
      * in the front-end blog template
      */
     if ($this->canEditFrontEndBlogEntry($postId) || $postId == 0) {
         return parent::BlogEntryForm();
     }
     $page = DataObject::get_by_id('BlogEntry', $postId);
     if ($page) {
         $this->redirect($page->Link());
     }
 }
Пример #2
0
 public function init()
 {
     parent::init();
 }