@@ -16,8 +16,9 @@ |
||
16 | 16 | { |
17 | 17 | $qualifiedModuleName = $request->getModule(false); |
18 | 18 | $roleId = $request->get('roleid'); |
19 | - if (empty($roleId)) |
|
20 | - $roleId = 0; |
|
19 | + if (empty($roleId)) { |
|
20 | + $roleId = 0; |
|
21 | + } |
|
21 | 22 | $settingsModel = Settings_Menu_Record_Model::getCleanInstance(); |
22 | 23 | $rolesContainMenu = $settingsModel->getRolesContainMenu(); |
23 | 24 | $viewer = $this->getViewer($request); |
@@ -48,10 +48,11 @@ discard block |
||
48 | 48 | if (!empty($record)) { |
49 | 49 | $taskRecordModel = Settings_Workflows_TaskRecord_Model::getInstance($record); |
50 | 50 | $taskObject = $taskRecordModel->getTaskObject(); |
51 | - if ($request->get('status') == 'true') |
|
52 | - $taskObject->active = true; |
|
53 | - else |
|
54 | - $taskObject->active = false; |
|
51 | + if ($request->get('status') == 'true') { |
|
52 | + $taskObject->active = true; |
|
53 | + } else { |
|
54 | + $taskObject->active = false; |
|
55 | + } |
|
55 | 56 | $taskRecordModel->save(); |
56 | 57 | $response = new Vtiger_Response(); |
57 | 58 | $response->setResult(array('ok')); |
@@ -69,10 +70,11 @@ discard block |
||
69 | 70 | foreach ($taskList as $task) { |
70 | 71 | $taskRecordModel = Settings_Workflows_TaskRecord_Model::getInstance($task->getId()); |
71 | 72 | $taskObject = $taskRecordModel->getTaskObject(); |
72 | - if ($status == 'true') |
|
73 | - $taskObject->active = true; |
|
74 | - else |
|
75 | - $taskObject->active = false; |
|
73 | + if ($status == 'true') { |
|
74 | + $taskObject->active = true; |
|
75 | + } else { |
|
76 | + $taskObject->active = false; |
|
77 | + } |
|
76 | 78 | $taskRecordModel->save(); |
77 | 79 | } |
78 | 80 | $response = new Vtiger_Response(); |
@@ -77,8 +77,9 @@ |
||
77 | 77 | foreach ($fields as $parentFieldName => $field) { |
78 | 78 | $type = $field->getFieldDataType(); |
79 | 79 | $referenceModules = $field->getReferenceList(); |
80 | - if ($type == 'owner') |
|
81 | - $referenceModules = array('Users'); |
|
80 | + if ($type == 'owner') { |
|
81 | + $referenceModules = array('Users'); |
|
82 | + } |
|
82 | 83 | foreach ($referenceModules as $refModule) { |
83 | 84 | $moduleModel = Vtiger_Module_Model::getInstance($refModule); |
84 | 85 | $blockModelList = $moduleModel->getBlocks(); |
@@ -100,8 +100,9 @@ |
||
100 | 100 | $value = array($value); |
101 | 101 | } |
102 | 102 | } |
103 | - if ($name == 'summary') |
|
104 | - $value = htmlspecialchars($value); |
|
103 | + if ($name == 'summary') { |
|
104 | + $value = htmlspecialchars($value); |
|
105 | + } |
|
105 | 106 | $workFlowModel->set($name, $value); |
106 | 107 | } |
107 | 108 | //Added to support advance filters |
@@ -64,7 +64,7 @@ |
||
64 | 64 | public static $step3Fields = ['module_name', 'header_content']; |
65 | 65 | public static $step4Fields = ['module_name', 'body_content']; |
66 | 66 | public static $step5Fields = ['footer_content']; |
67 | - public static $step6Fields = ['conditions',]; |
|
67 | + public static $step6Fields = ['conditions', ]; |
|
68 | 68 | public static $step7Fields = ['template_members']; |
69 | 69 | public static $step8Fields = ['watermark_type', 'watermark_text', 'watermark_size', 'watermark_angle', 'watermark_image']; |
70 | 70 | public static $module = 'PDF'; |
@@ -178,7 +178,7 @@ |
||
178 | 178 | /** |
179 | 179 | * Function transforms Advance filter to workflow conditions |
180 | 180 | */ |
181 | - public static function transformAdvanceFilterToWorkFlowFilter(Vtiger_PDF_Model &$pdfModel) |
|
181 | + public static function transformAdvanceFilterToWorkFlowFilter(Vtiger_PDF_Model & $pdfModel) |
|
182 | 182 | { |
183 | 183 | $conditions = $pdfModel->get('conditions'); |
184 | 184 | $wfCondition = []; |
@@ -25,8 +25,9 @@ |
||
25 | 25 | $mode = 'edit'; |
26 | 26 | $recordModel = Settings_HideBlocks_Record_Model::getInstanceById($recordId, $qualifiedModuleName); |
27 | 27 | $enabled = $recordModel->get('enabled'); |
28 | - if ($recordModel->get('view') != '') |
|
29 | - $views = explode(',', $recordModel->get('view')); |
|
28 | + if ($recordModel->get('view') != '') { |
|
29 | + $views = explode(',', $recordModel->get('view')); |
|
30 | + } |
|
30 | 31 | $viewer->assign('BLOCK_ID', $recordModel->get('blockid')); |
31 | 32 | } |
32 | 33 |
@@ -22,8 +22,9 @@ discard block |
||
22 | 22 | $viewer = $this->getViewer($request); |
23 | 23 | |
24 | 24 | |
25 | - if ($views != '') |
|
26 | - $views = implode($views, ','); |
|
25 | + if ($views != '') { |
|
26 | + $views = implode($views, ','); |
|
27 | + } |
|
27 | 28 | if ($recordId) { |
28 | 29 | $mode = 'edit'; |
29 | 30 | } else { |
@@ -62,8 +63,9 @@ discard block |
||
62 | 63 | $viewer->assign('ADVANCED_FILTER_OPTIONS_BY_TYPE', Settings_Workflows_Field_Model::getAdvancedFilterOpsByFieldType()); |
63 | 64 | $viewer->assign('COLUMNNAME_API', 'getName'); |
64 | 65 | $recordModel = Settings_HideBlocks_Record_Model::getInstanceById($recordId, $qualifiedModuleName); |
65 | - if ($recordModel) |
|
66 | - $viewer->assign('ADVANCE_CRITERIA', $this->transformToAdvancedFilterCondition($recordModel->get('conditions'))); |
|
66 | + if ($recordModel) { |
|
67 | + $viewer->assign('ADVANCE_CRITERIA', $this->transformToAdvancedFilterCondition($recordModel->get('conditions'))); |
|
68 | + } |
|
67 | 69 | $viewer->assign('MODE', $mode); |
68 | 70 | $viewer->assign('RECORD_ID', $recordId); |
69 | 71 | $viewer->assign('MODULE', 'HideBlocks'); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $id = $request->get('id'); |
24 | 24 | $status = $request->get('status'); |
25 | 25 | $moduleModel = new Settings_ModTracker_Module_Model(); |
26 | - $moduleModel->changeActiveStatus($id, $status == 'true' ? 1 : 0 ); |
|
26 | + $moduleModel->changeActiveStatus($id, $status == 'true' ? 1 : 0); |
|
27 | 27 | |
28 | 28 | $response = new Vtiger_Response(); |
29 | 29 | if ($status == 'true') { |