Completed
Pull Request — master (#9224)
by Jan-Christoph
38:54 queued 20:20
created
apps/files_external/templates/settings.php 1 patch
Braces   +24 added lines, -6 removed lines patch added patch discarded remove patch
@@ -94,7 +94,10 @@  discard block
 block discarded – undo
94 94
 
95 95
 <form data-can-create="<?php echo $canCreateMounts?'true':'false' ?>" id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled']?'true': 'false'; ?>">
96 96
 	<h2 data-anchor-name="external-storage"><?php p($l->t('External storages')); ?></h2>
97
-	<?php if (isset($_['dependencies']) and ($_['dependencies'] !== '') and $canCreateMounts) print_unescaped(''.$_['dependencies'].''); ?>
97
+	<?php if (isset($_['dependencies']) and ($_['dependencies'] !== '') and $canCreateMounts) {
98
+    print_unescaped(''.$_['dependencies'].'');
99
+}
100
+?>
98 101
 	<table id="externalStorage" class="grid" data-admin='<?php print_unescaped(json_encode($_['visibilityType'] === BackendService::VISIBILITY_ADMIN)); ?>'>
99 102
 		<thead>
100 103
 			<tr>
@@ -103,7 +106,10 @@  discard block
 block discarded – undo
103 106
 				<th><?php p($l->t('External storage')); ?></th>
104 107
 				<th><?php p($l->t('Authentication')); ?></th>
105 108
 				<th><?php p($l->t('Configuration')); ?></th>
106
-				<?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN) print_unescaped('<th>'.$l->t('Available for').'</th>'); ?>
109
+				<?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN) {
110
+    print_unescaped('<th>'.$l->t('Available for').'</th>');
111
+}
112
+?>
107 113
 				<th>&nbsp;</th>
108 114
 				<th>&nbsp;</th>
109 115
 				<th>&nbsp;</th>
@@ -136,7 +142,10 @@  discard block
 block discarded – undo
136 142
 							});
137 143
 						?>
138 144
 						<?php foreach ($sortedBackends as $backend): ?>
139
-							<?php if ($backend->getDeprecateTo()) continue; // ignore deprecated backends ?>
145
+							<?php if ($backend->getDeprecateTo()) {
146
+    continue;
147
+}
148
+// ignore deprecated backends ?>
140 149
 							<option value="<?php p($backend->getIdentifier()); ?>"><?php p($backend->getText()); ?></option>
141 150
 						<?php endforeach; ?>
142 151
 					</select>
@@ -164,7 +173,10 @@  discard block
 block discarded – undo
164 173
 
165 174
 	<?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN): ?>
166 175
 		<input type="checkbox" name="allowUserMounting" id="allowUserMounting" class="checkbox"
167
-			value="1" <?php if ($_['allowUserMounting']) print_unescaped(' checked="checked"'); ?> />
176
+			value="1" <?php if ($_['allowUserMounting']) {
177
+    print_unescaped(' checked="checked"');
178
+}
179
+?> />
168 180
 		<label for="allowUserMounting"><?php p($l->t('Allow users to mount external storage')); ?></label> <span id="userMountingMsg" class="msg"></span>
169 181
 
170 182
 		<p id="userMountingBackends"<?php if (!$_['allowUserMounting']): ?> class="hidden"<?php endif; ?>>
@@ -177,8 +189,14 @@  discard block
 block discarded – undo
177 189
 			<?php $i = 0; foreach ($userBackends as $backend): ?>
178 190
 				<?php if ($deprecateTo = $backend->getDeprecateTo()): ?>
179 191
 					<input type="hidden" id="allowUserMountingBackends<?php p($i); ?>" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" data-deprecate-to="<?php p($deprecateTo->getIdentifier()); ?>" />
180
-				<?php else: ?>
181
-					<input type="checkbox" id="allowUserMountingBackends<?php p($i); ?>" class="checkbox" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" <?php if ($backend->isVisibleFor(BackendService::VISIBILITY_PERSONAL)) print_unescaped(' checked="checked"'); ?> />
192
+				<?php else {
193
+    : ?>
194
+					<input type="checkbox" id="allowUserMountingBackends<?php p($i);
195
+}
196
+?>" class="checkbox" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" <?php if ($backend->isVisibleFor(BackendService::VISIBILITY_PERSONAL)) {
197
+    print_unescaped(' checked="checked"');
198
+}
199
+?> />
182 200
 					<label for="allowUserMountingBackends<?php p($i); ?>"><?php p($backend->getText()); ?></label> <br />
183 201
 				<?php endif; ?>
184 202
 				<?php $i++; ?>
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
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 		$this->path=$source;
47 47
 		$this->zip=new \ZipArchive();
48 48
 		if($this->zip->open($source, \ZipArchive::CREATE)) {
49
-		}else{
49
+		} else{
50 50
 			\OCP\Util::writeLog('files_archive', 'Error while opening archive '.$source, \OCP\Util::WARN);
51 51
 		}
52 52
 	}
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	public function addFile($path, $source='') {
68 68
 		if($source and $source[0]=='/' and file_exists($source)) {
69 69
 			$result=$this->zip->addFile($source, $path);
70
-		}else{
70
+		} else{
71 71
 			$result=$this->zip->addFromString($path, $source);
72 72
 		}
73 73
 		if($result) {
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	public function remove($path) {
177 177
 		if($this->fileExists($path.'/')) {
178 178
 			return $this->zip->deleteName($path.'/');
179
-		}else{
179
+		} else{
180 180
 			return $this->zip->deleteName($path);
181 181
 		}
182 182
 	}
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 			//in the archive when the stream is closed
196 196
 			if(strrpos($path, '.')!==false) {
197 197
 				$ext=substr($path, strrpos($path, '.'));
198
-			}else{
198
+			} else{
199 199
 				$ext='';
200 200
 			}
201 201
 			$tmpFile = \OC::$server->getTempManager()->getTemporaryFile($ext);
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 	private function stripPath($path) {
225 225
 		if(!$path || $path[0]=='/') {
226 226
 			return substr($path, 1);
227
-		}else{
227
+		} else{
228 228
 			return $path;
229 229
 		}
230 230
 	}
Please login to merge, or discard this patch.
apps/files_versions/ajax/rollbackVersion.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 
36 36
 if(OCA\Files_Versions\Storage::rollback( $file, $revision )) {
37 37
 	\OC_JSON::success(array("data" => array( "revision" => $revision, "file" => $file )));
38
-}else{
38
+} else{
39 39
 	$l = \OC::$server->getL10N('files_versions');
40 40
 	\OC_JSON::error(array("data" => array( "message" => $l->t("Could not revert: %s", array($file) ))));
41 41
 }
Please login to merge, or discard this patch.
apps/provisioning_api/lib/Controller/UsersController.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -479,7 +479,7 @@
 block discarded – undo
479 479
 					}
480 480
 					if ($quota === 0) {
481 481
 						$quota = 'default';
482
-					}else if ($quota === -1) {
482
+					} else if ($quota === -1) {
483 483
 						$quota = 'none';
484 484
 					} else {
485 485
 						$quota = \OCP\Util::humanFileSize($quota);
Please login to merge, or discard this patch.