@@ -131,13 +131,13 @@ discard block |
||
131 | 131 | $currentLanguage = substr($this->l10nFactory->findLanguage(), 0, 2); |
132 | 132 | |
133 | 133 | $formattedCategories = [ |
134 | - ['id' => self::CAT_ALL_INSTALLED, 'ident' => 'installed', 'displayName' => (string)$this->l10n->t('Your apps')], |
|
135 | - ['id' => self::CAT_ENABLED, 'ident' => 'enabled', 'displayName' => (string)$this->l10n->t('Enabled apps')], |
|
136 | - ['id' => self::CAT_DISABLED, 'ident' => 'disabled', 'displayName' => (string)$this->l10n->t('Disabled apps')], |
|
137 | - ['id' => self::CAT_APP_BUNDLES, 'ident' => 'app-bundles', 'displayName' => (string)$this->l10n->t('App bundles')], |
|
134 | + ['id' => self::CAT_ALL_INSTALLED, 'ident' => 'installed', 'displayName' => (string) $this->l10n->t('Your apps')], |
|
135 | + ['id' => self::CAT_ENABLED, 'ident' => 'enabled', 'displayName' => (string) $this->l10n->t('Enabled apps')], |
|
136 | + ['id' => self::CAT_DISABLED, 'ident' => 'disabled', 'displayName' => (string) $this->l10n->t('Disabled apps')], |
|
137 | + ['id' => self::CAT_APP_BUNDLES, 'ident' => 'app-bundles', 'displayName' => (string) $this->l10n->t('App bundles')], |
|
138 | 138 | ]; |
139 | 139 | $categories = $this->categoryFetcher->get(); |
140 | - foreach($categories as $category) { |
|
140 | + foreach ($categories as $category) { |
|
141 | 141 | $formattedCategories[] = [ |
142 | 142 | 'id' => $category['id'], |
143 | 143 | 'ident' => $category['id'], |
@@ -167,46 +167,46 @@ discard block |
||
167 | 167 | $versionParser = new VersionParser(); |
168 | 168 | $formattedApps = []; |
169 | 169 | $apps = $this->appFetcher->get(); |
170 | - foreach($apps as $app) { |
|
170 | + foreach ($apps as $app) { |
|
171 | 171 | if (isset($app['isFeatured'])) { |
172 | 172 | $app['featured'] = $app['isFeatured']; |
173 | 173 | } |
174 | 174 | |
175 | 175 | // Skip all apps not in the requested category |
176 | 176 | $isInCategory = false; |
177 | - foreach($app['categories'] as $category) { |
|
178 | - if($category === $requestedCategory) { |
|
177 | + foreach ($app['categories'] as $category) { |
|
178 | + if ($category === $requestedCategory) { |
|
179 | 179 | $isInCategory = true; |
180 | 180 | } |
181 | 181 | } |
182 | - if(!$isInCategory) { |
|
182 | + if (!$isInCategory) { |
|
183 | 183 | continue; |
184 | 184 | } |
185 | 185 | |
186 | 186 | $nextCloudVersion = $versionParser->getVersion($app['releases'][0]['rawPlatformVersionSpec']); |
187 | 187 | $nextCloudVersionDependencies = []; |
188 | - if($nextCloudVersion->getMinimumVersion() !== '') { |
|
188 | + if ($nextCloudVersion->getMinimumVersion() !== '') { |
|
189 | 189 | $nextCloudVersionDependencies['nextcloud']['@attributes']['min-version'] = $nextCloudVersion->getMinimumVersion(); |
190 | 190 | } |
191 | - if($nextCloudVersion->getMaximumVersion() !== '') { |
|
191 | + if ($nextCloudVersion->getMaximumVersion() !== '') { |
|
192 | 192 | $nextCloudVersionDependencies['nextcloud']['@attributes']['max-version'] = $nextCloudVersion->getMaximumVersion(); |
193 | 193 | } |
194 | 194 | $phpVersion = $versionParser->getVersion($app['releases'][0]['rawPhpVersionSpec']); |
195 | 195 | $existsLocally = (\OC_App::getAppPath($app['id']) !== false) ? true : false; |
196 | 196 | $phpDependencies = []; |
197 | - if($phpVersion->getMinimumVersion() !== '') { |
|
197 | + if ($phpVersion->getMinimumVersion() !== '') { |
|
198 | 198 | $phpDependencies['php']['@attributes']['min-version'] = $phpVersion->getMinimumVersion(); |
199 | 199 | } |
200 | - if($phpVersion->getMaximumVersion() !== '') { |
|
200 | + if ($phpVersion->getMaximumVersion() !== '') { |
|
201 | 201 | $phpDependencies['php']['@attributes']['max-version'] = $phpVersion->getMaximumVersion(); |
202 | 202 | } |
203 | - if(isset($app['releases'][0]['minIntSize'])) { |
|
203 | + if (isset($app['releases'][0]['minIntSize'])) { |
|
204 | 204 | $phpDependencies['php']['@attributes']['min-int-size'] = $app['releases'][0]['minIntSize']; |
205 | 205 | } |
206 | 206 | $authors = ''; |
207 | - foreach($app['authors'] as $key => $author) { |
|
207 | + foreach ($app['authors'] as $key => $author) { |
|
208 | 208 | $authors .= $author['name']; |
209 | - if($key !== count($app['authors']) - 1) { |
|
209 | + if ($key !== count($app['authors']) - 1) { |
|
210 | 210 | $authors .= ', '; |
211 | 211 | } |
212 | 212 | } |
@@ -214,12 +214,12 @@ discard block |
||
214 | 214 | $currentLanguage = substr(\OC::$server->getL10NFactory()->findLanguage(), 0, 2); |
215 | 215 | $enabledValue = $this->config->getAppValue($app['id'], 'enabled', 'no'); |
216 | 216 | $groups = null; |
217 | - if($enabledValue !== 'no' && $enabledValue !== 'yes') { |
|
217 | + if ($enabledValue !== 'no' && $enabledValue !== 'yes') { |
|
218 | 218 | $groups = $enabledValue; |
219 | 219 | } |
220 | 220 | |
221 | 221 | $currentVersion = ''; |
222 | - if($this->appManager->isInstalled($app['id'])) { |
|
222 | + if ($this->appManager->isInstalled($app['id'])) { |
|
223 | 223 | $currentVersion = \OC_App::getAppVersion($app['id']); |
224 | 224 | } else { |
225 | 225 | $currentLanguage = $app['releases'][0]['version']; |
@@ -265,8 +265,8 @@ discard block |
||
265 | 265 | |
266 | 266 | $appFetcher = \OC::$server->getAppFetcher(); |
267 | 267 | $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $appFetcher); |
268 | - if($newVersion && $this->appManager->isInstalled($app['id'])) { |
|
269 | - $formattedApps[count($formattedApps)-1]['update'] = $newVersion; |
|
268 | + if ($newVersion && $this->appManager->isInstalled($app['id'])) { |
|
269 | + $formattedApps[count($formattedApps) - 1]['update'] = $newVersion; |
|
270 | 270 | } |
271 | 271 | } |
272 | 272 | |
@@ -287,14 +287,14 @@ discard block |
||
287 | 287 | case 'installed': |
288 | 288 | $apps = $appClass->listAllApps(); |
289 | 289 | |
290 | - foreach($apps as $key => $app) { |
|
290 | + foreach ($apps as $key => $app) { |
|
291 | 291 | $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $this->appFetcher); |
292 | 292 | $apps[$key]['update'] = $newVersion; |
293 | 293 | } |
294 | 294 | |
295 | - usort($apps, function ($a, $b) { |
|
296 | - $a = (string)$a['name']; |
|
297 | - $b = (string)$b['name']; |
|
295 | + usort($apps, function($a, $b) { |
|
296 | + $a = (string) $a['name']; |
|
297 | + $b = (string) $b['name']; |
|
298 | 298 | if ($a === $b) { |
299 | 299 | return 0; |
300 | 300 | } |
@@ -304,18 +304,18 @@ discard block |
||
304 | 304 | // enabled apps |
305 | 305 | case 'enabled': |
306 | 306 | $apps = $appClass->listAllApps(); |
307 | - $apps = array_filter($apps, function ($app) { |
|
307 | + $apps = array_filter($apps, function($app) { |
|
308 | 308 | return $app['active']; |
309 | 309 | }); |
310 | 310 | |
311 | - foreach($apps as $key => $app) { |
|
311 | + foreach ($apps as $key => $app) { |
|
312 | 312 | $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $this->appFetcher); |
313 | 313 | $apps[$key]['update'] = $newVersion; |
314 | 314 | } |
315 | 315 | |
316 | - usort($apps, function ($a, $b) { |
|
317 | - $a = (string)$a['name']; |
|
318 | - $b = (string)$b['name']; |
|
316 | + usort($apps, function($a, $b) { |
|
317 | + $a = (string) $a['name']; |
|
318 | + $b = (string) $b['name']; |
|
319 | 319 | if ($a === $b) { |
320 | 320 | return 0; |
321 | 321 | } |
@@ -325,11 +325,11 @@ discard block |
||
325 | 325 | // disabled apps |
326 | 326 | case 'disabled': |
327 | 327 | $apps = $appClass->listAllApps(); |
328 | - $apps = array_filter($apps, function ($app) { |
|
328 | + $apps = array_filter($apps, function($app) { |
|
329 | 329 | return !$app['active']; |
330 | 330 | }); |
331 | 331 | |
332 | - $apps = array_map(function ($app) { |
|
332 | + $apps = array_map(function($app) { |
|
333 | 333 | $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $this->appFetcher); |
334 | 334 | if ($newVersion !== false) { |
335 | 335 | $app['update'] = $newVersion; |
@@ -337,9 +337,9 @@ discard block |
||
337 | 337 | return $app; |
338 | 338 | }, $apps); |
339 | 339 | |
340 | - usort($apps, function ($a, $b) { |
|
341 | - $a = (string)$a['name']; |
|
342 | - $b = (string)$b['name']; |
|
340 | + usort($apps, function($a, $b) { |
|
341 | + $a = (string) $a['name']; |
|
342 | + $b = (string) $b['name']; |
|
343 | 343 | if ($a === $b) { |
344 | 344 | return 0; |
345 | 345 | } |
@@ -349,15 +349,15 @@ discard block |
||
349 | 349 | case 'app-bundles': |
350 | 350 | $bundles = $this->bundleFetcher->getBundles(); |
351 | 351 | $apps = []; |
352 | - foreach($bundles as $bundle) { |
|
352 | + foreach ($bundles as $bundle) { |
|
353 | 353 | $newCategory = true; |
354 | 354 | $allApps = $appClass->listAllApps(); |
355 | 355 | $categories = $this->getAllCategories(); |
356 | - foreach($categories as $singleCategory) { |
|
356 | + foreach ($categories as $singleCategory) { |
|
357 | 357 | $newApps = $this->getAppsForCategory($singleCategory['id']); |
358 | - foreach($allApps as $app) { |
|
359 | - foreach($newApps as $key => $newApp) { |
|
360 | - if($app['id'] === $newApp['id']) { |
|
358 | + foreach ($allApps as $app) { |
|
359 | + foreach ($newApps as $key => $newApp) { |
|
360 | + if ($app['id'] === $newApp['id']) { |
|
361 | 361 | unset($newApps[$key]); |
362 | 362 | } |
363 | 363 | } |
@@ -365,10 +365,10 @@ discard block |
||
365 | 365 | $allApps = array_merge($allApps, $newApps); |
366 | 366 | } |
367 | 367 | |
368 | - foreach($bundle->getAppIdentifiers() as $identifier) { |
|
369 | - foreach($allApps as $app) { |
|
370 | - if($app['id'] === $identifier) { |
|
371 | - if($newCategory) { |
|
368 | + foreach ($bundle->getAppIdentifiers() as $identifier) { |
|
369 | + foreach ($allApps as $app) { |
|
370 | + if ($app['id'] === $identifier) { |
|
371 | + if ($newCategory) { |
|
372 | 372 | $app['newCategory'] = true; |
373 | 373 | $app['categoryName'] = $bundle->getName(); |
374 | 374 | } |
@@ -385,9 +385,9 @@ discard block |
||
385 | 385 | $apps = $this->getAppsForCategory($category); |
386 | 386 | |
387 | 387 | // sort by score |
388 | - usort($apps, function ($a, $b) { |
|
389 | - $a = (int)$a['score']; |
|
390 | - $b = (int)$b['score']; |
|
388 | + usort($apps, function($a, $b) { |
|
389 | + $a = (int) $a['score']; |
|
390 | + $b = (int) $b['score']; |
|
391 | 391 | if ($a === $b) { |
392 | 392 | return 0; |
393 | 393 | } |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | </li> |
23 | 23 | {{/each}} |
24 | 24 | |
25 | -<?php if($_['appstoreEnabled']): ?> |
|
25 | +<?php if ($_['appstoreEnabled']): ?> |
|
26 | 26 | <li> |
27 | - <a class="app-external" target="_blank" rel="noreferrer" href="https://docs.nextcloud.org/server/12/developer_manual/"><?php p($l->t('Developer documentation'));?> ↗</a> |
|
27 | + <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 | 28 | </li> |
29 | 29 | <?php endif; ?> |
30 | 30 | </script> |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | {{#if newCategory}} |
34 | 34 | <div class="apps-header"> |
35 | 35 | <div class="app-image"></div> |
36 | - <h2>{{categoryName}} <input class="enable" type="submit" data-bundleid="{{bundleId}}" data-active="true" value="<?php p($l->t('Enable all'));?>"/></h2> |
|
36 | + <h2>{{categoryName}} <input class="enable" type="submit" data-bundleid="{{bundleId}}" data-active="true" value="<?php p($l->t('Enable all')); ?>"/></h2> |
|
37 | 37 | <div class="app-version"></div> |
38 | 38 | <div class="app-level"></div> |
39 | 39 | <div class="app-groups"></div> |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | </div> |
52 | 52 | <div class="app-version">{{version}}</div> |
53 | 53 | <div class="app-level"> |
54 | - {{{level}}}{{#unless internal}}<a href="https://apps.nextcloud.com/apps/{{id}}"><?php p($l->t('View in store'));?> ↗</a>{{/unless}} |
|
54 | + {{{level}}}{{#unless internal}}<a href="https://apps.nextcloud.com/apps/{{id}}"><?php p($l->t('View in store')); ?> ↗</a>{{/unless}} |
|
55 | 55 | </div> |
56 | 56 | |
57 | 57 | <div class="app-groups"> |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | <input class="uninstall" type="submit" value="<?php p($l->t('Remove')); ?>" data-appid="{{id}}" /> |
75 | 75 | {{/if}} |
76 | 76 | {{#if active}} |
77 | - <input class="enable" type="submit" data-appid="{{id}}" data-active="true" value="<?php p($l->t("Disable"));?>"/> |
|
77 | + <input class="enable" type="submit" data-appid="{{id}}" data-active="true" value="<?php p($l->t("Disable")); ?>"/> |
|
78 | 78 | {{else}} |
79 | - <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"));?>"/> |
|
79 | + <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")); ?>"/> |
|
80 | 80 | {{/if}} |
81 | 81 | </div> |
82 | 82 | </div> |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | <div class="app-description-container hidden"> |
107 | 107 | <div class="app-version">{{version}}</div> |
108 | 108 | {{#if profilepage}}<a href="{{profilepage}}" target="_blank" rel="noreferrer">{{/if}} |
109 | - <div class="app-author"><?php p($l->t('by %s', ['{{author}}']));?> |
|
109 | + <div class="app-author"><?php p($l->t('by %s', ['{{author}}'])); ?> |
|
110 | 110 | {{#if licence}} |
111 | 111 | (<?php p($l->t('%s-licensed', ['{{licence}}'])); ?>) |
112 | 112 | {{/if}} |
@@ -116,37 +116,37 @@ discard block |
||
116 | 116 | <!--<div class="app-changed">{{changed}}</div>--> |
117 | 117 | {{#if documentation}} |
118 | 118 | <p class="documentation"> |
119 | - <?php p($l->t("Documentation:"));?> |
|
119 | + <?php p($l->t("Documentation:")); ?> |
|
120 | 120 | {{#if documentation.user}} |
121 | 121 | <span class="userDocumentation"> |
122 | - <a id="userDocumentation" class="appslink" href="{{documentation.user}}" target="_blank" rel="noreferrer"><?php p($l->t('User documentation'));?> ↗</a> |
|
122 | + <a id="userDocumentation" class="appslink" href="{{documentation.user}}" target="_blank" rel="noreferrer"><?php p($l->t('User documentation')); ?> ↗</a> |
|
123 | 123 | </span> |
124 | 124 | {{/if}} |
125 | 125 | |
126 | 126 | {{#if documentation.admin}} |
127 | 127 | <span class="adminDocumentation"> |
128 | - <a id="adminDocumentation" class="appslink" href="{{documentation.admin}}" target="_blank" rel="noreferrer"><?php p($l->t('Admin documentation'));?> ↗</a> |
|
128 | + <a id="adminDocumentation" class="appslink" href="{{documentation.admin}}" target="_blank" rel="noreferrer"><?php p($l->t('Admin documentation')); ?> ↗</a> |
|
129 | 129 | </span> |
130 | 130 | {{/if}} |
131 | 131 | |
132 | 132 | {{#if documentation.developer}} |
133 | 133 | <span class="developerDocumentation"> |
134 | - <a id="developerDocumentation" class="appslink" href="{{documentation.developer}}" target="_blank" rel="noreferrer"><?php p($l->t('Developer documentation'));?> ↗</a> |
|
134 | + <a id="developerDocumentation" class="appslink" href="{{documentation.developer}}" target="_blank" rel="noreferrer"><?php p($l->t('Developer documentation')); ?> ↗</a> |
|
135 | 135 | </span> |
136 | 136 | {{/if}} |
137 | 137 | </p> |
138 | 138 | {{/if}} |
139 | 139 | |
140 | 140 | {{#if website}} |
141 | - <a id="userDocumentation" class="appslink" href="{{website}}" target="_blank" rel="noreferrer"><?php p($l->t('Visit website'));?> ↗</a> |
|
141 | + <a id="userDocumentation" class="appslink" href="{{website}}" target="_blank" rel="noreferrer"><?php p($l->t('Visit website')); ?> ↗</a> |
|
142 | 142 | {{/if}} |
143 | 143 | |
144 | 144 | {{#if bugs}} |
145 | - <a id="adminDocumentation" class="appslink" href="{{bugs}}" target="_blank" rel="noreferrer"><?php p($l->t('Report a bug'));?> ↗</a> |
|
145 | + <a id="adminDocumentation" class="appslink" href="{{bugs}}" target="_blank" rel="noreferrer"><?php p($l->t('Report a bug')); ?> ↗</a> |
|
146 | 146 | {{/if}} |
147 | 147 | </div><!-- end app-description-container --> |
148 | - <div class="app-description-toggle-show" role="link"><?php p($l->t("Show description …"));?></div> |
|
149 | - <div class="app-description-toggle-hide hidden" role="link"><?php p($l->t("Hide description …"));?></div> |
|
148 | + <div class="app-description-toggle-show" role="link"><?php p($l->t("Show description …")); ?></div> |
|
149 | + <div class="app-description-toggle-hide hidden" role="link"><?php p($l->t("Hide description …")); ?></div> |
|
150 | 150 | |
151 | 151 | <div class="app-dependencies update hidden"> |
152 | 152 | <p><?php p($l->t('This app has an update available.')); ?></p> |
@@ -177,14 +177,14 @@ discard block |
||
177 | 177 | |
178 | 178 | <input class="update hidden" type="submit" value="<?php p($l->t('Update to %s', array('{{update}}'))); ?>" data-appid="{{id}}" /> |
179 | 179 | {{#if active}} |
180 | - <input class="enable" type="submit" data-appid="{{id}}" data-active="true" value="<?php p($l->t("Disable"));?>"/> |
|
180 | + <input class="enable" type="submit" data-appid="{{id}}" data-active="true" value="<?php p($l->t("Disable")); ?>"/> |
|
181 | 181 | <div class="groups-enable"> |
182 | 182 | <input type="checkbox" class="groups-enable__checkbox checkbox" id="groups_enable-{{id}}"/> |
183 | 183 | <label for="groups_enable-{{id}}"><?php p($l->t('Enable only for specific groups')); ?></label> |
184 | 184 | </div> |
185 | 185 | <input type="hidden" id="group_select" title="<?php p($l->t('All')); ?>" style="width: 200px"> |
186 | 186 | {{else}} |
187 | - <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"));?>"/> |
|
187 | + <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")); ?>"/> |
|
188 | 188 | {{/if}} |
189 | 189 | {{#if canUnInstall}} |
190 | 190 | <input class="uninstall" type="submit" value="<?php p($l->t('Remove')); ?>" data-appid="{{id}}" /> |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | </div> |
196 | 196 | </script> |
197 | 197 | |
198 | -<div id="app-navigation" class="icon-loading" data-category="<?php p($_['category']);?>"> |
|
198 | +<div id="app-navigation" class="icon-loading" data-category="<?php p($_['category']); ?>"> |
|
199 | 199 | <ul id="apps-categories"> |
200 | 200 | |
201 | 201 | </ul> |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * {@inheritDoc} |
28 | 28 | */ |
29 | 29 | public function getName() { |
30 | - return (string)$this->l10n->t('Social sharing bundle'); |
|
30 | + return (string) $this->l10n->t('Social sharing bundle'); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |