mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Sort by creation date desc
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@39814 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ab89c8dd7a
commit
c4fd1281e1
@ -4,13 +4,15 @@ class CommentTableField extends ComplexTableField {
|
||||
protected $template = "CommentTableField";
|
||||
protected $mode;
|
||||
|
||||
function __construct($controller, $name, $sourceClass, $mode, $fieldList, $detailFormFields = null, $sourceFilter = "", $sourceSort = "", $sourceJoin = "") {
|
||||
function __construct($controller, $name, $sourceClass, $mode, $fieldList, $detailFormFields = null, $sourceFilter = "", $sourceSort = "Created DESC", $sourceJoin = "") {
|
||||
$this->mode = $mode;
|
||||
|
||||
parent::__construct($controller, $name, $sourceClass, $fieldList, $detailFormFields, $sourceFilter, $sourceSort, $sourceJoin);
|
||||
|
||||
$this->Markable = true;
|
||||
// search
|
||||
$this->setPageSize(15);
|
||||
|
||||
// search
|
||||
$search = isset($_REQUEST['CommentSearch']) ? Convert::raw2sql($_REQUEST['CommentSearch']) : null;
|
||||
if(!empty($_REQUEST['CommentSearch'])) {
|
||||
$this->sourceFilter[] = "( `Name` LIKE '%$search%' OR `Comment` LIKE '%$search%')";
|
||||
|
Loading…
Reference in New Issue
Block a user