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

Merge branch 'fix_sortorder_of_picklists_in_customerportal' into 'master'

fix #1136. Order picklists according to sortorder configured by user when passed to customer portal through webservice.

See merge request !349
parents bc4e0362 7742b531
No related branches found
No related tags found
No related merge requests found
......@@ -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