From 3e866f29afc66090b88975666a28bbd581965de3 Mon Sep 17 00:00:00 2001 From: Gabriel Jenik Date: Mon, 23 Feb 2015 15:14:38 -0300 Subject: [PATCH] Dev: Made some adjustments to better comply with coding guidelines. --- .../helpers/remotecontrol/remotecontrol_handle.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/application/helpers/remotecontrol/remotecontrol_handle.php b/application/helpers/remotecontrol/remotecontrol_handle.php index 208bf55e392..ba3e5693ce9 100644 --- a/application/helpers/remotecontrol/remotecontrol_handle.php +++ b/application/helpers/remotecontrol/remotecontrol_handle.php @@ -1111,7 +1111,8 @@ public function set_group_properties($sSessionKey, $iGroupID, $aGroupData) $depented_on = getGroupDepsForConditions($oGroup->sid,"all",$iGroupID,"by-targgid"); //We do not allow groups with dependencies to change order - that would lead to broken dependencies - if((isset($has_dependencies) || isset($depented_on)) && $sFieldName == 'group_order') { + if((isset($has_dependencies) || isset($depented_on)) && $sFieldName == 'group_order') + { $aResults[$sFieldName]='Group with dependencies - Order cannot be changed'; continue; } @@ -1495,13 +1496,14 @@ public function set_question_properties($sSessionKey, $iQuestionID, $aQuestionDa $is_criteria_question=getQuestDepsForConditions($oQuestion->sid,$oQuestion->gid,"all",$iQuestionID,"by-targqid"); //We do not allow questions with dependencies in the same group to change order - that would lead to broken dependencies - if ((isset($dependencies) || isset($is_criteria_question)) && $sFieldName == 'question_order'){ - $aResult[$sFieldName] = 'Questions with dependencies - Order cannot be changed'; + if ((isset($dependencies) || isset($is_criteria_question)) && $sFieldName == 'question_order') + { + $aResult[$sFieldName] = 'Questions with dependencies - Order cannot be changed'; continue; } - $oQuestion->setAttribute($sFieldName, $sValue); - + $oQuestion->setAttribute($sFieldName, $sValue); + try { $bSaveResult=$oQuestion->save(); // save the change to database