Skip to content
Snippets Groups Projects
Commit cae7d933 authored by Prasad's avatar Prasad
Browse files

Merge branch 'master' of http://code.vtiger.com/vtiger/vtigercrm

parents 2febdefc 052885da
No related branches found
No related tags found
No related merge requests found
......@@ -189,6 +189,10 @@ class Vtiger_ListView_Model extends Vtiger_Base_Model {
if(empty($orderBy) && empty($sortOrder) && $moduleName != "Users"){
$orderBy = 'modifiedtime';
$sortOrder = 'DESC';
if (PerformancePrefs::getBoolean('LISTVIEW_DEFAULT_SORTING', true)) {
$orderBy = $moduleFocus->default_order_by;
$sortOrder = $moduleFocus->default_sort_order;
}
}
if(!empty($orderBy)){
......
......@@ -213,6 +213,13 @@ class Vtiger_RelationListView_Model extends Vtiger_Base_Model {
$orderBy = $this->getForSql('orderby');
$sortOrder = $this->getForSql('sortorder');
if (!$orderBy & PerformancePrefs::getBoolean('LISTVIEW_DEFAULT_SORTING', true)) {
$entityModule=CRMEntity::getInstance($relationModule->name);
$orderBy=$entityModule->default_order_by;
$sortorder=$entityModule->default_sort_order;
}
if($orderBy) {
$orderByFieldModuleModel = $relationModule->getFieldByColumn($orderBy);
......@@ -506,4 +513,4 @@ class Vtiger_RelationListView_Model extends Vtiger_Base_Model {
}
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment