mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
BUGFIX: Improve r81254 to fix blog/rss and subclasses of BlogHolder_Controller
This commit is contained in:
parent
1e809afc65
commit
d0ee014aa5
@ -155,6 +155,8 @@ class BlogHolder_Controller extends BlogTree_Controller {
|
||||
* Post a new blog entry
|
||||
*/
|
||||
function post(){
|
||||
if(!Permission::check('BLOGMANAGEMENT')) return Security::permissionFailure();
|
||||
|
||||
$page = $this->customise(array(
|
||||
'Content' => false,
|
||||
'Form' => $this->BlogEntryForm()
|
||||
@ -167,6 +169,8 @@ class BlogHolder_Controller extends BlogTree_Controller {
|
||||
* A simple form for creating blog entries
|
||||
*/
|
||||
function BlogEntryForm() {
|
||||
if(!Permission::check('BLOGMANAGEMENT')) return Security::permissionFailure();
|
||||
|
||||
Requirements::javascript('jsparty/behaviour.js');
|
||||
Requirements::javascript('jsparty/prototype.js');
|
||||
Requirements::javascript('jsparty/scriptaculous/effects.js');
|
||||
@ -231,6 +235,8 @@ class BlogHolder_Controller extends BlogTree_Controller {
|
||||
}
|
||||
|
||||
function postblog($data, $form) {
|
||||
if(!Permission::check('BLOGMANAGEMENT')) return Security::permissionFailure();
|
||||
|
||||
Cookie::set("BlogHolder_Name", $data['Author']);
|
||||
$blogentry = false;
|
||||
|
||||
|
@ -231,6 +231,10 @@ class BlogURL {
|
||||
}
|
||||
|
||||
class BlogTree_Controller extends Page_Controller {
|
||||
static $allowed_actions = array(
|
||||
'rss' => true,
|
||||
);
|
||||
|
||||
function init() {
|
||||
parent::init();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user