mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
BUGFIX: Deleted old js from BlogHolder
ENHANCEMENT: do not show blog management widget when not logged in (ticket #5561 thanks ericdrex)
This commit is contained in:
parent
c681ba3762
commit
606d526627
@ -183,7 +183,6 @@ class BlogHolder_Controller extends BlogTree_Controller {
|
||||
*/
|
||||
function post(){
|
||||
if(!Permission::check('BLOGMANAGEMENT')) return Security::permissionFailure();
|
||||
|
||||
$page = $this->customise(array(
|
||||
'Content' => false,
|
||||
'Form' => $this->BlogEntryForm()
|
||||
@ -198,11 +197,6 @@ class BlogHolder_Controller extends BlogTree_Controller {
|
||||
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');
|
||||
Requirements::javascript('cms/javascript/PageCommentInterface.js');
|
||||
Requirements::javascript('blog/javascript/bbcodehelp.js');
|
||||
|
||||
$id = 0;
|
||||
if(Director::urlParam('ID')) {
|
||||
@ -221,7 +215,6 @@ class BlogHolder_Controller extends BlogTree_Controller {
|
||||
new LiteralField("BBCodeTags","<div id=\"BBTagsHolder\">".$codeparser->useable_tagsHTML()."</div>")
|
||||
);
|
||||
}
|
||||
|
||||
if(class_exists('TagField')) {
|
||||
$tagfield = new TagField('Tags', null, null, 'BlogEntry');
|
||||
$tagfield->setSeparator(', ');
|
||||
|
@ -48,6 +48,10 @@ class BlogManagementWidget extends Widget implements PermissionProvider {
|
||||
return array("BLOGMANAGEMENT" => "Blog management");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class BlogManagementWidget_Controller extends Widget_Controller {
|
||||
|
||||
function WidgetHolder() {
|
||||
if(Permission::check("BLOGMANAGEMENT")) {
|
||||
return $this->renderWith("WidgetHolder");
|
||||
@ -58,6 +62,5 @@ class BlogManagementWidget extends Widget implements PermissionProvider {
|
||||
$container = BlogTree::current();
|
||||
if ($container) return $container->Link('post');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user