mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
Merge pull request #30 from roed/master
FIX: Fix submission when require_login = true
This commit is contained in:
commit
bcd16e1c10
@ -274,6 +274,7 @@ class CommentingController extends Controller {
|
|||||||
$fields->removeByName('Email');
|
$fields->removeByName('Email');
|
||||||
$fields->insertBefore(new ReadonlyField("NameView", _t('CommentInterface.YOURNAME', 'Your name'), $member->getName()), 'URL');
|
$fields->insertBefore(new ReadonlyField("NameView", _t('CommentInterface.YOURNAME', 'Your name'), $member->getName()), 'URL');
|
||||||
$fields->push(new HiddenField("Name", "", $member->getName()));
|
$fields->push(new HiddenField("Name", "", $member->getName()));
|
||||||
|
$fields->push(new HiddenField("Email", "", $member->Email));
|
||||||
|
|
||||||
$form->setFields($fields);
|
$form->setFields($fields);
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,10 @@ class CommentsExtension extends DataExtension {
|
|||||||
$this->ownerBaseClass, 'comments_per_page'
|
$this->ownerBaseClass, 'comments_per_page'
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$controller = Controller::curr();
|
||||||
|
$list->setPageStart($controller->request->getVar("commentsstart". $this->owner->ID));
|
||||||
$list->setPaginationGetVar("commentsstart". $this->owner->ID);
|
$list->setPaginationGetVar("commentsstart". $this->owner->ID);
|
||||||
|
$list->MoreThanOnePage();
|
||||||
|
|
||||||
return $list;
|
return $list;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user