Skip to content

Commit 6ba5938

Browse files
committed
Add class name to sort order in ListController, if not specified
1 parent b08e3ed commit 6ba5938

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wcmf/application/controller/ListController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected function doExecute($method=null) {
110110
$sortArray = null;
111111
$orderBy = $request->getValue('sortFieldName');
112112
if (strlen($orderBy) > 0) {
113-
$sortArray = [$orderBy." ".$request->getValue('sortDirection')];
113+
$sortArray = [(strpos($orderBy, '.') === false ? $className."." : "").$orderBy." ".$request->getValue('sortDirection')];
114114
}
115115
// get the objects
116116
$objects = $this->getObjects($className, $query, $sortArray, $pagingInfo);

0 commit comments

Comments
 (0)