@@ -199,10 +199,12 @@ |
||
199 | 199 | $totalCount = $this->get('totalCount'); |
200 | 200 | $startPaginFrom = $pageNumber - 2; |
201 | 201 | |
202 | - if ($pageNumber == $totalCount && 1 != $pageNumber) |
|
203 | - $startPaginFrom = $pageNumber - 4; |
|
204 | - if ($startPaginFrom <= 0 || 1 == $pageNumber) |
|
205 | - $startPaginFrom = 1; |
|
202 | + if ($pageNumber == $totalCount && 1 != $pageNumber) { |
|
203 | + $startPaginFrom = $pageNumber - 4; |
|
204 | + } |
|
205 | + if ($startPaginFrom <= 0 || 1 == $pageNumber) { |
|
206 | + $startPaginFrom = 1; |
|
207 | + } |
|
206 | 208 | |
207 | 209 | return $startPaginFrom; |
208 | 210 | } |
@@ -178,8 +178,9 @@ |
||
178 | 178 | $fields = $request->get('fields'); |
179 | 179 | $ignoreEmpty = $request->get('ignoreEmpty'); |
180 | 180 | $ignoreEmptyValue = false; |
181 | - if ($ignoreEmpty == 'on') |
|
182 | - $ignoreEmptyValue = true; |
|
181 | + if ($ignoreEmpty == 'on') { |
|
182 | + $ignoreEmptyValue = true; |
|
183 | + } |
|
183 | 184 | |
184 | 185 | $fieldModels = $moduleModel->getFields(); |
185 | 186 | if (is_array($fields)) { |
@@ -11,6 +11,9 @@ |
||
11 | 11 | class Vtiger_FindDuplicate_Model extends Vtiger_Base_Model |
12 | 12 | { |
13 | 13 | |
14 | + /** |
|
15 | + * @param Vtiger_Module_Model $moduleModel |
|
16 | + */ |
|
14 | 17 | public function setModule($moduleModel) |
15 | 18 | { |
16 | 19 | $this->module = $moduleModel; |
@@ -122,8 +122,9 @@ |
||
122 | 122 | |
123 | 123 | $pagingModel = new Vtiger_Paging_Model(); |
124 | 124 | $pagingModel->set('page', $pageNumber); |
125 | - if (vglobal('popupAjax')) |
|
126 | - $pagingModel->set('noLimit', true); |
|
125 | + if (vglobal('popupAjax')) { |
|
126 | + $pagingModel->set('noLimit', true); |
|
127 | + } |
|
127 | 128 | |
128 | 129 | $moduleModel = Vtiger_Module_Model::getInstance($moduleName); |
129 | 130 | $recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel); |
@@ -36,8 +36,9 @@ |
||
36 | 36 | } else { |
37 | 37 | vtlib\Functions::throwNewException(vtranslate('ERR_TREE_NOT_FOUND', $moduleName)); |
38 | 38 | } |
39 | - if (!$recordModel) |
|
40 | - vtlib\Functions::throwNewException(vtranslate('ERR_TREE_NOT_FOUND', $moduleName)); |
|
39 | + if (!$recordModel) { |
|
40 | + vtlib\Functions::throwNewException(vtranslate('ERR_TREE_NOT_FOUND', $moduleName)); |
|
41 | + } |
|
41 | 42 | if ($request->get('multiple')) { |
42 | 43 | $type = 'category'; |
43 | 44 | } |
@@ -66,9 +66,9 @@ |
||
66 | 66 | public function getSearchParams($value) |
67 | 67 | { |
68 | 68 | $openTicketsStatus = Settings_SupportProcesses_Module_Model::getOpenTicketStatus(); |
69 | - if ($openTicketsStatus) |
|
70 | - $openTicketsStatus = implode(',', $openTicketsStatus); |
|
71 | - else { |
|
69 | + if ($openTicketsStatus) { |
|
70 | + $openTicketsStatus = implode(',', $openTicketsStatus); |
|
71 | + } else { |
|
72 | 72 | $allTicketStatus = Settings_SupportProcesses_Module_Model::getAllTicketStatus(); |
73 | 73 | $openTicketsStatus = implode(',', $allTicketStatus); |
74 | 74 | } |
@@ -14,7 +14,6 @@ |
||
14 | 14 | |
15 | 15 | /** |
16 | 16 | * Function returns Tickets grouped by Status |
17 | - * @param type $data |
|
18 | 17 | * @return array |
19 | 18 | */ |
20 | 19 | public function getOpenTickets() |
@@ -46,8 +46,9 @@ |
||
46 | 46 | |
47 | 47 | $viewer = $this->getViewer($request); |
48 | 48 | $moduleModel = Vtiger_Module_Model::getInstance('OSSTimeControl'); |
49 | - if ($moduleModel) |
|
50 | - $data = $moduleModel->getTimeUsers($recordId, $moduleName); |
|
49 | + if ($moduleModel) { |
|
50 | + $data = $moduleModel->getTimeUsers($recordId, $moduleName); |
|
51 | + } |
|
51 | 52 | $viewer->assign('MODULE_NAME', $moduleName); |
52 | 53 | $viewer->assign('DATA', $data); |
53 | 54 | $viewer->view('charts/ShowTimeHelpDesk.tpl', $moduleName); |
@@ -37,8 +37,9 @@ |
||
37 | 37 | { |
38 | 38 | $adb = PearDatabase::getInstance(); |
39 | 39 | |
40 | - if (count($this->fieldData) == 0) |
|
41 | - return; |
|
40 | + if (count($this->fieldData) == 0) { |
|
41 | + return; |
|
42 | + } |
|
42 | 43 | |
43 | 44 | if (!vtlib\Utils::CheckTable($this->tableName)) { |
44 | 45 | vtlib\Utils::CreateTable( |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $module = $todoModule; |
73 | 73 | } |
74 | 74 | |
75 | - $totalCount[$module] ++; |
|
75 | + $totalCount[$module]++; |
|
76 | 76 | $activityFieldsList = $activity->generateArray($icalActivities[$i]); |
77 | 77 | |
78 | 78 | $recordModel = Vtiger_Record_Model::getCleanInstance($moduleName); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | foreach ($requiredFields[$module] as $key) { |
84 | 84 | $value = $recordModel->get($key); |
85 | 85 | if (empty($value)) { |
86 | - $skipCount[$module] ++; |
|
86 | + $skipCount[$module]++; |
|
87 | 87 | $skipRecord = true; |
88 | 88 | break; |
89 | 89 | } |
@@ -114,8 +114,9 @@ discard block |
||
114 | 114 | $joinedTables = array(); |
115 | 115 | |
116 | 116 | // Select Custom Field Table Columns if present |
117 | - if (!empty($this->customFieldTable)) |
|
118 | - $query .= ", " . $this->customFieldTable[0] . ".* "; |
|
117 | + if (!empty($this->customFieldTable)) { |
|
118 | + $query .= ", " . $this->customFieldTable[0] . ".* "; |
|
119 | + } |
|
119 | 120 | |
120 | 121 | $query .= " FROM $this->table_name"; |
121 | 122 | |
@@ -250,10 +251,11 @@ discard block |
||
250 | 251 | $query .= $this->getNonAdminAccessControlQuery($thismodule, $current_user); |
251 | 252 | $where_auto = " vtiger_crmentity.deleted=0"; |
252 | 253 | |
253 | - if ($where != '') |
|
254 | - $query .= " WHERE ($where) && $where_auto"; |
|
255 | - else |
|
256 | - $query .= " WHERE $where_auto"; |
|
254 | + if ($where != '') { |
|
255 | + $query .= " WHERE ($where) && $where_auto"; |
|
256 | + } else { |
|
257 | + $query .= " WHERE $where_auto"; |
|
258 | + } |
|
257 | 259 | |
258 | 260 | return $query; |
259 | 261 | } |
@@ -274,8 +276,9 @@ discard block |
||
274 | 276 | $select_clause = sprintf('SELECT %s.%s AS recordid, vtiger_users_last_import.deleted, %s', $this->table_name, $this->table_index, $table_cols); |
275 | 277 | |
276 | 278 | // Select Custom Field Table Columns if present |
277 | - if (isset($this->customFieldTable)) |
|
278 | - $query .= ", " . $this->customFieldTable[0] . ".* "; |
|
279 | + if (isset($this->customFieldTable)) { |
|
280 | + $query .= ", " . $this->customFieldTable[0] . ".* "; |
|
281 | + } |
|
279 | 282 | |
280 | 283 | $from_clause = " FROM $this->table_name"; |
281 | 284 |