BUGFIX #3081 simon_w: Fixed pagination on spam comments

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@69690 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-01-05 04:20:04 +00:00
parent ba74dea6f5
commit 4f714efa6d
2 changed files with 6 additions and 0 deletions

View File

@ -40,6 +40,10 @@ class CommentAdmin extends LeftAndMain {
}
$section = substr($url, strrpos($url, '/') + 1);
if($section != 'approved' && $section != 'unmoderated' && $section != 'spam') {
$section = Session::get('CommentsSection');
}
if($section != 'approved' && $section != 'unmoderated' && $section != 'spam') {
$section = 'approved';
}

View File

@ -11,6 +11,8 @@ class CommentTableField extends ComplexTableField {
function __construct($controller, $name, $sourceClass, $mode, $fieldList, $detailFormFields = null, $sourceFilter = "", $sourceSort = "Created", $sourceJoin = "") {
$this->mode = $mode;
Session::set('CommentsSection', $mode);
parent::__construct($controller, $name, $sourceClass, $fieldList, $detailFormFields, $sourceFilter, $sourceSort, $sourceJoin);
$this->Markable = true;