mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Fixed page comment system for new URL handler
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@60841 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
8784d965d5
commit
6c404e4df7
@ -6,7 +6,14 @@
|
||||
* @package cms
|
||||
* @subpackage comments
|
||||
*/
|
||||
class PageCommentInterface extends ViewableData {
|
||||
class PageCommentInterface extends RequestHandlingData {
|
||||
static $url_handlers = array(
|
||||
'$Item!' => '$Item',
|
||||
);
|
||||
static $allowed_actions = array(
|
||||
'PostCommentForm',
|
||||
);
|
||||
|
||||
protected $controller, $methodName, $page;
|
||||
|
||||
/**
|
||||
@ -35,6 +42,10 @@ class PageCommentInterface extends ViewableData {
|
||||
$this->page = $page;
|
||||
}
|
||||
|
||||
function Link() {
|
||||
return Controller::join_links($this->controller->Link(), $this->methodName);
|
||||
}
|
||||
|
||||
/**
|
||||
* See @link PageCommentInterface::$comments_require_login
|
||||
* @param boolean state The new state of this static field
|
||||
@ -114,7 +125,7 @@ class PageCommentInterface extends ViewableData {
|
||||
|
||||
$fields->push(new TextareaField("Comment", _t('PageCommentInterface.YOURCOMMENT', "Comments")));
|
||||
|
||||
$form = new PageCommentInterface_Form($this->controller, $this->methodName . ".PostCommentForm",$fields, new FieldSet(
|
||||
$form = new PageCommentInterface_Form($this, "PostCommentForm", $fields, new FieldSet(
|
||||
new FormAction("postcomment", _t('PageCommentInterface.POST', 'Post'))
|
||||
));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user