@@ -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)) { |
@@ -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); |
@@ -686,8 +686,9 @@ |
||
| 686 | 686 | $sortImage = 'glyphicon glyphicon-chevron-up'; |
| 687 | 687 | } |
| 688 | 688 | if (empty($orderBy) && empty($sortOrder)) { |
| 689 | - if (is_numeric($relatedModuleName)) |
|
| 690 | - $relatedModuleName = vtlib\Functions::getModuleName($relatedModuleName); |
|
| 689 | + if (is_numeric($relatedModuleName)) { |
|
| 690 | + $relatedModuleName = vtlib\Functions::getModuleName($relatedModuleName); |
|
| 691 | + } |
|
| 691 | 692 | $relatedInstance = CRMEntity::getInstance($relatedModuleName); |
| 692 | 693 | $orderBy = $relatedInstance->default_order_by; |
| 693 | 694 | $sortOrder = $relatedInstance->default_sort_order; |
@@ -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 | |