From 4f714efa6de42682161ab80fda9521916b068307 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 5 Jan 2009 04:20:04 +0000 Subject: [PATCH] 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 --- code/CommentAdmin.php | 4 ++++ code/CommentTableField.php | 2 ++ 2 files changed, 6 insertions(+) diff --git a/code/CommentAdmin.php b/code/CommentAdmin.php index 9e98470b..73da1430 100644 --- a/code/CommentAdmin.php +++ b/code/CommentAdmin.php @@ -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'; } diff --git a/code/CommentTableField.php b/code/CommentTableField.php index 515fe994..f801a718 100644 --- a/code/CommentTableField.php +++ b/code/CommentTableField.php @@ -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;