@@ -504,16 +504,21 @@ public function callbackFetchDataThreaded(array $options) {
504
504
'Comment.title ' , 'Comment.body ' , 'Comment.slug ' , 'Comment.created ' ,
505
505
$ this ->Controller ->{$ this ->modelAlias }->alias . '. ' . $ this ->Controller ->{$ this ->modelAlias }->primaryKey ,
506
506
$ this ->userModel . '. ' . $ Comment ->{$ this ->userModel }->primaryKey ,
507
- $ this ->userModel . '. ' . $ Comment ->{$ this ->userModel }->displayField ];
507
+ $ this ->userModel . '. ' . $ Comment ->{$ this ->userModel }->displayField ,
508
+
509
+ ];
508
510
509
511
if ($ Comment ->{$ this ->userModel }->hasField ('slug ' )) {
510
512
$ settings ['fields ' ][] = $ this ->userModel . '.slug ' ;
511
513
}
512
514
513
515
$ settings += [
514
- 'order ' => [
515
- 'Comment.parent_id ' => 'asc ' ,
516
- 'Comment.created ' => 'asc ' ]];
516
+ 'order ' => [
517
+ 'Comment.parent_id ' => 'asc ' ,
518
+ 'Comment.created ' => 'asc ' ,
519
+ ],
520
+
521
+ ];
517
522
518
523
return $ Comment ->find ('threaded ' , ...$ settings );
519
524
}
@@ -641,7 +646,9 @@ public function callbackAdd($modelId, $commentId, $displayType, $data = []) {
641
646
public function callbackgetFormattedComment ($ commentId ) {
642
647
$ comment = $ this ->Controller ->{$ this ->modelAlias }->Comments ->find ('first ' , ...[
643
648
'fields ' => ['Comment.body ' , 'Comment.title ' ],
644
- 'conditions ' => ['Comment.id ' => $ commentId ]]);
649
+ 'conditions ' => ['Comment.id ' => $ commentId ],
650
+
651
+ ]);
645
652
if ($ comment ) {
646
653
} else {
647
654
return null ;
0 commit comments