Completed
Pull Request — stable9 (#4226)
by Lukas
11:11
created
lib/private/legacy/l10n.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -169,10 +169,10 @@
 block discarded – undo
169 169
 		$identifier = "_${text_singular}_::_${text_plural}_";
170 170
 		if( array_key_exists($identifier, $this->translations)) {
171 171
 			return new OC_L10N_String( $this, $identifier, $parameters, $count );
172
-		}else{
172
+		} else{
173 173
 			if($count === 1) {
174 174
 				return new OC_L10N_String($this, $text_singular, $parameters, $count);
175
-			}else{
175
+			} else{
176 176
 				return new OC_L10N_String($this, $text_plural, $parameters, $count);
177 177
 			}
178 178
 		}
Please login to merge, or discard this patch.
settings/ajax/setlanguage.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@
 block discarded – undo
38 38
 	if(array_search($lang, $languageCodes) or $lang === 'en') {
39 39
 		\OC::$server->getConfig()->setUserValue( OC_User::getUser(), 'core', 'lang', $lang );
40 40
 		OC_JSON::success(array("data" => array( "message" => $l->t("Language changed") )));
41
-	}else{
41
+	} else{
42 42
 		OC_JSON::error(array("data" => array( "message" => $l->t("Invalid request") )));
43 43
 	}
44
-}else{
44
+} else{
45 45
 	OC_JSON::error(array("data" => array( "message" => $l->t("Invalid request") )));
46 46
 }
Please login to merge, or discard this patch.
settings/ajax/togglegroups.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,15 +71,13 @@
 block discarded – undo
71 71
 	$error = $l->t("Unable to remove user from group %s", $group);
72 72
 	$success = OC_Group::removeFromGroup( $username, $group );
73 73
 	$usersInGroup=OC_Group::usersInGroup($group);
74
-}
75
-else{
74
+} else{
76 75
 	$success = OC_Group::addToGroup( $username, $group );
77 76
 }
78 77
 
79 78
 // Return Success story
80 79
 if( $success ) {
81 80
 	OC_JSON::success(array("data" => array( "username" => $username, "action" => $action, "groupname" => $group )));
82
-}
83
-else{
81
+} else{
84 82
 	OC_JSON::error(array("data" => array( "message" => $error )));
85 83
 }
Please login to merge, or discard this patch.
settings/personal.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,9 +85,9 @@
 block discarded – undo
85 85
 	$potentialName = (string) $l->t('__language_name__');
86 86
 	if($l->getLanguageCode() === $lang && substr($potentialName, 0, 1) !== '_') {//first check if the language name is in the translation file
87 87
 		$ln=array('code'=>$lang, 'name'=> $potentialName);
88
-	}elseif(isset($languageNames[$lang])) {
88
+	} elseif(isset($languageNames[$lang])) {
89 89
 		$ln=array('code'=>$lang, 'name'=>$languageNames[$lang]);
90
-	}else{//fallback to language code
90
+	} else{//fallback to language code
91 91
 		$ln=array('code'=>$lang, 'name'=>$lang);
92 92
 	}
93 93
 
Please login to merge, or discard this patch.
lib/private/archive/zip.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 		$this->path=$source;
43 43
 		$this->zip=new ZipArchive();
44 44
 		if($this->zip->open($source, ZipArchive::CREATE)) {
45
-		}else{
45
+		} else{
46 46
 			OCP\Util::writeLog('files_archive', 'Error while opening archive '.$source, OCP\Util::WARN);
47 47
 		}
48 48
 	}
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	function addFile($path, $source='') {
64 64
 		if($source and $source[0]=='/' and file_exists($source)) {
65 65
 			$result=$this->zip->addFile($source, $path);
66
-		}else{
66
+		} else{
67 67
 			$result=$this->zip->addFromString($path, $source);
68 68
 		}
69 69
 		if($result) {
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 	function remove($path) {
173 173
 		if($this->fileExists($path.'/')) {
174 174
 			return $this->zip->deleteName($path.'/');
175
-		}else{
175
+		} else{
176 176
 			return $this->zip->deleteName($path);
177 177
 		}
178 178
 	}
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 			//in the archive when the stream is closed
192 192
 			if(strrpos($path, '.')!==false) {
193 193
 				$ext=substr($path, strrpos($path, '.'));
194
-			}else{
194
+			} else{
195 195
 				$ext='';
196 196
 			}
197 197
 			$tmpFile=OCP\Files::tmpFile($ext);
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 	private function stripPath($path) {
223 223
 		if(!$path || $path[0]=='/') {
224 224
 			return substr($path, 1);
225
-		}else{
225
+		} else{
226 226
 			return $path;
227 227
 		}
228 228
 	}
Please login to merge, or discard this patch.
lib/private/l10n/string.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@
 block discarded – undo
61 61
 				$fn = $this->l10n->getPluralFormFunction();
62 62
 				$id = $fn($this->count);
63 63
 				$text = $translations[$this->text][$id];
64
-			}
65
-			else{
64
+			} else{
66 65
 				$text = $translations[$this->text];
67 66
 			}
68 67
 		}
Please login to merge, or discard this patch.
lib/private/templatelayout.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 			parent::__construct( 'core', 'layout.user' );
62 62
 			if(in_array(\OC_App::getCurrentApp(), ['settings','admin', 'help']) !== false) {
63 63
 				$this->assign('bodyid', 'body-settings');
64
-			}else{
64
+			} else{
65 65
 				$this->assign('bodyid', 'body-user');
66 66
 			}
67 67
 
Please login to merge, or discard this patch.
lib/private/response.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,13 +51,11 @@  discard block
 block discarded – undo
51 51
 			if ($cache_time > 0) {
52 52
 				self::setExpiresHeader('PT'.$cache_time.'S');
53 53
 				header('Cache-Control: max-age='.$cache_time.', must-revalidate');
54
-			}
55
-			else {
54
+			} else {
56 55
 				self::setExpiresHeader(0);
57 56
 				header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
58 57
 			}
59
-		}
60
-		else {
58
+		} else {
61 59
 			header('Cache-Control: cache');
62 60
 			header('Pragma: cache');
63 61
 		}
@@ -228,8 +226,7 @@  discard block
 block discarded – undo
228 226
 
229 227
 			self::setContentLengthHeader(filesize($filepath));
230 228
 			fpassthru($fp);
231
-		}
232
-		else {
229
+		} else {
233 230
 			self::setStatus(self::STATUS_NOT_FOUND);
234 231
 		}
235 232
 	}
Please login to merge, or discard this patch.
lib/private/appconfig.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -265,7 +265,9 @@
 block discarded – undo
265 265
 	 * Load all the app config values
266 266
 	 */
267 267
 	protected function loadConfigValues() {
268
-		if ($this->configLoaded) return;
268
+		if ($this->configLoaded) {
269
+		    return;
270
+		}
269 271
 
270 272
 		$this->cache = [];
271 273
 
Please login to merge, or discard this patch.