Completed
Pull Request — master (#3813)
by Maxence
55:24
created
apps/updatenotification/templates/admin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	$currentChannel = $_['currentChannel'];
15 15
 ?>
16 16
 <form id="oca_updatenotification_section" class="followupsection">
17
-	<?php if($isNewVersionAvailable === true) { ?>
17
+	<?php if ($isNewVersionAvailable === true) { ?>
18 18
 		<strong><?php p($l->t('A new version is available: %s', [$newVersionString])); ?></strong>
19 19
 		<?php if ($_['updaterEnabled']) { ?>
20 20
 			<input type="button" id="oca_updatenotification_button" value="<?php p($l->t('Open updater')) ?>">
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 		<label for="release-channel"><?php p($l->t('Update channel:')) ?></label>
32 32
 		<select id="release-channel">
33 33
 			<option value="<?php p($currentChannel); ?>"><?php p($currentChannel); ?></option>
34
-			<?php foreach ($channels as $channel => $channelTitle){ ?>
34
+			<?php foreach ($channels as $channel => $channelTitle) { ?>
35 35
 				<option value="<?php p($channelTitle) ?>">
36 36
 					<?php p($channelTitle) ?>
37 37
 				</option>
Please login to merge, or discard this patch.
apps/updatenotification/lib/Notification/Notifier.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 			$notification->setParsedSubject($l->t('Update to %1$s is available.', [$parameters['version']]));
92 92
 
93 93
 			if ($this->isAdmin()) {
94
-				$notification->setLink($this->url->linkToRouteAbsolute('settings.AdminSettings.index') . '#updater');
94
+				$notification->setLink($this->url->linkToRouteAbsolute('settings.AdminSettings.index').'#updater');
95 95
 			}
96 96
 		} else {
97 97
 			$appInfo = $this->getAppInfo($notification->getObjectType());
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 				]);
112 112
 
113 113
 			if ($this->isAdmin()) {
114
-				$notification->setLink($this->url->linkToRouteAbsolute('settings.AppSettings.viewApps') . '#app-' . $notification->getObjectType());
114
+				$notification->setLink($this->url->linkToRouteAbsolute('settings.AppSettings.viewApps').'#app-'.$notification->getObjectType());
115 115
 			}
116 116
 		}
117 117
 
Please login to merge, or discard this patch.
apps/updatenotification/lib/Controller/AdminController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 		$currentChannel = \OCP\Util::getChannel();
100 100
 
101 101
 		// Remove the currently used channel from the channels list
102
-		if(($key = array_search($currentChannel, $channels)) !== false) {
102
+		if (($key = array_search($currentChannel, $channels)) !== false) {
103 103
 			unset($channels[$key]);
104 104
 		}
105 105
 		$updateState = $this->updateChecker->getUpdateState();
Please login to merge, or discard this patch.
apps/updatenotification/lib/UpdateChecker.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
 		$data = $this->updater->check();
44 44
 		$result = [];
45 45
 
46
-		if(isset($data['version']) && $data['version'] !== '' && $data['version'] !== []) {
46
+		if (isset($data['version']) && $data['version'] !== '' && $data['version'] !== []) {
47 47
 			$result['updateAvailable'] = true;
48 48
 			$result['updateVersion'] = $data['versionstring'];
49 49
 			$result['updaterEnabled'] = $data['autoupdater'] === '1';
50
-			if(substr($data['web'], 0, 8) === 'https://') {
50
+			if (substr($data['web'], 0, 8) === 'https://') {
51 51
 				$result['updateLink'] = $data['web'];
52 52
 			}
53
-			if(substr($data['url'], 0, 8) === 'https://') {
53
+			if (substr($data['url'], 0, 8) === 'https://') {
54 54
 				$result['downloadLink'] = $data['url'];
55 55
 			}
56 56
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 * @param array $data
65 65
 	 */
66 66
 	public function getJavaScript(array $data) {
67
-		$data['array']['oc_updateState'] =  json_encode([
67
+		$data['array']['oc_updateState'] = json_encode([
68 68
 			'updateAvailable' => true,
69 69
 			'updateVersion' => $this->getUpdateState()['updateVersion'],
70 70
 			'updateLink' => isset($this->getUpdateState()['updateLink']) ? $this->getUpdateState()['updateLink'] : '',
Please login to merge, or discard this patch.
apps/updatenotification/lib/AppInfo/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 use OCP\AppFramework\IAppContainer;
31 31
 
32 32
 class Application extends App {
33
-	public function __construct (array $urlParams = array()) {
33
+	public function __construct(array $urlParams = array()) {
34 34
 		parent::__construct('updatenotification', $urlParams);
35 35
 		$container = $this->getContainer();
36 36
 
Please login to merge, or discard this patch.
apps/updatenotification/lib/ResetTokenBackgroundJob.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 	 */
70 70
 	protected function run($argument) {
71 71
 		// Delete old tokens after 2 days
72
-		if($this->timeFactory->getTime() - $this->config->getAppValue('core', 'updater.secret.created', $this->timeFactory->getTime()) >= 172800) {
72
+		if ($this->timeFactory->getTime() - $this->config->getAppValue('core', 'updater.secret.created', $this->timeFactory->getTime()) >= 172800) {
73 73
 			$this->config->deleteSystemValue('updater.secret');
74 74
 		}
75 75
 	}
Please login to merge, or discard this patch.
apps/updatenotification/appinfo/app.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  *
23 23
  */
24 24
 
25
-if(\OC::$server->getConfig()->getSystemValue('updatechecker', true) === true) {
25
+if (\OC::$server->getConfig()->getSystemValue('updatechecker', true) === true) {
26 26
 	$updater = new \OC\Updater\VersionCheck(
27 27
 		\OC::$server->getHTTPClientService(),
28 28
 		\OC::$server->getConfig()
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
 	);
33 33
 
34 34
 	$userObject = \OC::$server->getUserSession()->getUser();
35
-	if($userObject !== null) {
36
-		if(\OC::$server->getGroupManager()->isAdmin($userObject->getUID()) &&
35
+	if ($userObject !== null) {
36
+		if (\OC::$server->getGroupManager()->isAdmin($userObject->getUID()) &&
37 37
 			!\OC::$server->getAppManager()->isEnabledForUser('notifications')) {
38
-			if($updateChecker->getUpdateState() !== []) {
38
+			if ($updateChecker->getUpdateState() !== []) {
39 39
 				\OCP\Util::addScript('updatenotification', 'notification');
40 40
 				OC_Hook::connect('\OCP\Config', 'js', $updateChecker, 'getJavaScript');
41 41
 			}
Please login to merge, or discard this patch.
apps/theming/templates/settings-admin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 		</form>
82 82
 	</div>
83 83
 
84
-	<div id="theming-preview" style="background-color:<?php p($_['color']);?>; background-image:url(<?php p($_['background']); ?>);">
84
+	<div id="theming-preview" style="background-color:<?php p($_['color']); ?>; background-image:url(<?php p($_['background']); ?>);">
85 85
 		<img src="<?php p($_['logo']); ?>" id="theming-preview-logo" />
86 86
 	</div>
87 87
 	<?php } ?>
Please login to merge, or discard this patch.
apps/theming/lib/ThemingDefaults.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
 
107 107
 	public function getShortFooter() {
108 108
 		$slogan = $this->getSlogan();
109
-		$footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' .
110
-			' rel="noreferrer">' .$this->getEntity() . '</a>'.
111
-			($slogan !== '' ? ' – ' . $slogan : '');
109
+		$footer = '<a href="'.$this->getBaseUrl().'" target="_blank"'.
110
+			' rel="noreferrer">'.$this->getEntity().'</a>'.
111
+			($slogan !== '' ? ' – '.$slogan : '');
112 112
 
113 113
 		return $footer;
114 114
 	}
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
 	 */
130 130
 	public function getLogo() {
131 131
 		$logo = $this->config->getAppValue('theming', 'logoMime');
132
-		if(!$logo || !$this->rootFolder->nodeExists('/themedinstancelogo')) {
133
-			return $this->urlGenerator->imagePath('core','logo.svg');
132
+		if (!$logo || !$this->rootFolder->nodeExists('/themedinstancelogo')) {
133
+			return $this->urlGenerator->imagePath('core', 'logo.svg');
134 134
 		} else {
135 135
 			return $this->urlGenerator->linkToRoute('theming.Theming.getLogo');
136 136
 		}
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
 	 */
144 144
 	public function getBackground() {
145 145
 		$backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime');
146
-		if(!$backgroundLogo || !$this->rootFolder->nodeExists('/themedbackgroundlogo')) {
147
-			return $this->urlGenerator->imagePath('core','background.jpg');
146
+		if (!$backgroundLogo || !$this->rootFolder->nodeExists('/themedbackgroundlogo')) {
147
+			return $this->urlGenerator->imagePath('core', 'background.jpg');
148 148
 		} else {
149 149
 			return $this->urlGenerator->linkToRoute('theming.Theming.getLoginBackground');
150 150
 		}
@@ -158,11 +158,11 @@  discard block
 block discarded – undo
158 158
 	 */
159 159
 	public function shouldReplaceIcons() {
160 160
 		$cache = $this->cacheFactory->create('theming');
161
-		if($value = $cache->get('shouldReplaceIcons')) {
162
-			return (bool)$value;
161
+		if ($value = $cache->get('shouldReplaceIcons')) {
162
+			return (bool) $value;
163 163
 		}
164 164
 		$value = false;
165
-		if(extension_loaded('imagick')) {
165
+		if (extension_loaded('imagick')) {
166 166
 			$checkImagick = new \Imagick();
167 167
 			if (count($checkImagick->queryFormats('SVG')) >= 1) {
168 168
 				$value = true;
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 	 */
179 179
 	private function increaseCacheBuster() {
180 180
 		$cacheBusterKey = $this->config->getAppValue('theming', 'cachebuster', '0');
181
-		$this->config->setAppValue('theming', 'cachebuster', (int)$cacheBusterKey+1);
181
+		$this->config->setAppValue('theming', 'cachebuster', (int) $cacheBusterKey + 1);
182 182
 	}
183 183
 
184 184
 	/**
Please login to merge, or discard this patch.