Completed
Pull Request — developer (#4001)
by Thom
542:26 queued 508:45
created
include/Loader.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,8 +124,9 @@
 block discarded – undo
124 124
 			$secondFallBackModuleDir = $secondFallBackModuleClassPath = $actualModule;
125 125
 			if ($actualModule != 'Users') {
126 126
 				$baseModule = $moduleHierarchyParts[0];
127
-				if ($baseModule == 'Settings')
128
-					$baseModule = 'Settings:Vtiger';
127
+				if ($baseModule == 'Settings') {
128
+									$baseModule = 'Settings:Vtiger';
129
+				}
129 130
 				$firstFallBackDir = str_replace(':', '.', $baseModule);
130 131
 				$firstFallBackClassPath = str_replace(':', '_', $baseModule);
131 132
 			}
Please login to merge, or discard this patch.
include/utils/EmailTemplate.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -209,8 +209,9 @@  discard block
 block discarded – undo
209 209
 						$needle = '$' . strtolower($this->module) . '-' . $parentFieldColumnMapping[$params['field']] . ':' . $column . '$';
210 210
 						$this->processedDescription = str_replace($needle, $values[array_search($column, $fieldColumnMapping)], $this->processedDescription);
211 211
 					}
212
-					if (!$params['owner'])
213
-						$this->processedmodules[$module] = true;
212
+					if (!$params['owner']) {
213
+											$this->processedmodules[$module] = true;
214
+					}
214 215
 				}
215 216
 			}
216 217
 		}
@@ -253,7 +254,8 @@  discard block
 block discarded – undo
253 254
 		$rows = $adb->num_rows($res);
254 255
 		if ($rows > 0) {
255 256
 			return true;
256
-		} else
257
-			return false;
257
+		} else {
258
+					return false;
259
+		}
258 260
 	}
259 261
 }
Please login to merge, or discard this patch.
include/utils/ConfigReader.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,8 +37,9 @@  discard block
 block discarded – undo
37 37
 
38 38
 	public function setConfig($key, $value)
39 39
 	{
40
-		if (empty($key))
41
-			return;
40
+		if (empty($key)) {
41
+					return;
42
+		}
42 43
 		$this->properties[$key] = $value;
43 44
 		//not neccessary for php5.x versions
44 45
 		self::$propertiesCache[$this->name] = $this->properties;
@@ -46,8 +47,9 @@  discard block
 block discarded – undo
46 47
 
47 48
 	public function getConfig($key)
48 49
 	{
49
-		if (empty($key))
50
-			return '';
50
+		if (empty($key)) {
51
+					return '';
52
+		}
51 53
 		return $this->properties[$key];
52 54
 	}
53 55
 }
Please login to merge, or discard this patch.
include/utils/ExportUtils.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,9 @@
 block discarded – undo
28 28
 	$blockid_list = '(';
29 29
 	for ($i = 0; $i < $noofrows; $i++) {
30 30
 		$blockid = $adb->query_result($result, $i, "blockid");
31
-		if ($i != 0)
32
-			$blockid_list .= ', ';
31
+		if ($i != 0) {
32
+					$blockid_list .= ', ';
33
+		}
33 34
 		$blockid_list .= $blockid;
34 35
 		$block_label[$blockid] = $adb->query_result($result, $i, "blocklabel");
35 36
 	}
Please login to merge, or discard this patch.
include/ConfigUtils.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,9 @@
 block discarded – undo
61 61
 		self::$modules[$module] = $CONFIG;
62 62
 		switch ($argsLength) {
63 63
 			case 2:
64
-				if (!isset($CONFIG[$key]))
65
-					return false;
64
+				if (!isset($CONFIG[$key])) {
65
+									return false;
66
+				}
66 67
 				return $CONFIG[$key];
67 68
 				break;
68 69
 			default:
Please login to merge, or discard this patch.
include/Webservices/VtigerCRMObjectMeta.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -212,8 +212,9 @@  discard block
 block discarded – undo
212 212
 		$adb = PearDatabase::getInstance();
213 213
 
214 214
 		// administrator's have assign privilege
215
-		if (\vtlib\Functions::userIsAdministrator($this->user))
216
-			return true;
215
+		if (\vtlib\Functions::userIsAdministrator($this->user)) {
216
+					return true;
217
+		}
217 218
 
218 219
 		$idComponents = vtws_getIdComponents($webserviceId);
219 220
 		$userId = $idComponents[1];
@@ -353,8 +354,9 @@  discard block
 block discarded – undo
353 354
 		$theme = vtws_preserveGlobal('theme', $this->user->theme);
354 355
 		$default_language = AppConfig::main('default_language');
355 356
 		$current_language = vglobal('current_language');
356
-		if (empty($current_language))
357
-			$current_language = $default_language;
357
+		if (empty($current_language)) {
358
+					$current_language = $default_language;
359
+		}
358 360
 		$current_language = vtws_preserveGlobal('current_language', $current_language);
359 361
 
360 362
 		$this->computeAccess();
Please login to merge, or discard this patch.
include/Webservices/History.php 1 patch
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@  discard block
 block discarded – undo
31 31
 	$page = empty($element['page']) ? 0 : intval($element['page']); // Page to start
32 32
 
33 33
 	$acrossAllModule = false;
34
-	if ($moduleName == 'Home')
35
-		$acrossAllModule = true;
34
+	if ($moduleName == 'Home') {
35
+			$acrossAllModule = true;
36
+	}
36 37
 
37 38
 	// Pre-condition check
38 39
 	if (empty($moduleName)) {
@@ -71,8 +72,10 @@  discard block
 block discarded – undo
71 72
 
72 73
 	// Get most recently tracked changes with limit
73 74
 	$start = $page * $MAXLIMIT;
74
-	if ($start > 0)
75
-		$start = $start + 1; // Adjust the start range
75
+	if ($start > 0) {
76
+			$start = $start + 1;
77
+	}
78
+	// Adjust the start range
76 79
 	$sql .= sprintf(' ORDER BY vtiger_modtracker_basic.id DESC LIMIT %s,%s', $start, $MAXLIMIT);
77 80
 
78 81
 	$result = $adb->pquery($sql, $params);
Please login to merge, or discard this patch.
include/Webservices/DataTransform.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,8 +24,9 @@  discard block
 block discarded – undo
24 24
 		$fieldColumnMapping = $meta->getFieldColumnMapping();
25 25
 		$columnFieldMapping = array_flip($fieldColumnMapping);
26 26
 		foreach ($row as $col => $val) {
27
-			if (array_key_exists($col, $columnFieldMapping))
28
-				$newRow[$columnFieldMapping[$col]] = $val;
27
+			if (array_key_exists($col, $columnFieldMapping)) {
28
+							$newRow[$columnFieldMapping[$col]] = $val;
29
+			}
29 30
 		}
30 31
 		$newRow = DataTransform::sanitizeData($newRow, $meta, true);
31 32
 		return $newRow;
@@ -149,8 +150,9 @@  discard block
 block discarded – undo
149 150
 		$allFields = $meta->getFieldColumnMapping();
150 151
 		$newRow = [];
151 152
 		foreach ($allFields as $field => $col) {
152
-			if (isset($row[$field]))
153
-				$newRow[$field] = $row[$field];
153
+			if (isset($row[$field])) {
154
+							$newRow[$field] = $row[$field];
155
+			}
154 156
 		}
155 157
 		if (isset($row[$recordString])) {
156 158
 			$newRow[$recordString] = $row[$recordString];
Please login to merge, or discard this patch.
include/Webservices/Query.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,9 @@
 block discarded – undo
21 21
 	// Cache the instance for re-use		
22 22
 	$moduleRegex = "/[fF][rR][Oo][Mm]\s+([^\s;]+)/";
23 23
 	$moduleName = '';
24
-	if (preg_match($moduleRegex, $q, $m))
25
-		$moduleName = trim($m[1]);
24
+	if (preg_match($moduleRegex, $q, $m)) {
25
+			$moduleName = trim($m[1]);
26
+	}
26 27
 
27 28
 	if (!isset($vtws_create_cache[$moduleName]['webserviceobject'])) {
28 29
 		$webserviceObject = VtigerWebserviceObject::fromQuery($adb, $q);
Please login to merge, or discard this patch.