Skip to content
Snippets Groups Projects
Commit 7742b531 authored by Ruben Estrada's avatar Ruben Estrada
Browse files

Order picklists according to sortorder configured by user when passed to...

Order picklists according to sortorder configured by user when passed to customer portal through webservice.fix #1136
parent 8c13e5e6
No related branches found
No related tags found
1 merge request!349fix #1136. Order picklists according to sortorder configured by user when passed to customer portal through webservice.
......@@ -378,7 +378,7 @@ class WebserviceField{
if ($moduleName == 'Events') $moduleName = 'Calendar';
if($numRows == 0){
$sql = "select * from vtiger_$fieldName";
$sql = "SELECT * FROM vtiger_$fieldName ORDER BY sortorderid";
$result = $this->pearDB->pquery($sql,array());
$numRows = $this->pearDB->num_rows($result);
for($i=0;$i<$numRows;++$i){
......
......@@ -955,7 +955,7 @@ class Vtiger_Functions {
static function getPickListValuesFromTableForRole($tablename, $roleid) {
global $adb;
$query = "select $tablename from vtiger_$tablename inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_$tablename.picklist_valueid where roleid=? and picklistid in (select picklistid from vtiger_picklist) order by sortid";
$query = "select $tablename from vtiger_$tablename inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_$tablename.picklist_valueid where roleid=? and picklistid in (select picklistid from vtiger_picklist) order by sortorderid";
$result = $adb->pquery($query, array($roleid));
$fldVal = Array();
while ($row = $adb->fetch_array($result)) {
......
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