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;