Completed
Pull Request — master (#4617)
by Julius
14:00
created
core/templates/update.admin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 		<p id="update-progress-message-error" class="hidden"></p>
50 50
 		<ul id="update-progress-message-warnings" class="hidden"></ul>
51 51
 		<p id="update-progress-message"></p>
52
-		<a class="update-show-detailed"><?php p($l->t( 'Detailed logs' )); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a>
52
+		<a class="update-show-detailed"><?php p($l->t('Detailed logs')); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a>
53 53
 		<div id="update-progress-detailed" class="hidden"></div>
54 54
 	</div>
55 55
 </div>
Please login to merge, or discard this patch.
core/templates/403.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // @codeCoverageIgnoreStart
3
-if(!isset($_)) {//also provide standalone error page
3
+if (!isset($_)) {//also provide standalone error page
4 4
 	require_once '../../lib/base.php';
5 5
 	
6
-	$tmpl = new OC_Template( '', '403', 'guest' );
6
+	$tmpl = new OC_Template('', '403', 'guest');
7 7
 	$tmpl->printPage();
8 8
 	exit;
9 9
 }
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 ?>
12 12
 <ul>
13 13
 	<li class='error'>
14
-		<?php p($l->t( 'Access forbidden' )); ?><br>
15
-		<p class='hint'><?php if(isset($_['file'])) p($_['file'])?></p>
14
+		<?php p($l->t('Access forbidden')); ?><br>
15
+		<p class='hint'><?php if (isset($_['file'])) p($_['file'])?></p>
16 16
 	</li>
17 17
 </ul>
Please login to merge, or discard this patch.
core/templates/exception.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	<ul>
16 16
 		<li><?php p($l->t('Remote Address: %s', $_['remoteAddr'])) ?></li>
17 17
 		<li><?php p($l->t('Request ID: %s', $_['requestID'])) ?></li>
18
-		<?php if($_['debugMode']): ?>
18
+		<?php if ($_['debugMode']): ?>
19 19
 			<li><?php p($l->t('Type: %s', $_['errorClass'])) ?></li>
20 20
 			<li><?php p($l->t('Code: %s', $_['errorCode'])) ?></li>
21 21
 			<li><?php p($l->t('Message: %s', $_['errorMsg'])) ?></li>
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		<?php endif; ?>
25 25
 	</ul>
26 26
 
27
-	<?php if($_['debugMode']): ?>
27
+	<?php if ($_['debugMode']): ?>
28 28
 		<br />
29 29
 		<h2><strong><?php p($l->t('Trace')) ?></strong></h2>
30 30
 		<pre><?php p($_['trace']) ?></pre>
Please login to merge, or discard this patch.
core/ajax/update.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 // need to send an initial message to force-init the event source,
39 39
 // which will then trigger its own CSRF check and produces its own CSRF error
40 40
 // message
41
-$eventSource->send('success', (string)$l->t('Preparing update'));
41
+$eventSource->send('success', (string) $l->t('Preparing update'));
42 42
 
43 43
 class FeedBackHandler {
44 44
 	/** @var integer */
@@ -70,21 +70,21 @@  discard block
 block discarded – undo
70 70
 				if (empty($desc)) {
71 71
 					$desc = $this->currentStep;
72 72
 				}
73
-				$this->eventSource->send('success', (string)$this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $desc]));
73
+				$this->eventSource->send('success', (string) $this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $desc]));
74 74
 				break;
75 75
 			case '\OC\Repair::finishProgress':
76 76
 				$this->progressStateMax = $this->progressStateStep;
77
-				$this->eventSource->send('success', (string)$this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $this->currentStep]));
77
+				$this->eventSource->send('success', (string) $this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $this->currentStep]));
78 78
 				break;
79 79
 			case '\OC\Repair::step':
80 80
 				break;
81 81
 			case '\OC\Repair::info':
82 82
 				break;
83 83
 			case '\OC\Repair::warning':
84
-				$this->eventSource->send('notice', (string)$this->l10n->t('Repair warning: ') . $event->getArgument(0));
84
+				$this->eventSource->send('notice', (string) $this->l10n->t('Repair warning: ').$event->getArgument(0));
85 85
 				break;
86 86
 			case '\OC\Repair::error':
87
-				$this->eventSource->send('notice', (string)$this->l10n->t('Repair error: ') . $event->getArgument(0));
87
+				$this->eventSource->send('notice', (string) $this->l10n->t('Repair error: ').$event->getArgument(0));
88 88
 				break;
89 89
 		}
90 90
 	}
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
 	$config = \OC::$server->getSystemConfig();
96 96
 	if ($config->getValue('upgrade.disable-web', false)) {
97
-		$eventSource->send('failure', (string)$l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
97
+		$eventSource->send('failure', (string) $l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
98 98
 		$eventSource->close();
99 99
 		exit();
100 100
 	}
@@ -116,12 +116,12 @@  discard block
 block discarded – undo
116 116
 	$dispatcher = \OC::$server->getEventDispatcher();
117 117
 	$dispatcher->addListener('\OC\DB\Migrator::executeSql', function($event) use ($eventSource, $l) {
118 118
 		if ($event instanceof GenericEvent) {
119
-			$eventSource->send('success', (string)$l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()]));
119
+			$eventSource->send('success', (string) $l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()]));
120 120
 		}
121 121
 	});
122 122
 	$dispatcher->addListener('\OC\DB\Migrator::checkTable', function($event) use ($eventSource, $l) {
123 123
 		if ($event instanceof GenericEvent) {
124
-			$eventSource->send('success', (string)$l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()]));
124
+			$eventSource->send('success', (string) $l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()]));
125 125
 		}
126 126
 	});
127 127
 	$feedBack = new FeedBackHandler($eventSource, $l);
@@ -133,67 +133,67 @@  discard block
 block discarded – undo
133 133
 	$dispatcher->addListener('\OC\Repair::warning', [$feedBack, 'handleRepairFeedback']);
134 134
 	$dispatcher->addListener('\OC\Repair::error', [$feedBack, 'handleRepairFeedback']);
135 135
 
136
-	$updater->listen('\OC\Updater', 'maintenanceEnabled', function () use ($eventSource, $l) {
137
-		$eventSource->send('success', (string)$l->t('Turned on maintenance mode'));
136
+	$updater->listen('\OC\Updater', 'maintenanceEnabled', function() use ($eventSource, $l) {
137
+		$eventSource->send('success', (string) $l->t('Turned on maintenance mode'));
138 138
 	});
139
-	$updater->listen('\OC\Updater', 'maintenanceDisabled', function () use ($eventSource, $l) {
140
-		$eventSource->send('success', (string)$l->t('Turned off maintenance mode'));
139
+	$updater->listen('\OC\Updater', 'maintenanceDisabled', function() use ($eventSource, $l) {
140
+		$eventSource->send('success', (string) $l->t('Turned off maintenance mode'));
141 141
 	});
142
-	$updater->listen('\OC\Updater', 'maintenanceActive', function () use ($eventSource, $l) {
143
-		$eventSource->send('success', (string)$l->t('Maintenance mode is kept active'));
142
+	$updater->listen('\OC\Updater', 'maintenanceActive', function() use ($eventSource, $l) {
143
+		$eventSource->send('success', (string) $l->t('Maintenance mode is kept active'));
144 144
 	});
145
-	$updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use($eventSource, $l) {
146
-		$eventSource->send('success', (string)$l->t('Updating database schema'));
145
+	$updater->listen('\OC\Updater', 'dbUpgradeBefore', function() use($eventSource, $l) {
146
+		$eventSource->send('success', (string) $l->t('Updating database schema'));
147 147
 	});
148
-	$updater->listen('\OC\Updater', 'dbUpgrade', function () use ($eventSource, $l) {
149
-		$eventSource->send('success', (string)$l->t('Updated database'));
148
+	$updater->listen('\OC\Updater', 'dbUpgrade', function() use ($eventSource, $l) {
149
+		$eventSource->send('success', (string) $l->t('Updated database'));
150 150
 	});
151
-	$updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($eventSource, $l) {
152
-		$eventSource->send('success', (string)$l->t('Checking whether the database schema can be updated (this can take a long time depending on the database size)'));
151
+	$updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function() use($eventSource, $l) {
152
+		$eventSource->send('success', (string) $l->t('Checking whether the database schema can be updated (this can take a long time depending on the database size)'));
153 153
 	});
154
-	$updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use ($eventSource, $l) {
155
-		$eventSource->send('success', (string)$l->t('Checked database schema update'));
154
+	$updater->listen('\OC\Updater', 'dbSimulateUpgrade', function() use ($eventSource, $l) {
155
+		$eventSource->send('success', (string) $l->t('Checked database schema update'));
156 156
 	});
157
-	$updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($eventSource, $l) {
158
-		$eventSource->send('success', (string)$l->t('Checking updates of apps'));
157
+	$updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function() use ($eventSource, $l) {
158
+		$eventSource->send('success', (string) $l->t('Checking updates of apps'));
159 159
 	});
160
-	$updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($eventSource, $l) {
161
-		$eventSource->send('success', (string)$l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app]));
160
+	$updater->listen('\OC\Updater', 'appSimulateUpdate', function($app) use ($eventSource, $l) {
161
+		$eventSource->send('success', (string) $l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app]));
162 162
 	});
163
-	$updater->listen('\OC\Updater', 'appUpgradeCheck', function () use ($eventSource, $l) {
164
-		$eventSource->send('success', (string)$l->t('Checked database schema update for apps'));
163
+	$updater->listen('\OC\Updater', 'appUpgradeCheck', function() use ($eventSource, $l) {
164
+		$eventSource->send('success', (string) $l->t('Checked database schema update for apps'));
165 165
 	});
166
-	$updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($eventSource, $l) {
167
-		$eventSource->send('success', (string)$l->t('Updated "%s" to %s', array($app, $version)));
166
+	$updater->listen('\OC\Updater', 'appUpgrade', function($app, $version) use ($eventSource, $l) {
167
+		$eventSource->send('success', (string) $l->t('Updated "%s" to %s', array($app, $version)));
168 168
 	});
169
-	$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use (&$incompatibleApps) {
170
-		$incompatibleApps[]= $app;
169
+	$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function($app) use (&$incompatibleApps) {
170
+		$incompatibleApps[] = $app;
171 171
 	});
172
-	$updater->listen('\OC\Updater', 'thirdPartyAppDisabled', function ($app) use (&$disabledThirdPartyApps) {
173
-		$disabledThirdPartyApps[]= $app;
172
+	$updater->listen('\OC\Updater', 'thirdPartyAppDisabled', function($app) use (&$disabledThirdPartyApps) {
173
+		$disabledThirdPartyApps[] = $app;
174 174
 	});
175
-	$updater->listen('\OC\Updater', 'failure', function ($message) use ($eventSource, $config) {
175
+	$updater->listen('\OC\Updater', 'failure', function($message) use ($eventSource, $config) {
176 176
 		$eventSource->send('failure', $message);
177 177
 		$eventSource->close();
178 178
 		$config->setSystemValue('maintenance', false);
179 179
 	});
180
-	$updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) {
181
-		$eventSource->send('success', (string)$l->t('Set log level to debug'));
180
+	$updater->listen('\OC\Updater', 'setDebugLogLevel', function($logLevel, $logLevelName) use($eventSource, $l) {
181
+		$eventSource->send('success', (string) $l->t('Set log level to debug'));
182 182
 	});
183
-	$updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) {
184
-		$eventSource->send('success', (string)$l->t('Reset log level'));
183
+	$updater->listen('\OC\Updater', 'resetLogLevel', function($logLevel, $logLevelName) use($eventSource, $l) {
184
+		$eventSource->send('success', (string) $l->t('Reset log level'));
185 185
 	});
186
-	$updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use($eventSource, $l) {
187
-		$eventSource->send('success', (string)$l->t('Starting code integrity check'));
186
+	$updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function() use($eventSource, $l) {
187
+		$eventSource->send('success', (string) $l->t('Starting code integrity check'));
188 188
 	});
189
-	$updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use($eventSource, $l) {
190
-		$eventSource->send('success', (string)$l->t('Finished code integrity check'));
189
+	$updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function() use($eventSource, $l) {
190
+		$eventSource->send('success', (string) $l->t('Finished code integrity check'));
191 191
 	});
192 192
 
193 193
 	try {
194 194
 		$updater->upgrade();
195 195
 	} catch (\Exception $e) {
196
-		$eventSource->send('failure', get_class($e) . ': ' . $e->getMessage());
196
+		$eventSource->send('failure', get_class($e).': '.$e->getMessage());
197 197
 		$eventSource->close();
198 198
 		exit();
199 199
 	}
@@ -208,10 +208,10 @@  discard block
 block discarded – undo
208 208
 
209 209
 	if (!empty($disabledApps)) {
210 210
 		$eventSource->send('notice',
211
-			(string)$l->t('Following apps have been disabled: %s', implode(', ', $disabledApps)));
211
+			(string) $l->t('Following apps have been disabled: %s', implode(', ', $disabledApps)));
212 212
 	}
213 213
 } else {
214
-	$eventSource->send('notice', (string)$l->t('Already up to date'));
214
+	$eventSource->send('notice', (string) $l->t('Already up to date'));
215 215
 }
216 216
 
217 217
 $eventSource->send('done', '');
Please login to merge, or discard this patch.
core/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,6 +101,6 @@
 block discarded – undo
101 101
 });
102 102
 
103 103
 // used for heartbeat
104
-$this->create('heartbeat', '/heartbeat')->action(function(){
104
+$this->create('heartbeat', '/heartbeat')->action(function() {
105 105
 	// do nothing
106 106
 });
Please login to merge, or discard this patch.
core/search/ajax/search.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,16 +44,16 @@
 block discarded – undo
44 44
 	$inApps = array();
45 45
 }
46 46
 if (isset($_GET['page'])) {
47
-	$page = (int)$_GET['page'];
47
+	$page = (int) $_GET['page'];
48 48
 } else {
49 49
 	$page = 1;
50 50
 }
51 51
 if (isset($_GET['size'])) {
52
-	$size = (int)$_GET['size'];
52
+	$size = (int) $_GET['size'];
53 53
 } else {
54 54
 	$size = 30;
55 55
 }
56
-if($query) {
56
+if ($query) {
57 57
 	$result = \OC::$server->getSearch()->searchPaged($query, $inApps, $page, $size);
58 58
 	OC_JSON::encodedPrint($result);
59 59
 }
Please login to merge, or discard this patch.
core/Controller/OCSController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@
 block discarded – undo
137 137
 	public function getIdentityProof($cloudId) {
138 138
 		$userObject = $this->userManager->get($cloudId);
139 139
 
140
-		if($userObject !== null) {
140
+		if ($userObject !== null) {
141 141
 			$key = $this->keyManager->getKey($userObject);
142 142
 			$data = [
143 143
 				'public' => $key->getPublic(),
Please login to merge, or discard this patch.
core/Controller/AvatarController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 			if (!($node instanceof File)) {
178 178
 				return new JSONResponse(['data' => ['message' => $this->l->t('Please select a file.')]]);
179 179
 			}
180
-			if ($node->getSize() > 20*1024*1024) {
180
+			if ($node->getSize() > 20 * 1024 * 1024) {
181 181
 				return new JSONResponse(
182 182
 					['data' => ['message' => $this->l->t('File is too big')]],
183 183
 					Http::STATUS_BAD_REQUEST
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 				 is_uploaded_file($files['tmp_name'][0]) &&
206 206
 				!\OC\Files\Filesystem::isFileBlacklisted($files['tmp_name'][0])
207 207
 			) {
208
-				if ($files['size'][0] > 20*1024*1024) {
208
+				if ($files['size'][0] > 20 * 1024 * 1024) {
209 209
 					return new JSONResponse(
210 210
 						['data' => ['message' => $this->l->t('File is too big')]],
211 211
 						Http::STATUS_BAD_REQUEST
Please login to merge, or discard this patch.
core/Controller/SetupController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,12 +60,12 @@  discard block
 block discarded – undo
60 60
 			$post['dbpass'] = $post['dbpassword'];
61 61
 		}
62 62
 
63
-		if(isset($post['install']) AND $post['install']=='true') {
63
+		if (isset($post['install']) AND $post['install'] == 'true') {
64 64
 			// We have to launch the installation process :
65 65
 			$e = $this->setupHelper->install($post);
66 66
 			$errors = array('errors' => $e);
67 67
 
68
-			if(count($e) > 0) {
68
+			if (count($e) > 0) {
69 69
 				$options = array_merge($opts, $post, $errors);
70 70
 				$this->display($options);
71 71
 			} else {
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	}
98 98
 
99 99
 	public function finishSetup() {
100
-		if( file_exists( $this->autoConfigFile )) {
100
+		if (file_exists($this->autoConfigFile)) {
101 101
 			unlink($this->autoConfigFile);
102 102
 		}
103 103
 		\OC::$server->getIntegrityCodeChecker()->runInstanceVerification();
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
 	}
106 106
 
107 107
 	public function loadAutoConfig($post) {
108
-		if( file_exists($this->autoConfigFile)) {
108
+		if (file_exists($this->autoConfigFile)) {
109 109
 			\OCP\Util::writeLog('core', 'Autoconfig file found, setting up ownCloud…', \OCP\Util::INFO);
110 110
 			$AUTOCONFIG = array();
111 111
 			include $this->autoConfigFile;
112
-			$post = array_merge ($post, $AUTOCONFIG);
112
+			$post = array_merge($post, $AUTOCONFIG);
113 113
 		}
114 114
 
115 115
 		$dbIsSet = isset($post['dbtype']);
Please login to merge, or discard this patch.