Completed
Pull Request — stable9 (#4226)
by Lukas
11:11
created
lib/private/setup/postgresql.php 1 patch
Braces   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,9 +50,10 @@  discard block
 block discarded – undo
50 50
 			$connection_string = "host='$e_host' dbname='$e_dbname' user='$e_user' port='$port' password='$e_password'";
51 51
 			$connection = @pg_connect($connection_string);
52 52
 
53
-			if(!$connection)
54
-				throw new \OC\DatabaseSetupException($this->trans->t('PostgreSQL username and/or password not valid'),
53
+			if(!$connection) {
54
+							throw new \OC\DatabaseSetupException($this->trans->t('PostgreSQL username and/or password not valid'),
55 55
 						$this->trans->t('You need to enter either an existing account or the administrator.'));
56
+			}
56 57
 		}
57 58
 		$e_user = pg_escape_string($this->dbUser);
58 59
 		//check for roles creation rights in postgresql
@@ -132,8 +133,7 @@  discard block
 block discarded – undo
132 133
 				$entry = $this->trans->t('DB Error: "%s"', array(pg_last_error($connection))) . '<br />';
133 134
 				$entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />';
134 135
 				\OCP\Util::writeLog('setup.pg', $entry, \OCP\Util::WARN);
135
-			}
136
-			else {
136
+			} else {
137 137
 				$query = "REVOKE ALL PRIVILEGES ON DATABASE \"$e_name\" FROM PUBLIC";
138 138
 				pg_query($connection, $query);
139 139
 			}
@@ -160,8 +160,7 @@  discard block
 block discarded – undo
160 160
 				$entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />';
161 161
 				\OCP\Util::writeLog('setup.pg', $entry, \OCP\Util::WARN);
162 162
 			}
163
-		}
164
-		else { // change password of the existing role
163
+		} else { // change password of the existing role
165 164
 			$query = "ALTER ROLE \"$e_name\" WITH PASSWORD '$e_password';";
166 165
 			$result = pg_query($connection, $query);
167 166
 			if(!$result) {
Please login to merge, or discard this patch.
core/command/config/system/deleteconfig.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,8 +74,7 @@
 block discarded – undo
74 74
 
75 75
 			try {
76 76
 				$value = $this->removeSubValue(array_slice($configNames, 1), $value, $input->hasParameterOption('--error-if-not-exists'));
77
-			}
78
-			catch (\UnexpectedValueException $e) {
77
+			} catch (\UnexpectedValueException $e) {
79 78
 				$output->writeln('<error>System config ' . implode(' => ', $configNames) . ' could not be deleted because it did not exist</error>');
80 79
 				return 1;
81 80
 			}
Please login to merge, or discard this patch.
apps/files_sharing/api/share20ocs.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -399,7 +399,7 @@
 block discarded – undo
399 399
 		} catch (GenericShareException $e) {
400 400
 			$code = $e->getCode() === 0 ? 403 : $e->getCode();
401 401
 			return new \OC_OCS_Result(null, $code, $e->getHint());
402
-		}catch (\Exception $e) {
402
+		} catch (\Exception $e) {
403 403
 			return new \OC_OCS_Result(null, 403, $e->getMessage());
404 404
 		}
405 405
 
Please login to merge, or discard this patch.
apps/files_sharing/lib/helper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -158,8 +158,7 @@
 block discarded – undo
158 158
 				return false;
159 159
 			}
160 160
 
161
-		}
162
-		else {
161
+		} else {
163 162
 			// not authenticated ?
164 163
 			if ( ! \OC::$server->getSession()->exists('public_link_authenticated')
165 164
 				|| \OC::$server->getSession()->get('public_link_authenticated') !== (string)$linkItem['id']) {
Please login to merge, or discard this patch.
apps/files_sharing/templates/public.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,17 +105,23 @@
 block discarded – undo
105 105
 		<div id="preview">
106 106
 			<?php if (isset($_['folder'])): ?>
107 107
 				<?php print_unescaped($_['folder']); ?>
108
-			<?php else: ?>
108
+			<?php else {
109
+    : ?>
109 110
 				<?php if ($_['previewEnabled'] && substr($_['mimetype'], 0, strpos($_['mimetype'], '/')) == 'video'): ?>
110 111
 					<div id="imgframe">
111
-						<video tabindex="0" controls="" preload="none" style="max-width: <?php p($_['previewMaxX']); ?>px; max-height: <?php p($_['previewMaxY']); ?>px">
112
+						<video tabindex="0" controls="" preload="none" style="max-width: <?php p($_['previewMaxX']);
113
+}
114
+?>px; max-height: <?php p($_['previewMaxY']); ?>px">
112 115
 							<source src="<?php p($_['downloadURL']); ?>" type="<?php p($_['mimetype']); ?>" />
113 116
 						</video>
114 117
 					</div>
115
-				<?php else: ?>
118
+				<?php else {
119
+    : ?>
116 120
 					<!-- Preview frame is filled via JS to support SVG images for modern browsers -->
117 121
 					<div id="imgframe"></div>
118
-				<?php endif; ?>
122
+				<?php endif;
123
+}
124
+?>
119 125
 				<div class="directDownload">
120 126
 					<a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
121 127
 						<img class="svg" alt="" src="<?php print_unescaped(image_path("core", "actions/download.svg")); ?>"/>
Please login to merge, or discard this patch.
apps/files_sharing/templates/settings-admin.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,10 @@  discard block
 block discarded – undo
12 12
 
13 13
 	<p>
14 14
 		<input type="checkbox" name="outgoing_server2server_share_enabled" id="outgoingServer2serverShareEnabled" class="checkbox"
15
-			   value="1" <?php if ($_['outgoingServer2serverShareEnabled']) print_unescaped('checked="checked"'); ?> />
15
+			   value="1" <?php if ($_['outgoingServer2serverShareEnabled']) {
16
+    print_unescaped('checked="checked"');
17
+}
18
+?> />
16 19
 		<label for="outgoingServer2serverShareEnabled">
17 20
 			<?php p($l->t('Allow users on this server to send shares to other servers'));?>
18 21
 		</label>
@@ -20,7 +23,10 @@  discard block
 block discarded – undo
20 23
 
21 24
 	<p>
22 25
 		<input type="checkbox" name="incoming_server2server_share_enabled" id="incomingServer2serverShareEnabled" class="checkbox"
23
-			   value="1" <?php if ($_['incomingServer2serverShareEnabled']) print_unescaped('checked="checked"'); ?> />
26
+			   value="1" <?php if ($_['incomingServer2serverShareEnabled']) {
27
+    print_unescaped('checked="checked"');
28
+}
29
+?> />
24 30
 		<label for="incomingServer2serverShareEnabled">
25 31
 			<?php p($l->t('Allow users on this server to receive shares from other servers'));?>
26 32
 		</label><br/>
Please login to merge, or discard this patch.
apps/files/lib/helper.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
 			} elseif ($file->isMounted()) {
76 76
 				$icon = \OC::$server->getMimeTypeDetector()->mimeTypeIcon('dir-external');
77 77
 			}
78
-		}else{
78
+		} else{
79 79
 			$icon = \OC::$server->getMimeTypeDetector()->mimeTypeIcon($file->getMimetype());
80 80
 		}
81 81
 
Please login to merge, or discard this patch.
apps/files/templates/admin.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,10 @@
 block discarded – undo
12 12
 			<input type="submit" name="submitFilesAdminSettings" id="submitFilesAdminSettings"
13 13
 				   value="<?php p($l->t( 'Save' )); ?>"/>
14 14
 			<p><em><?php p($l->t('With PHP-FPM it might take 5 minutes for changes to be applied.')); ?></em></p>
15
-		<?php else: ?>
16
-			<p><em><?php p($l->t('Missing permissions to edit from here.')); ?></em></p>
15
+		<?php else {
16
+    : ?>
17
+			<p><em><?php p($l->t('Missing permissions to edit from here.'));
18
+}
19
+?></em></p>
17 20
 		<?php endif; ?>
18 21
 	</form>
Please login to merge, or discard this patch.
apps/files_external/lib/owncloud.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,8 +62,7 @@
 block discarded – undo
62 62
 			if (substr($root, 0, 1) !== '/'){
63 63
 				$root = '/' . $root;
64 64
 			}
65
-		}
66
-		else{
65
+		} else{
67 66
 			$root = '/';
68 67
 		}
69 68
 
Please login to merge, or discard this patch.