@@ -129,12 +129,12 @@ discard block |
||
129 | 129 | $currentLanguage = substr($this->l10nFactory->findLanguage(), 0, 2); |
130 | 130 | |
131 | 131 | $formattedCategories = [ |
132 | - ['id' => self::CAT_ALL_INSTALLED, 'ident' => 'installed', 'displayName' => (string)$this->l10n->t('Your apps')], |
|
133 | - ['id' => self::CAT_ENABLED, 'ident' => 'enabled', 'displayName' => (string)$this->l10n->t('Enabled apps')], |
|
134 | - ['id' => self::CAT_DISABLED, 'ident' => 'disabled', 'displayName' => (string)$this->l10n->t('Disabled apps')], |
|
132 | + ['id' => self::CAT_ALL_INSTALLED, 'ident' => 'installed', 'displayName' => (string) $this->l10n->t('Your apps')], |
|
133 | + ['id' => self::CAT_ENABLED, 'ident' => 'enabled', 'displayName' => (string) $this->l10n->t('Enabled apps')], |
|
134 | + ['id' => self::CAT_DISABLED, 'ident' => 'disabled', 'displayName' => (string) $this->l10n->t('Disabled apps')], |
|
135 | 135 | ]; |
136 | 136 | $categories = $this->categoryFetcher->get(); |
137 | - foreach($categories as $category) { |
|
137 | + foreach ($categories as $category) { |
|
138 | 138 | $formattedCategories[] = [ |
139 | 139 | 'id' => $category['id'], |
140 | 140 | 'ident' => $category['id'], |
@@ -155,46 +155,46 @@ discard block |
||
155 | 155 | $versionParser = new VersionParser(); |
156 | 156 | $formattedApps = []; |
157 | 157 | $apps = $this->appFetcher->get(); |
158 | - foreach($apps as $app) { |
|
158 | + foreach ($apps as $app) { |
|
159 | 159 | if (isset($app['isFeatured'])) { |
160 | 160 | $app['featured'] = $app['isFeatured']; |
161 | 161 | } |
162 | 162 | |
163 | 163 | // Skip all apps not in the requested category |
164 | 164 | $isInCategory = false; |
165 | - foreach($app['categories'] as $category) { |
|
166 | - if($category === $requestedCategory) { |
|
165 | + foreach ($app['categories'] as $category) { |
|
166 | + if ($category === $requestedCategory) { |
|
167 | 167 | $isInCategory = true; |
168 | 168 | } |
169 | 169 | } |
170 | - if(!$isInCategory) { |
|
170 | + if (!$isInCategory) { |
|
171 | 171 | continue; |
172 | 172 | } |
173 | 173 | |
174 | 174 | $nextCloudVersion = $versionParser->getVersion($app['releases'][0]['rawPlatformVersionSpec']); |
175 | 175 | $nextCloudVersionDependencies = []; |
176 | - if($nextCloudVersion->getMinimumVersion() !== '') { |
|
176 | + if ($nextCloudVersion->getMinimumVersion() !== '') { |
|
177 | 177 | $nextCloudVersionDependencies['nextcloud']['@attributes']['min-version'] = $nextCloudVersion->getMinimumVersion(); |
178 | 178 | } |
179 | - if($nextCloudVersion->getMaximumVersion() !== '') { |
|
179 | + if ($nextCloudVersion->getMaximumVersion() !== '') { |
|
180 | 180 | $nextCloudVersionDependencies['nextcloud']['@attributes']['max-version'] = $nextCloudVersion->getMaximumVersion(); |
181 | 181 | } |
182 | 182 | $phpVersion = $versionParser->getVersion($app['releases'][0]['rawPhpVersionSpec']); |
183 | 183 | $existsLocally = (\OC_App::getAppPath($app['id']) !== false) ? true : false; |
184 | 184 | $phpDependencies = []; |
185 | - if($phpVersion->getMinimumVersion() !== '') { |
|
185 | + if ($phpVersion->getMinimumVersion() !== '') { |
|
186 | 186 | $phpDependencies['php']['@attributes']['min-version'] = $phpVersion->getMinimumVersion(); |
187 | 187 | } |
188 | - if($phpVersion->getMaximumVersion() !== '') { |
|
188 | + if ($phpVersion->getMaximumVersion() !== '') { |
|
189 | 189 | $phpDependencies['php']['@attributes']['max-version'] = $phpVersion->getMaximumVersion(); |
190 | 190 | } |
191 | - if(isset($app['releases'][0]['minIntSize'])) { |
|
191 | + if (isset($app['releases'][0]['minIntSize'])) { |
|
192 | 192 | $phpDependencies['php']['@attributes']['min-int-size'] = $app['releases'][0]['minIntSize']; |
193 | 193 | } |
194 | 194 | $authors = ''; |
195 | - foreach($app['authors'] as $key => $author) { |
|
195 | + foreach ($app['authors'] as $key => $author) { |
|
196 | 196 | $authors .= $author['name']; |
197 | - if($key !== count($app['authors']) - 1) { |
|
197 | + if ($key !== count($app['authors']) - 1) { |
|
198 | 198 | $authors .= ', '; |
199 | 199 | } |
200 | 200 | } |
@@ -202,12 +202,12 @@ discard block |
||
202 | 202 | $currentLanguage = substr(\OC::$server->getL10NFactory()->findLanguage(), 0, 2); |
203 | 203 | $enabledValue = $this->config->getAppValue($app['id'], 'enabled', 'no'); |
204 | 204 | $groups = null; |
205 | - if($enabledValue !== 'no' && $enabledValue !== 'yes') { |
|
205 | + if ($enabledValue !== 'no' && $enabledValue !== 'yes') { |
|
206 | 206 | $groups = $enabledValue; |
207 | 207 | } |
208 | 208 | |
209 | 209 | $currentVersion = ''; |
210 | - if($this->appManager->isInstalled($app['id'])) { |
|
210 | + if ($this->appManager->isInstalled($app['id'])) { |
|
211 | 211 | $currentVersion = \OC_App::getAppVersion($app['id']); |
212 | 212 | } else { |
213 | 213 | $currentLanguage = $app['releases'][0]['version']; |
@@ -253,8 +253,8 @@ discard block |
||
253 | 253 | |
254 | 254 | $appFetcher = \OC::$server->getAppFetcher(); |
255 | 255 | $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $appFetcher); |
256 | - if($newVersion && $this->appManager->isInstalled($app['id'])) { |
|
257 | - $formattedApps[count($formattedApps)-1]['update'] = $newVersion; |
|
256 | + if ($newVersion && $this->appManager->isInstalled($app['id'])) { |
|
257 | + $formattedApps[count($formattedApps) - 1]['update'] = $newVersion; |
|
258 | 258 | } |
259 | 259 | } |
260 | 260 | |
@@ -275,14 +275,14 @@ discard block |
||
275 | 275 | case 'installed': |
276 | 276 | $apps = $appClass->listAllApps(); |
277 | 277 | |
278 | - foreach($apps as $key => $app) { |
|
278 | + foreach ($apps as $key => $app) { |
|
279 | 279 | $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $this->appFetcher); |
280 | 280 | $apps[$key]['update'] = $newVersion; |
281 | 281 | } |
282 | 282 | |
283 | - usort($apps, function ($a, $b) { |
|
284 | - $a = (string)$a['name']; |
|
285 | - $b = (string)$b['name']; |
|
283 | + usort($apps, function($a, $b) { |
|
284 | + $a = (string) $a['name']; |
|
285 | + $b = (string) $b['name']; |
|
286 | 286 | if ($a === $b) { |
287 | 287 | return 0; |
288 | 288 | } |
@@ -292,18 +292,18 @@ discard block |
||
292 | 292 | // enabled apps |
293 | 293 | case 'enabled': |
294 | 294 | $apps = $appClass->listAllApps(); |
295 | - $apps = array_filter($apps, function ($app) { |
|
295 | + $apps = array_filter($apps, function($app) { |
|
296 | 296 | return $app['active']; |
297 | 297 | }); |
298 | 298 | |
299 | - foreach($apps as $key => $app) { |
|
299 | + foreach ($apps as $key => $app) { |
|
300 | 300 | $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $this->appFetcher); |
301 | 301 | $apps[$key]['update'] = $newVersion; |
302 | 302 | } |
303 | 303 | |
304 | - usort($apps, function ($a, $b) { |
|
305 | - $a = (string)$a['name']; |
|
306 | - $b = (string)$b['name']; |
|
304 | + usort($apps, function($a, $b) { |
|
305 | + $a = (string) $a['name']; |
|
306 | + $b = (string) $b['name']; |
|
307 | 307 | if ($a === $b) { |
308 | 308 | return 0; |
309 | 309 | } |
@@ -313,11 +313,11 @@ discard block |
||
313 | 313 | // disabled apps |
314 | 314 | case 'disabled': |
315 | 315 | $apps = $appClass->listAllApps(); |
316 | - $apps = array_filter($apps, function ($app) { |
|
316 | + $apps = array_filter($apps, function($app) { |
|
317 | 317 | return !$app['active']; |
318 | 318 | }); |
319 | 319 | |
320 | - $apps = array_map(function ($app) { |
|
320 | + $apps = array_map(function($app) { |
|
321 | 321 | $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $this->appFetcher); |
322 | 322 | if ($newVersion !== false) { |
323 | 323 | $app['update'] = $newVersion; |
@@ -325,9 +325,9 @@ discard block |
||
325 | 325 | return $app; |
326 | 326 | }, $apps); |
327 | 327 | |
328 | - usort($apps, function ($a, $b) { |
|
329 | - $a = (string)$a['name']; |
|
330 | - $b = (string)$b['name']; |
|
328 | + usort($apps, function($a, $b) { |
|
329 | + $a = (string) $a['name']; |
|
330 | + $b = (string) $b['name']; |
|
331 | 331 | if ($a === $b) { |
332 | 332 | return 0; |
333 | 333 | } |
@@ -338,9 +338,9 @@ discard block |
||
338 | 338 | $apps = $this->getAppsForCategory($category); |
339 | 339 | |
340 | 340 | // sort by score |
341 | - usort($apps, function ($a, $b) { |
|
342 | - $a = (int)$a['score']; |
|
343 | - $b = (int)$b['score']; |
|
341 | + usort($apps, function($a, $b) { |
|
342 | + $a = (int) $a['score']; |
|
343 | + $b = (int) $b['score']; |
|
344 | 344 | if ($a === $b) { |
345 | 345 | return 0; |
346 | 346 | } |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | </li> |
24 | 24 | {{/each}} |
25 | 25 | |
26 | -<?php if($_['appstoreEnabled']): ?> |
|
26 | +<?php if ($_['appstoreEnabled']): ?> |
|
27 | 27 | <li> |
28 | - <a class="app-external" target="_blank" rel="noreferrer" href="https://docs.nextcloud.org/server/12/developer_manual/"><?php p($l->t('Developer documentation'));?> ↗</a> |
|
28 | + <a class="app-external" target="_blank" rel="noreferrer" href="https://docs.nextcloud.org/server/12/developer_manual/"><?php p($l->t('Developer documentation')); ?> ↗</a> |
|
29 | 29 | </li> |
30 | 30 | <?php endif; ?> |
31 | 31 | </script> |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | </div> |
44 | 44 | <div class="app-version">{{version}}</div> |
45 | 45 | <div class="app-level"> |
46 | - {{{level}}}{{#unless internal}}<a href="https://apps.nextcloud.com/apps/{{id}}"><?php p($l->t('View in store'));?> ↗</a>{{/unless}} |
|
46 | + {{{level}}}{{#unless internal}}<a href="https://apps.nextcloud.com/apps/{{id}}"><?php p($l->t('View in store')); ?> ↗</a>{{/unless}} |
|
47 | 47 | </div> |
48 | 48 | |
49 | 49 | <div class="app-groups"> |
@@ -66,9 +66,9 @@ discard block |
||
66 | 66 | <input class="uninstall" type="submit" value="<?php p($l->t('Uninstall')); ?>" data-appid="{{id}}" /> |
67 | 67 | {{/if}} |
68 | 68 | {{#if active}} |
69 | - <input class="enable" type="submit" data-appid="{{id}}" data-active="true" value="<?php p($l->t("Disable"));?>"/> |
|
69 | + <input class="enable" type="submit" data-appid="{{id}}" data-active="true" value="<?php p($l->t("Disable")); ?>"/> |
|
70 | 70 | {{else}} |
71 | - <input class="enable{{#if needsDownload}} needs-download{{/if}}" type="submit" data-appid="{{id}}" data-active="false" {{#unless canInstall}}disabled="disabled"{{/unless}} value="<?php p($l->t("Enable"));?>"/> |
|
71 | + <input class="enable{{#if needsDownload}} needs-download{{/if}}" type="submit" data-appid="{{id}}" data-active="false" {{#unless canInstall}}disabled="disabled"{{/unless}} value="<?php p($l->t("Enable")); ?>"/> |
|
72 | 72 | {{/if}} |
73 | 73 | </div> |
74 | 74 | </div> |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | <div class="app-description-container hidden"> |
99 | 99 | <div class="app-version">{{version}}</div> |
100 | 100 | {{#if profilepage}}<a href="{{profilepage}}" target="_blank" rel="noreferrer">{{/if}} |
101 | - <div class="app-author"><?php p($l->t('by %s', ['{{author}}']));?> |
|
101 | + <div class="app-author"><?php p($l->t('by %s', ['{{author}}'])); ?> |
|
102 | 102 | {{#if licence}} |
103 | 103 | (<?php p($l->t('%s-licensed', ['{{licence}}'])); ?>) |
104 | 104 | {{/if}} |
@@ -108,37 +108,37 @@ discard block |
||
108 | 108 | <!--<div class="app-changed">{{changed}}</div>--> |
109 | 109 | {{#if documentation}} |
110 | 110 | <p class="documentation"> |
111 | - <?php p($l->t("Documentation:"));?> |
|
111 | + <?php p($l->t("Documentation:")); ?> |
|
112 | 112 | {{#if documentation.user}} |
113 | 113 | <span class="userDocumentation"> |
114 | - <a id="userDocumentation" class="appslink" href="{{documentation.user}}" target="_blank" rel="noreferrer"><?php p($l->t('User documentation'));?> ↗</a> |
|
114 | + <a id="userDocumentation" class="appslink" href="{{documentation.user}}" target="_blank" rel="noreferrer"><?php p($l->t('User documentation')); ?> ↗</a> |
|
115 | 115 | </span> |
116 | 116 | {{/if}} |
117 | 117 | |
118 | 118 | {{#if documentation.admin}} |
119 | 119 | <span class="adminDocumentation"> |
120 | - <a id="adminDocumentation" class="appslink" href="{{documentation.admin}}" target="_blank" rel="noreferrer"><?php p($l->t('Admin documentation'));?> ↗</a> |
|
120 | + <a id="adminDocumentation" class="appslink" href="{{documentation.admin}}" target="_blank" rel="noreferrer"><?php p($l->t('Admin documentation')); ?> ↗</a> |
|
121 | 121 | </span> |
122 | 122 | {{/if}} |
123 | 123 | |
124 | 124 | {{#if documentation.developer}} |
125 | 125 | <span class="developerDocumentation"> |
126 | - <a id="developerDocumentation" class="appslink" href="{{documentation.developer}}" target="_blank" rel="noreferrer"><?php p($l->t('Developer documentation'));?> ↗</a> |
|
126 | + <a id="developerDocumentation" class="appslink" href="{{documentation.developer}}" target="_blank" rel="noreferrer"><?php p($l->t('Developer documentation')); ?> ↗</a> |
|
127 | 127 | </span> |
128 | 128 | {{/if}} |
129 | 129 | </p> |
130 | 130 | {{/if}} |
131 | 131 | |
132 | 132 | {{#if website}} |
133 | - <a id="userDocumentation" class="appslink" href="{{website}}" target="_blank" rel="noreferrer"><?php p($l->t('Visit website'));?> ↗</a> |
|
133 | + <a id="userDocumentation" class="appslink" href="{{website}}" target="_blank" rel="noreferrer"><?php p($l->t('Visit website')); ?> ↗</a> |
|
134 | 134 | {{/if}} |
135 | 135 | |
136 | 136 | {{#if bugs}} |
137 | - <a id="adminDocumentation" class="appslink" href="{{bugs}}" target="_blank" rel="noreferrer"><?php p($l->t('Report a bug'));?> ↗</a> |
|
137 | + <a id="adminDocumentation" class="appslink" href="{{bugs}}" target="_blank" rel="noreferrer"><?php p($l->t('Report a bug')); ?> ↗</a> |
|
138 | 138 | {{/if}} |
139 | 139 | </div><!-- end app-description-container --> |
140 | - <div class="app-description-toggle-show" role="link"><?php p($l->t("Show description …"));?></div> |
|
141 | - <div class="app-description-toggle-hide hidden" role="link"><?php p($l->t("Hide description …"));?></div> |
|
140 | + <div class="app-description-toggle-show" role="link"><?php p($l->t("Show description …")); ?></div> |
|
141 | + <div class="app-description-toggle-hide hidden" role="link"><?php p($l->t("Hide description …")); ?></div> |
|
142 | 142 | |
143 | 143 | <div class="app-dependencies update hidden"> |
144 | 144 | <p><?php p($l->t('This app has an update available.')); ?></p> |
@@ -169,14 +169,14 @@ discard block |
||
169 | 169 | |
170 | 170 | <input class="update hidden" type="submit" value="<?php p($l->t('Update to %s', array('{{update}}'))); ?>" data-appid="{{id}}" /> |
171 | 171 | {{#if active}} |
172 | - <input class="enable" type="submit" data-appid="{{id}}" data-active="true" value="<?php p($l->t("Disable"));?>"/> |
|
172 | + <input class="enable" type="submit" data-appid="{{id}}" data-active="true" value="<?php p($l->t("Disable")); ?>"/> |
|
173 | 173 | <div class="groups-enable"> |
174 | 174 | <input type="checkbox" class="groups-enable__checkbox checkbox" id="groups_enable-{{id}}"/> |
175 | 175 | <label for="groups_enable-{{id}}"><?php p($l->t('Enable only for specific groups')); ?></label> |
176 | 176 | </div> |
177 | 177 | <input type="hidden" id="group_select" title="<?php p($l->t('All')); ?>" style="width: 200px"> |
178 | 178 | {{else}} |
179 | - <input class="enable{{#if needsDownload}} needs-download{{/if}}" type="submit" data-appid="{{id}}" data-active="false" {{#unless canInstall}}disabled="disabled"{{/unless}} value="<?php p($l->t("Enable"));?>"/> |
|
179 | + <input class="enable{{#if needsDownload}} needs-download{{/if}}" type="submit" data-appid="{{id}}" data-active="false" {{#unless canInstall}}disabled="disabled"{{/unless}} value="<?php p($l->t("Enable")); ?>"/> |
|
180 | 180 | {{/if}} |
181 | 181 | {{#if canUnInstall}} |
182 | 182 | <input class="uninstall" type="submit" value="<?php p($l->t('Uninstall app')); ?>" data-appid="{{id}}" /> |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | </div> |
188 | 188 | </script> |
189 | 189 | |
190 | -<div id="app-navigation" class="icon-loading" data-category="<?php p($_['category']);?>"> |
|
190 | +<div id="app-navigation" class="icon-loading" data-category="<?php p($_['category']); ?>"> |
|
191 | 191 | <ul id="apps-categories"> |
192 | 192 | |
193 | 193 | </ul> |