Merge pull request #30 from roed/master

FIX: Fix submission when require_login = true
This commit is contained in:
Will Rossiter 2012-07-27 19:51:44 -07:00
commit bcd16e1c10
2 changed files with 4 additions and 0 deletions

View File

@ -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);
} }

View File

@ -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;
} }