Completed
Push — developer ( 1e92a5...487603 )
by Błażej
403:20 queued 370:53
created
modules/Vtiger/views/TreePopup.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,9 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
modules/Vtiger/views/FindDuplicates.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -86,8 +86,9 @@  discard block
 block discarded – undo
86 86
 
87 87
 		$ignoreEmpty = $request->get('ignoreEmpty');
88 88
 		$ignoreEmptyValue = false;
89
-		if ($ignoreEmpty == 'on' || $ignoreEmpty == 'true' || $ignoreEmpty == '1')
90
-			$ignoreEmptyValue = true;
89
+		if ($ignoreEmpty == 'on' || $ignoreEmpty == 'true' || $ignoreEmpty == '1') {
90
+					$ignoreEmptyValue = true;
91
+		}
91 92
 		$dataModelInstance->set('ignoreEmpty', $ignoreEmptyValue);
92 93
 
93 94
 		if (!$this->listViewEntries) {
@@ -109,8 +110,9 @@  discard block
 block discarded – undo
109 110
 			}
110 111
 		}
111 112
 		//for calculating the page range
112
-		for ($i = 0; $i < $rowCount; $i++)
113
-			$dummyListEntries[] = $i;
113
+		for ($i = 0; $i < $rowCount; $i++) {
114
+					$dummyListEntries[] = $i;
115
+		}
114 116
 		$pagingModel->calculatePageRange($dummyListEntries);
115 117
 
116 118
 		$totalCount = $this->rows;
@@ -146,8 +148,9 @@  discard block
 block discarded – undo
146 148
 
147 149
 		$ignoreEmpty = $request->get('ignoreEmpty');
148 150
 		$ignoreEmptyValue = false;
149
-		if ($ignoreEmpty == 'on' || $ignoreEmpty == 'true' || $ignoreEmpty == '1')
150
-			$ignoreEmptyValue = true;
151
+		if ($ignoreEmpty == 'on' || $ignoreEmpty == 'true' || $ignoreEmpty == '1') {
152
+					$ignoreEmptyValue = true;
153
+		}
151 154
 		$dataModelInstance->set('ignoreEmpty', $ignoreEmptyValue);
152 155
 
153 156
 		$dataModelInstance->set('fields', $duplicateSearchFields);
Please login to merge, or discard this patch.
modules/HelpDesk/HelpDesk.php 1 patch
Braces   +14 added lines, -10 removed lines patch added patch discarded remove patch
@@ -258,10 +258,11 @@  discard block
 block discarded – undo
258 258
 		$query .= getNonAdminAccessControlQuery('HelpDesk', $current_user);
259 259
 		$where_auto = " vtiger_crmentity.deleted = 0 ";
260 260
 
261
-		if ($where != '')
262
-			$query .= sprintf(' where (%s) && %s', $where, $where_auto);
263
-		else
264
-			$query .= sprintf(' where %s', $where_auto);
261
+		if ($where != '') {
262
+					$query .= sprintf(' where (%s) && %s', $where, $where_auto);
263
+		} else {
264
+					$query .= sprintf(' where %s', $where_auto);
265
+		}
265 266
 
266 267
 		$log->debug("Exiting create_export_query method ...");
267 268
 		return $query;
@@ -306,10 +307,12 @@  discard block
 block discarded – undo
306 307
 			//Assigned to change log
307 308
 			if ($focus->column_fields['assigned_user_id'] != $old_owner_id) {
308 309
 				$ownerName = \includes\fields\Owner::getLabel($focus->column_fields['assigned_user_id']);
309
-				if ($assigntype == 'T')
310
-					$updatelog .= ' Transferred to group ' . $ownerName . '\.';
311
-				else
312
-					$updatelog .= ' Transferred to user ' . decode_html($ownerName) . '\.'; // Need to decode UTF characters which are migrated from versions < 5.0.4.
310
+				if ($assigntype == 'T') {
311
+									$updatelog .= ' Transferred to group ' . $ownerName . '\.';
312
+				} else {
313
+									$updatelog .= ' Transferred to user ' . decode_html($ownerName) . '\.';
314
+				}
315
+				// Need to decode UTF characters which are migrated from versions < 5.0.4.
313 316
 			}
314 317
 			//Status change log
315 318
 			if ($old_status != $focus->column_fields['ticketstatus'] && $focus->column_fields['ticketstatus'] != '') {
@@ -446,8 +449,9 @@  discard block
 block discarded – undo
446 449
 	public function unlinkRelationship($id, $return_module, $return_id, $relatedName = false)
447 450
 	{
448 451
 		$log = LoggerManager::getInstance();
449
-		if (empty($return_module) || empty($return_id))
450
-			return;
452
+		if (empty($return_module) || empty($return_id)) {
453
+					return;
454
+		}
451 455
 
452 456
 		if ($return_module == 'Accounts') {
453 457
 			$sql = 'UPDATE vtiger_troubletickets SET parent_id=? WHERE ticketid=?';
Please login to merge, or discard this patch.
modules/HelpDesk/dashboards/OpenTickets.php 2 patches
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,9 +66,9 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,6 @@
 block discarded – undo
27 27
 
28 28
 	/**
29 29
 	 * Function returns Tickets grouped by Status
30
-	 * @param type $data
31 30
 	 * @return <Array>
32 31
 	 */
33 32
 	public function getTicketsByStatus($owner)
Please login to merge, or discard this patch.
modules/HelpDesk/views/Detail.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,9 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
modules/Calendar/iCalLastImport.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,9 @@
 block discarded – undo
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(
Please login to merge, or discard this patch.
modules/Calendar/actions/SaveFollowupAjax.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,10 +39,11 @@
 block discarded – undo
39 39
 		$recordModel->set('eventstatus', "Planned");
40 40
 
41 41
 		$activityType = $recordModel->get('activitytype');
42
-		if ($activityType == "Call")
43
-			$eventDuration = $request->get('defaultCallDuration');
44
-		else
45
-			$eventDuration = $request->get('defaultOtherEventDuration');
42
+		if ($activityType == "Call") {
43
+					$eventDuration = $request->get('defaultCallDuration');
44
+		} else {
45
+					$eventDuration = $request->get('defaultOtherEventDuration');
46
+		}
46 47
 
47 48
 		$followupStartTime = Vtiger_Time_UIType::getTimeValueWithSeconds($request->get('followup_time_start'));
48 49
 		$followupStartDateTime = Vtiger_Datetime_UIType::getDBDateTimeValue($request->get('followup_date_start') . " " . $followupStartTime);
Please login to merge, or discard this patch.
modules/Calendar/actions/DragDropAjax.php 2 patches
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@  discard block
 block discarded – undo
51 51
 			$resultDateTime = $this->changeDateTime($oldDateTime, $dayDelta, $minuteDelta);
52 52
 			$parts = explode(' ', $resultDateTime);
53 53
 			$record->set('due_date', $parts[0]);
54
-			if (activitytype != 'Task')
55
-				$record->set('time_end', $parts[1]);
54
+			if (activitytype != 'Task') {
55
+							$record->set('time_end', $parts[1]);
56
+			}
56 57
 
57 58
 			$startDateTime[] = $record->get('date_start');
58 59
 			$startDateTime[] = $record->get('time_start');
@@ -64,10 +65,11 @@  discard block
 block discarded – undo
64 65
 			$endDateTime = implode(' ', $endDateTime);
65 66
 			$endDateTime = new DateTime($endDateTime);
66 67
 			//Checking if startDateTime is less than or equal to endDateTime
67
-			if ($startDateTime <= $endDateTime)
68
-				$record->save();
69
-			else
70
-				$result['error'] = true;
68
+			if ($startDateTime <= $endDateTime) {
69
+							$record->save();
70
+			} else {
71
+							$result['error'] = true;
72
+			}
71 73
 
72 74
 			$response->setResult($result);
73 75
 			$response->emit();
@@ -107,8 +109,9 @@  discard block
 block discarded – undo
107 109
 			$resultDateTime = $this->changeDateTime($oldEndDateTime, $dayDelta, $minuteDelta);
108 110
 			$parts = explode(' ', $resultDateTime);
109 111
 			$record->set('due_date', $parts[0]);
110
-			if (activitytype != 'Task')
111
-				$record->set('time_end', $parts[1]);
112
+			if (activitytype != 'Task') {
113
+							$record->set('time_end', $parts[1]);
114
+			}
112 115
 			$record->save();
113 116
 
114 117
 			$response->setResult($result);
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -82,6 +82,9 @@
 block discarded – undo
82 82
 		$response->emit();
83 83
 	}
84 84
 
85
+	/**
86
+	 * @param string $datetime
87
+	 */
85 88
 	public function changeDateTime($datetime, $delta)
86 89
 	{
87 90
 		$date = new DateTime($datetime);
Please login to merge, or discard this patch.
modules/Calendar/actions/ImportICS.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 					}
Please login to merge, or discard this patch.