@@ -128,7 +128,7 @@ |
||
128 | 128 | if ($time["time"] == $dateParam) { |
129 | 129 | $num = count($time->Cube); |
130 | 130 | for ($i = 0; $i < $num; $i++) { |
131 | - $currency = (string) $time->Cube[$i]['currency']; // currency code |
|
131 | + $currency = (string) $time->Cube[$i]['currency']; // currency code |
|
132 | 132 | foreach ($otherCurrencyCode as $key => $currId) { |
133 | 133 | if ($key == $currency && $currency != $mainCurrency) { |
134 | 134 | $exchange = $time->Cube[$i]['rate']; |
@@ -83,10 +83,11 @@ |
||
83 | 83 | $rateDay = strtotime($dateParam); |
84 | 84 | $datediff = $now - $rateDay; |
85 | 85 | |
86 | - if (floor($datediff / (60 * 60 * 24)) >= 90) |
|
87 | - $sourceURL = $source[1]; |
|
88 | - else |
|
89 | - $sourceURL = $source[0]; |
|
86 | + if (floor($datediff / (60 * 60 * 24)) >= 90) { |
|
87 | + $sourceURL = $source[1]; |
|
88 | + } else { |
|
89 | + $sourceURL = $source[0]; |
|
90 | + } |
|
90 | 91 | |
91 | 92 | $XML = simplexml_load_file($sourceURL); // European Central Bank xml only contains business days! oh well.... |
92 | 93 |
@@ -26,11 +26,11 @@ |
||
26 | 26 | $dateCur = ''; |
27 | 27 | if ($date) { |
28 | 28 | // if its future date change it to present one |
29 | - if (strtotime($date) > strtotime(date('Y-m-d'))) |
|
30 | - $date = date('Y-m-d'); |
|
29 | + if (strtotime($date) > strtotime(date('Y-m-d'))) { |
|
30 | + $date = date('Y-m-d'); |
|
31 | + } |
|
31 | 32 | $dateCur = $date; |
32 | - } |
|
33 | - else { |
|
33 | + } else { |
|
34 | 34 | $dateCur = date('Y-m-d'); |
35 | 35 | } |
36 | 36 |
@@ -40,8 +40,9 @@ |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | $reporttype = $request->get('reporttype'); |
43 | - if (empty($reporttype)) |
|
44 | - $reporttype = 'tabular'; |
|
43 | + if (empty($reporttype)) { |
|
44 | + $reporttype = 'tabular'; |
|
45 | + } |
|
45 | 46 | $reportModel->set('reportname', $request->get('reportname')); |
46 | 47 | $reportModel->set('folderid', $request->get('folderid')); |
47 | 48 | $reportModel->set('description', $request->get('reports_description')); |
@@ -49,8 +49,9 @@ discard block |
||
49 | 49 | public function getChartType() |
50 | 50 | { |
51 | 51 | $type = $this->get('type'); |
52 | - if (empty($type)) |
|
53 | - $type = 'pieChart'; |
|
52 | + if (empty($type)) { |
|
53 | + $type = 'pieChart'; |
|
54 | + } |
|
54 | 55 | return $type; |
55 | 56 | } |
56 | 57 | |
@@ -143,8 +144,9 @@ discard block |
||
143 | 144 | |
144 | 145 | public function setQueryColumns($columns) |
145 | 146 | { |
146 | - if ($columns && is_string($columns)) |
|
147 | - $columns = array($columns); |
|
147 | + if ($columns && is_string($columns)) { |
|
148 | + $columns = array($columns); |
|
149 | + } |
|
148 | 150 | |
149 | 151 | if (is_array($columns)) { |
150 | 152 | foreach ($columns as $column) { |
@@ -187,14 +189,16 @@ discard block |
||
187 | 189 | } |
188 | 190 | } |
189 | 191 | } |
190 | - if ($fieldModels) |
|
191 | - $this->fieldModels = $fieldModels; |
|
192 | + if ($fieldModels) { |
|
193 | + $this->fieldModels = $fieldModels; |
|
194 | + } |
|
192 | 195 | } |
193 | 196 | |
194 | 197 | public function setGroupByColumns($columns) |
195 | 198 | { |
196 | - if ($columns && is_string($columns)) |
|
197 | - $columns = array($columns); |
|
199 | + if ($columns && is_string($columns)) { |
|
200 | + $columns = array($columns); |
|
201 | + } |
|
198 | 202 | |
199 | 203 | if (is_array($columns)) { |
200 | 204 | foreach ($columns as $column) { |
@@ -226,8 +230,9 @@ discard block |
||
226 | 230 | } |
227 | 231 | } |
228 | 232 | } |
229 | - if ($fieldModels) |
|
230 | - $this->groupByFieldModels = $fieldModels; |
|
233 | + if ($fieldModels) { |
|
234 | + $this->groupByFieldModels = $fieldModels; |
|
235 | + } |
|
231 | 236 | } |
232 | 237 | |
233 | 238 | public function getGroupbyColumnsByFieldModel() |
@@ -170,12 +170,14 @@ |
||
170 | 170 | |
171 | 171 | for ($i = 0; $i < $numOfRows; $i++) { |
172 | 172 | $row = $db->query_result_rowdata($result, $i); |
173 | - if (empty($row['leadfid'])) |
|
174 | - continue; |
|
173 | + if (empty($row['leadfid'])) { |
|
174 | + continue; |
|
175 | + } |
|
175 | 176 | |
176 | 177 | $leadFieldInstance = $leadFieldInstances[$row['leadfid']]; |
177 | - if (!$leadFieldInstance) |
|
178 | - continue; |
|
178 | + if (!$leadFieldInstance) { |
|
179 | + continue; |
|
180 | + } |
|
179 | 181 | |
180 | 182 | $leadFieldName = $leadFieldInstance->getName(); |
181 | 183 | $accountFieldInstance = $accountFieldInstances[$row['accountfid']]; |
@@ -76,6 +76,7 @@ |
||
76 | 76 | /** |
77 | 77 | * Function returns field mapped to Leads field, used in Lead Convert for settings the field values |
78 | 78 | * @param string $fieldName |
79 | + * @param string $moduleName |
|
79 | 80 | * @return string |
80 | 81 | */ |
81 | 82 | public function getConvertLeadMappedField($fieldName, $moduleName) |
@@ -47,8 +47,9 @@ discard block |
||
47 | 47 | |
48 | 48 | $pagingModel = new Vtiger_Paging_Model(); |
49 | 49 | $pagingModel->set('page', $pageNumber); |
50 | - if (vglobal('popupAjax')) |
|
51 | - $pagingModel->set('noLimit', true); |
|
50 | + if (vglobal('popupAjax')) { |
|
51 | + $pagingModel->set('noLimit', true); |
|
52 | + } |
|
52 | 53 | |
53 | 54 | $moduleModel = Vtiger_Module_Model::getInstance($moduleName); |
54 | 55 | $recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel); |
@@ -102,8 +103,9 @@ discard block |
||
102 | 103 | // Limit the choice of products/services only to the ones related to currently selected Opportunity - second step. |
103 | 104 | if (Settings_SalesProcesses_Module_Model::checkRelatedToPotentialsLimit($sourceModule)) { |
104 | 105 | $salesProcessId = $request->get('salesprocessid'); |
105 | - if (empty($salesProcessId)) |
|
106 | - $salesProcessId = -1; |
|
106 | + if (empty($salesProcessId)) { |
|
107 | + $salesProcessId = -1; |
|
108 | + } |
|
107 | 109 | $listViewModel->set('salesprocessid', $salesProcessId); |
108 | 110 | $viewer->assign('INVENTORY_LIMITED_FROM_POTENTIALS', true); |
109 | 111 | } |
@@ -124,8 +124,9 @@ discard block |
||
124 | 124 | $query = "SELECT vtiger_crmentity.*, $this->table_name.*"; |
125 | 125 | |
126 | 126 | // Select Custom Field Table Columns if present |
127 | - if (!empty($this->customFieldTable)) |
|
128 | - $query .= ", " . $this->customFieldTable[0] . ".* "; |
|
127 | + if (!empty($this->customFieldTable)) { |
|
128 | + $query .= ", " . $this->customFieldTable[0] . ".* "; |
|
129 | + } |
|
129 | 130 | |
130 | 131 | $query .= " FROM $this->table_name"; |
131 | 132 | |
@@ -299,10 +300,11 @@ discard block |
||
299 | 300 | $query .= $this->getNonAdminAccessControlQuery($thismodule, $current_user); |
300 | 301 | $where_auto = " vtiger_crmentity.deleted=0"; |
301 | 302 | |
302 | - if ($where != '') |
|
303 | - $query .= " WHERE ($where) && $where_auto"; |
|
304 | - else |
|
305 | - $query .= " WHERE $where_auto"; |
|
303 | + if ($where != '') { |
|
304 | + $query .= " WHERE ($where) && $where_auto"; |
|
305 | + } else { |
|
306 | + $query .= " WHERE $where_auto"; |
|
307 | + } |
|
306 | 308 | |
307 | 309 | return $query; |
308 | 310 | } |
@@ -315,8 +317,9 @@ discard block |
||
315 | 317 | $select_clause = sprintf("SELECT %s.%s AS recordid, vtiger_users_last_import.deleted,%s", $this->table_name, $this->table_index, $table_cols); |
316 | 318 | |
317 | 319 | // Select Custom Field Table Columns if present |
318 | - if (isset($this->customFieldTable)) |
|
319 | - $query .= ", " . $this->customFieldTable[0] . ".* "; |
|
320 | + if (isset($this->customFieldTable)) { |
|
321 | + $query .= ", " . $this->customFieldTable[0] . ".* "; |
|
322 | + } |
|
320 | 323 | |
321 | 324 | $from_clause = " FROM $this->table_name"; |
322 | 325 | |
@@ -406,8 +409,9 @@ discard block |
||
406 | 409 | */ |
407 | 410 | public function save_related_module($module, $crmid, $with_module, $with_crmids, $relatedName = false) |
408 | 411 | { |
409 | - if (!is_array($with_crmids)) |
|
410 | - $with_crmids = Array($with_crmids); |
|
412 | + if (!is_array($with_crmids)) { |
|
413 | + $with_crmids = Array($with_crmids); |
|
414 | + } |
|
411 | 415 | foreach ($with_crmids as $with_crmid) { |
412 | 416 | if ($with_module == 'HelpDesk') { |
413 | 417 | parent::save_related_module($module, $crmid, $with_module, $with_crmid); |
@@ -423,8 +427,9 @@ discard block |
||
423 | 427 | public function updateHelpDeskRelatedTo($focusId, $entityIds) |
424 | 428 | { |
425 | 429 | |
426 | - if (!is_array($entityIds)) |
|
427 | - $entityIds = array($entityIds); |
|
430 | + if (!is_array($entityIds)) { |
|
431 | + $entityIds = array($entityIds); |
|
432 | + } |
|
428 | 433 | $selectTicketsQuery = sprintf('SELECT ticketid FROM vtiger_troubletickets |
429 | 434 | WHERE (parent_id IS NULL || parent_id = 0) |
430 | 435 | AND ticketid IN (%s)', generateQuestionMarks($entityIds)); |
@@ -43,8 +43,9 @@ |
||
43 | 43 | $salutationType = $recordModel->getDisplayValue('salutationtype'); |
44 | 44 | $firstNameDetails = $result['firstname']; |
45 | 45 | $firstNameDetails['display_value'] = $salutationType . " " . $firstNameDetails['display_value']; |
46 | - if ($salutationType != '--None--') |
|
47 | - $result['firstname'] = $firstNameDetails; |
|
46 | + if ($salutationType != '--None--') { |
|
47 | + $result['firstname'] = $firstNameDetails; |
|
48 | + } |
|
48 | 49 | } |
49 | 50 | |
50 | 51 | $result['_recordLabel'] = $recordModel->getName(); |
@@ -32,10 +32,11 @@ |
||
32 | 32 | */ |
33 | 33 | public function isPermitted($actionName) |
34 | 34 | { |
35 | - if ($actionName == 'EditView' || $actionName == 'Edit' || $actionName == 'CreateView') |
|
36 | - return false; |
|
37 | - else |
|
38 | - return ($this->isActive() && Users_Privileges_Model::isPermitted($this->getName(), $actionName)); |
|
35 | + if ($actionName == 'EditView' || $actionName == 'Edit' || $actionName == 'CreateView') { |
|
36 | + return false; |
|
37 | + } else { |
|
38 | + return ($this->isActive() && Users_Privileges_Model::isPermitted($this->getName(), $actionName)); |
|
39 | + } |
|
39 | 40 | } |
40 | 41 | |
41 | 42 | /** |