@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * @param \OCP\IL10N $l10n |
47 | 47 | * @param Defaults $theme |
48 | 48 | */ |
49 | - public function __construct($template, $requestToken, $l10n, $theme ) { |
|
49 | + public function __construct($template, $requestToken, $l10n, $theme) { |
|
50 | 50 | $this->vars = array(); |
51 | 51 | $this->vars['requesttoken'] = $requestToken; |
52 | 52 | $this->l10n = $l10n; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | protected function getAppTemplateDirs($theme, $app, $serverRoot, $app_dir) { |
65 | 65 | // Check if the app is in the app folder or in the root |
66 | - if( file_exists($app_dir.'/templates/' )) { |
|
66 | + if (file_exists($app_dir.'/templates/')) { |
|
67 | 67 | return [ |
68 | 68 | $serverRoot.'/themes/'.$theme.'/apps/'.$app.'/templates/', |
69 | 69 | $app_dir.'/templates/', |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * |
99 | 99 | * If the key existed before, it will be overwritten |
100 | 100 | */ |
101 | - public function assign( $key, $value) { |
|
101 | + public function assign($key, $value) { |
|
102 | 102 | $this->vars[$key] = $value; |
103 | 103 | return true; |
104 | 104 | } |
@@ -113,12 +113,12 @@ discard block |
||
113 | 113 | * exists, the value will be appended. It can be accessed via |
114 | 114 | * $_[$key][$position] in the template. |
115 | 115 | */ |
116 | - public function append( $key, $value ) { |
|
117 | - if( array_key_exists( $key, $this->vars )) { |
|
116 | + public function append($key, $value) { |
|
117 | + if (array_key_exists($key, $this->vars)) { |
|
118 | 118 | $this->vars[$key][] = $value; |
119 | 119 | } |
120 | - else{ |
|
121 | - $this->vars[$key] = array( $value ); |
|
120 | + else { |
|
121 | + $this->vars[$key] = array($value); |
|
122 | 122 | } |
123 | 123 | } |
124 | 124 | |
@@ -130,10 +130,10 @@ discard block |
||
130 | 130 | */ |
131 | 131 | public function printPage() { |
132 | 132 | $data = $this->fetchPage(); |
133 | - if( $data === false ) { |
|
133 | + if ($data === false) { |
|
134 | 134 | return false; |
135 | 135 | } |
136 | - else{ |
|
136 | + else { |
|
137 | 137 | print $data; |
138 | 138 | return true; |
139 | 139 | } |
@@ -166,8 +166,8 @@ discard block |
||
166 | 166 | $l = $this->l10n; |
167 | 167 | $theme = $this->theme; |
168 | 168 | |
169 | - if(!is_null($additionalParams)) { |
|
170 | - $_ = array_merge( $additionalParams, $this->vars ); |
|
169 | + if (!is_null($additionalParams)) { |
|
170 | + $_ = array_merge($additionalParams, $this->vars); |
|
171 | 171 | foreach ($_ as $var => $value) { |
172 | 172 | ${$var} = $value; |
173 | 173 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | public function getPrimaryAction(): IMenuAction { |
69 | 69 | $lowest = null; |
70 | 70 | foreach ($this->headerActions as $action) { |
71 | - if($lowest === null || $action->getPriority() < $lowest->getPriority()) { |
|
71 | + if ($lowest === null || $action->getPriority() < $lowest->getPriority()) { |
|
72 | 72 | $lowest = $action; |
73 | 73 | } |
74 | 74 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $list = []; |
87 | 87 | $primary = $this->getPrimaryAction(); |
88 | 88 | foreach ($this->headerActions as $action) { |
89 | - if($primary !== $action) { |
|
89 | + if ($primary !== $action) { |
|
90 | 90 | $list[] = $action; |
91 | 91 | } |
92 | 92 | } |
@@ -40,15 +40,15 @@ |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | public function render(): string { |
43 | - return '<li>' . |
|
44 | - '<a id="save" data-protected="false" data-owner-display-name="' . Util::sanitizeHTML($this->displayname) . '" data-owner="' . Util::sanitizeHTML($this->owner) . '" data-name="' . Util::sanitizeHTML($this->shareName) . '">' . |
|
45 | - '<span class="icon ' . Util::sanitizeHTML($this->getIcon()) . '"></span>' . |
|
46 | - '<span id="save-button">' . Util::sanitizeHTML($this->getLabel()) . '</span>' . |
|
47 | - '<form class="save-form hidden" action="#">' . |
|
48 | - '<input type="text" id="remote_address" placeholder="[email protected]">' . |
|
49 | - '<button id="save-button-confirm" class="icon-confirm svg" disabled=""></button>' . |
|
50 | - '</form>' . |
|
51 | - '</a>' . |
|
43 | + return '<li>'. |
|
44 | + '<a id="save" data-protected="false" data-owner-display-name="'.Util::sanitizeHTML($this->displayname).'" data-owner="'.Util::sanitizeHTML($this->owner).'" data-name="'.Util::sanitizeHTML($this->shareName).'">'. |
|
45 | + '<span class="icon '.Util::sanitizeHTML($this->getIcon()).'"></span>'. |
|
46 | + '<span id="save-button">'.Util::sanitizeHTML($this->getLabel()).'</span>'. |
|
47 | + '<form class="save-form hidden" action="#">'. |
|
48 | + '<input type="text" id="remote_address" placeholder="[email protected]">'. |
|
49 | + '<button id="save-button-confirm" class="icon-confirm svg" disabled=""></button>'. |
|
50 | + '</form>'. |
|
51 | + '</a>'. |
|
52 | 52 | '</li>'; |
53 | 53 | } |
54 | 54 | } |
55 | 55 | \ No newline at end of file |
@@ -6,76 +6,76 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInitFiles_Sharing |
8 | 8 | { |
9 | - public static $prefixLengthsPsr4 = array ( |
|
9 | + public static $prefixLengthsPsr4 = array( |
|
10 | 10 | 'O' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'OCA\\Files_Sharing\\' => 18, |
13 | 13 | ), |
14 | 14 | ); |
15 | 15 | |
16 | - public static $prefixDirsPsr4 = array ( |
|
16 | + public static $prefixDirsPsr4 = array( |
|
17 | 17 | 'OCA\\Files_Sharing\\' => |
18 | - array ( |
|
19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
18 | + array( |
|
19 | + 0 => __DIR__.'/..'.'/../lib', |
|
20 | 20 | ), |
21 | 21 | ); |
22 | 22 | |
23 | - public static $classMap = array ( |
|
24 | - 'OCA\\Files_Sharing\\Activity\\Filter' => __DIR__ . '/..' . '/../lib/Activity/Filter.php', |
|
25 | - 'OCA\\Files_Sharing\\Activity\\Providers\\Base' => __DIR__ . '/..' . '/../lib/Activity/Providers/Base.php', |
|
26 | - 'OCA\\Files_Sharing\\Activity\\Providers\\Downloads' => __DIR__ . '/..' . '/../lib/Activity/Providers/Downloads.php', |
|
27 | - 'OCA\\Files_Sharing\\Activity\\Providers\\Groups' => __DIR__ . '/..' . '/../lib/Activity/Providers/Groups.php', |
|
28 | - 'OCA\\Files_Sharing\\Activity\\Providers\\PublicLinks' => __DIR__ . '/..' . '/../lib/Activity/Providers/PublicLinks.php', |
|
29 | - 'OCA\\Files_Sharing\\Activity\\Providers\\RemoteShares' => __DIR__ . '/..' . '/../lib/Activity/Providers/RemoteShares.php', |
|
30 | - 'OCA\\Files_Sharing\\Activity\\Providers\\Users' => __DIR__ . '/..' . '/../lib/Activity/Providers/Users.php', |
|
31 | - 'OCA\\Files_Sharing\\Activity\\Settings\\PublicLinks' => __DIR__ . '/..' . '/../lib/Activity/Settings/PublicLinks.php', |
|
32 | - 'OCA\\Files_Sharing\\Activity\\Settings\\RemoteShare' => __DIR__ . '/..' . '/../lib/Activity/Settings/RemoteShare.php', |
|
33 | - 'OCA\\Files_Sharing\\Activity\\Settings\\Shared' => __DIR__ . '/..' . '/../lib/Activity/Settings/Shared.php', |
|
34 | - 'OCA\\Files_Sharing\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
35 | - 'OCA\\Files_Sharing\\Cache' => __DIR__ . '/..' . '/../lib/Cache.php', |
|
36 | - 'OCA\\Files_Sharing\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php', |
|
37 | - 'OCA\\Files_Sharing\\Collaboration\\ShareRecipientSorter' => __DIR__ . '/..' . '/../lib/Collaboration/ShareRecipientSorter.php', |
|
38 | - 'OCA\\Files_Sharing\\Command\\CleanupRemoteStorages' => __DIR__ . '/..' . '/../lib/Command/CleanupRemoteStorages.php', |
|
39 | - 'OCA\\Files_Sharing\\Controller\\ExternalSharesController' => __DIR__ . '/..' . '/../lib/Controller/ExternalSharesController.php', |
|
40 | - 'OCA\\Files_Sharing\\Controller\\PublicPreviewController' => __DIR__ . '/..' . '/../lib/Controller/PublicPreviewController.php', |
|
41 | - 'OCA\\Files_Sharing\\Controller\\RemoteController' => __DIR__ . '/..' . '/../lib/Controller/RemoteController.php', |
|
42 | - 'OCA\\Files_Sharing\\Controller\\ShareAPIController' => __DIR__ . '/..' . '/../lib/Controller/ShareAPIController.php', |
|
43 | - 'OCA\\Files_Sharing\\Controller\\ShareController' => __DIR__ . '/..' . '/../lib/Controller/ShareController.php', |
|
44 | - 'OCA\\Files_Sharing\\Controller\\ShareInfoController' => __DIR__ . '/..' . '/../lib/Controller/ShareInfoController.php', |
|
45 | - 'OCA\\Files_Sharing\\Controller\\ShareesAPIController' => __DIR__ . '/..' . '/../lib/Controller/ShareesAPIController.php', |
|
46 | - 'OCA\\Files_Sharing\\DeleteOrphanedSharesJob' => __DIR__ . '/..' . '/../lib/DeleteOrphanedSharesJob.php', |
|
47 | - 'OCA\\Files_Sharing\\Exceptions\\BrokenPath' => __DIR__ . '/..' . '/../lib/Exceptions/BrokenPath.php', |
|
48 | - 'OCA\\Files_Sharing\\Exceptions\\S2SException' => __DIR__ . '/..' . '/../lib/Exceptions/S2SException.php', |
|
49 | - 'OCA\\Files_Sharing\\ExpireSharesJob' => __DIR__ . '/..' . '/../lib/ExpireSharesJob.php', |
|
50 | - 'OCA\\Files_Sharing\\External\\Cache' => __DIR__ . '/..' . '/../lib/External/Cache.php', |
|
51 | - 'OCA\\Files_Sharing\\External\\Manager' => __DIR__ . '/..' . '/../lib/External/Manager.php', |
|
52 | - 'OCA\\Files_Sharing\\External\\Mount' => __DIR__ . '/..' . '/../lib/External/Mount.php', |
|
53 | - 'OCA\\Files_Sharing\\External\\MountProvider' => __DIR__ . '/..' . '/../lib/External/MountProvider.php', |
|
54 | - 'OCA\\Files_Sharing\\External\\Scanner' => __DIR__ . '/..' . '/../lib/External/Scanner.php', |
|
55 | - 'OCA\\Files_Sharing\\External\\Storage' => __DIR__ . '/..' . '/../lib/External/Storage.php', |
|
56 | - 'OCA\\Files_Sharing\\External\\Watcher' => __DIR__ . '/..' . '/../lib/External/Watcher.php', |
|
57 | - 'OCA\\Files_Sharing\\Helper' => __DIR__ . '/..' . '/../lib/Helper.php', |
|
58 | - 'OCA\\Files_Sharing\\Hooks' => __DIR__ . '/..' . '/../lib/Hooks.php', |
|
59 | - 'OCA\\Files_Sharing\\ISharedStorage' => __DIR__ . '/..' . '/../lib/ISharedStorage.php', |
|
60 | - 'OCA\\Files_Sharing\\Middleware\\OCSShareAPIMiddleware' => __DIR__ . '/..' . '/../lib/Middleware/OCSShareAPIMiddleware.php', |
|
61 | - 'OCA\\Files_Sharing\\Middleware\\ShareInfoMiddleware' => __DIR__ . '/..' . '/../lib/Middleware/ShareInfoMiddleware.php', |
|
62 | - 'OCA\\Files_Sharing\\Middleware\\SharingCheckMiddleware' => __DIR__ . '/..' . '/../lib/Middleware/SharingCheckMiddleware.php', |
|
63 | - 'OCA\\Files_Sharing\\Migration\\OwncloudGuestShareType' => __DIR__ . '/..' . '/../lib/Migration/OwncloudGuestShareType.php', |
|
64 | - 'OCA\\Files_Sharing\\Migration\\SetPasswordColumn' => __DIR__ . '/..' . '/../lib/Migration/SetPasswordColumn.php', |
|
65 | - 'OCA\\Files_Sharing\\MountProvider' => __DIR__ . '/..' . '/../lib/MountProvider.php', |
|
66 | - 'OCA\\Files_Sharing\\Scanner' => __DIR__ . '/..' . '/../lib/Scanner.php', |
|
67 | - 'OCA\\Files_Sharing\\ShareBackend\\File' => __DIR__ . '/..' . '/../lib/ShareBackend/File.php', |
|
68 | - 'OCA\\Files_Sharing\\ShareBackend\\Folder' => __DIR__ . '/..' . '/../lib/ShareBackend/Folder.php', |
|
69 | - 'OCA\\Files_Sharing\\SharedMount' => __DIR__ . '/..' . '/../lib/SharedMount.php', |
|
70 | - 'OCA\\Files_Sharing\\SharedStorage' => __DIR__ . '/..' . '/../lib/SharedStorage.php', |
|
71 | - 'OCA\\Files_Sharing\\Template\\ExternalShareMenuAction' => __DIR__ . '/..' . '/../lib/Template/ExternalShareMenuAction.php', |
|
72 | - 'OCA\\Files_Sharing\\Template\\LinkMenuAction' => __DIR__ . '/..' . '/../lib/Template/LinkMenuAction.php', |
|
73 | - 'OCA\\Files_Sharing\\Updater' => __DIR__ . '/..' . '/../lib/Updater.php', |
|
23 | + public static $classMap = array( |
|
24 | + 'OCA\\Files_Sharing\\Activity\\Filter' => __DIR__.'/..'.'/../lib/Activity/Filter.php', |
|
25 | + 'OCA\\Files_Sharing\\Activity\\Providers\\Base' => __DIR__.'/..'.'/../lib/Activity/Providers/Base.php', |
|
26 | + 'OCA\\Files_Sharing\\Activity\\Providers\\Downloads' => __DIR__.'/..'.'/../lib/Activity/Providers/Downloads.php', |
|
27 | + 'OCA\\Files_Sharing\\Activity\\Providers\\Groups' => __DIR__.'/..'.'/../lib/Activity/Providers/Groups.php', |
|
28 | + 'OCA\\Files_Sharing\\Activity\\Providers\\PublicLinks' => __DIR__.'/..'.'/../lib/Activity/Providers/PublicLinks.php', |
|
29 | + 'OCA\\Files_Sharing\\Activity\\Providers\\RemoteShares' => __DIR__.'/..'.'/../lib/Activity/Providers/RemoteShares.php', |
|
30 | + 'OCA\\Files_Sharing\\Activity\\Providers\\Users' => __DIR__.'/..'.'/../lib/Activity/Providers/Users.php', |
|
31 | + 'OCA\\Files_Sharing\\Activity\\Settings\\PublicLinks' => __DIR__.'/..'.'/../lib/Activity/Settings/PublicLinks.php', |
|
32 | + 'OCA\\Files_Sharing\\Activity\\Settings\\RemoteShare' => __DIR__.'/..'.'/../lib/Activity/Settings/RemoteShare.php', |
|
33 | + 'OCA\\Files_Sharing\\Activity\\Settings\\Shared' => __DIR__.'/..'.'/../lib/Activity/Settings/Shared.php', |
|
34 | + 'OCA\\Files_Sharing\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
35 | + 'OCA\\Files_Sharing\\Cache' => __DIR__.'/..'.'/../lib/Cache.php', |
|
36 | + 'OCA\\Files_Sharing\\Capabilities' => __DIR__.'/..'.'/../lib/Capabilities.php', |
|
37 | + 'OCA\\Files_Sharing\\Collaboration\\ShareRecipientSorter' => __DIR__.'/..'.'/../lib/Collaboration/ShareRecipientSorter.php', |
|
38 | + 'OCA\\Files_Sharing\\Command\\CleanupRemoteStorages' => __DIR__.'/..'.'/../lib/Command/CleanupRemoteStorages.php', |
|
39 | + 'OCA\\Files_Sharing\\Controller\\ExternalSharesController' => __DIR__.'/..'.'/../lib/Controller/ExternalSharesController.php', |
|
40 | + 'OCA\\Files_Sharing\\Controller\\PublicPreviewController' => __DIR__.'/..'.'/../lib/Controller/PublicPreviewController.php', |
|
41 | + 'OCA\\Files_Sharing\\Controller\\RemoteController' => __DIR__.'/..'.'/../lib/Controller/RemoteController.php', |
|
42 | + 'OCA\\Files_Sharing\\Controller\\ShareAPIController' => __DIR__.'/..'.'/../lib/Controller/ShareAPIController.php', |
|
43 | + 'OCA\\Files_Sharing\\Controller\\ShareController' => __DIR__.'/..'.'/../lib/Controller/ShareController.php', |
|
44 | + 'OCA\\Files_Sharing\\Controller\\ShareInfoController' => __DIR__.'/..'.'/../lib/Controller/ShareInfoController.php', |
|
45 | + 'OCA\\Files_Sharing\\Controller\\ShareesAPIController' => __DIR__.'/..'.'/../lib/Controller/ShareesAPIController.php', |
|
46 | + 'OCA\\Files_Sharing\\DeleteOrphanedSharesJob' => __DIR__.'/..'.'/../lib/DeleteOrphanedSharesJob.php', |
|
47 | + 'OCA\\Files_Sharing\\Exceptions\\BrokenPath' => __DIR__.'/..'.'/../lib/Exceptions/BrokenPath.php', |
|
48 | + 'OCA\\Files_Sharing\\Exceptions\\S2SException' => __DIR__.'/..'.'/../lib/Exceptions/S2SException.php', |
|
49 | + 'OCA\\Files_Sharing\\ExpireSharesJob' => __DIR__.'/..'.'/../lib/ExpireSharesJob.php', |
|
50 | + 'OCA\\Files_Sharing\\External\\Cache' => __DIR__.'/..'.'/../lib/External/Cache.php', |
|
51 | + 'OCA\\Files_Sharing\\External\\Manager' => __DIR__.'/..'.'/../lib/External/Manager.php', |
|
52 | + 'OCA\\Files_Sharing\\External\\Mount' => __DIR__.'/..'.'/../lib/External/Mount.php', |
|
53 | + 'OCA\\Files_Sharing\\External\\MountProvider' => __DIR__.'/..'.'/../lib/External/MountProvider.php', |
|
54 | + 'OCA\\Files_Sharing\\External\\Scanner' => __DIR__.'/..'.'/../lib/External/Scanner.php', |
|
55 | + 'OCA\\Files_Sharing\\External\\Storage' => __DIR__.'/..'.'/../lib/External/Storage.php', |
|
56 | + 'OCA\\Files_Sharing\\External\\Watcher' => __DIR__.'/..'.'/../lib/External/Watcher.php', |
|
57 | + 'OCA\\Files_Sharing\\Helper' => __DIR__.'/..'.'/../lib/Helper.php', |
|
58 | + 'OCA\\Files_Sharing\\Hooks' => __DIR__.'/..'.'/../lib/Hooks.php', |
|
59 | + 'OCA\\Files_Sharing\\ISharedStorage' => __DIR__.'/..'.'/../lib/ISharedStorage.php', |
|
60 | + 'OCA\\Files_Sharing\\Middleware\\OCSShareAPIMiddleware' => __DIR__.'/..'.'/../lib/Middleware/OCSShareAPIMiddleware.php', |
|
61 | + 'OCA\\Files_Sharing\\Middleware\\ShareInfoMiddleware' => __DIR__.'/..'.'/../lib/Middleware/ShareInfoMiddleware.php', |
|
62 | + 'OCA\\Files_Sharing\\Middleware\\SharingCheckMiddleware' => __DIR__.'/..'.'/../lib/Middleware/SharingCheckMiddleware.php', |
|
63 | + 'OCA\\Files_Sharing\\Migration\\OwncloudGuestShareType' => __DIR__.'/..'.'/../lib/Migration/OwncloudGuestShareType.php', |
|
64 | + 'OCA\\Files_Sharing\\Migration\\SetPasswordColumn' => __DIR__.'/..'.'/../lib/Migration/SetPasswordColumn.php', |
|
65 | + 'OCA\\Files_Sharing\\MountProvider' => __DIR__.'/..'.'/../lib/MountProvider.php', |
|
66 | + 'OCA\\Files_Sharing\\Scanner' => __DIR__.'/..'.'/../lib/Scanner.php', |
|
67 | + 'OCA\\Files_Sharing\\ShareBackend\\File' => __DIR__.'/..'.'/../lib/ShareBackend/File.php', |
|
68 | + 'OCA\\Files_Sharing\\ShareBackend\\Folder' => __DIR__.'/..'.'/../lib/ShareBackend/Folder.php', |
|
69 | + 'OCA\\Files_Sharing\\SharedMount' => __DIR__.'/..'.'/../lib/SharedMount.php', |
|
70 | + 'OCA\\Files_Sharing\\SharedStorage' => __DIR__.'/..'.'/../lib/SharedStorage.php', |
|
71 | + 'OCA\\Files_Sharing\\Template\\ExternalShareMenuAction' => __DIR__.'/..'.'/../lib/Template/ExternalShareMenuAction.php', |
|
72 | + 'OCA\\Files_Sharing\\Template\\LinkMenuAction' => __DIR__.'/..'.'/../lib/Template/LinkMenuAction.php', |
|
73 | + 'OCA\\Files_Sharing\\Updater' => __DIR__.'/..'.'/../lib/Updater.php', |
|
74 | 74 | ); |
75 | 75 | |
76 | 76 | public static function getInitializer(ClassLoader $loader) |
77 | 77 | { |
78 | - return \Closure::bind(function () use ($loader) { |
|
78 | + return \Closure::bind(function() use ($loader) { |
|
79 | 79 | $loader->prefixLengthsPsr4 = ComposerStaticInitFiles_Sharing::$prefixLengthsPsr4; |
80 | 80 | $loader->prefixDirsPsr4 = ComposerStaticInitFiles_Sharing::$prefixDirsPsr4; |
81 | 81 | $loader->classMap = ComposerStaticInitFiles_Sharing::$classMap; |
@@ -6,54 +6,54 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\Files_Sharing\\Activity\\Filter' => $baseDir . '/../lib/Activity/Filter.php', |
|
10 | - 'OCA\\Files_Sharing\\Activity\\Providers\\Base' => $baseDir . '/../lib/Activity/Providers/Base.php', |
|
11 | - 'OCA\\Files_Sharing\\Activity\\Providers\\Downloads' => $baseDir . '/../lib/Activity/Providers/Downloads.php', |
|
12 | - 'OCA\\Files_Sharing\\Activity\\Providers\\Groups' => $baseDir . '/../lib/Activity/Providers/Groups.php', |
|
13 | - 'OCA\\Files_Sharing\\Activity\\Providers\\PublicLinks' => $baseDir . '/../lib/Activity/Providers/PublicLinks.php', |
|
14 | - 'OCA\\Files_Sharing\\Activity\\Providers\\RemoteShares' => $baseDir . '/../lib/Activity/Providers/RemoteShares.php', |
|
15 | - 'OCA\\Files_Sharing\\Activity\\Providers\\Users' => $baseDir . '/../lib/Activity/Providers/Users.php', |
|
16 | - 'OCA\\Files_Sharing\\Activity\\Settings\\PublicLinks' => $baseDir . '/../lib/Activity/Settings/PublicLinks.php', |
|
17 | - 'OCA\\Files_Sharing\\Activity\\Settings\\RemoteShare' => $baseDir . '/../lib/Activity/Settings/RemoteShare.php', |
|
18 | - 'OCA\\Files_Sharing\\Activity\\Settings\\Shared' => $baseDir . '/../lib/Activity/Settings/Shared.php', |
|
19 | - 'OCA\\Files_Sharing\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
20 | - 'OCA\\Files_Sharing\\Cache' => $baseDir . '/../lib/Cache.php', |
|
21 | - 'OCA\\Files_Sharing\\Capabilities' => $baseDir . '/../lib/Capabilities.php', |
|
22 | - 'OCA\\Files_Sharing\\Collaboration\\ShareRecipientSorter' => $baseDir . '/../lib/Collaboration/ShareRecipientSorter.php', |
|
23 | - 'OCA\\Files_Sharing\\Command\\CleanupRemoteStorages' => $baseDir . '/../lib/Command/CleanupRemoteStorages.php', |
|
24 | - 'OCA\\Files_Sharing\\Controller\\ExternalSharesController' => $baseDir . '/../lib/Controller/ExternalSharesController.php', |
|
25 | - 'OCA\\Files_Sharing\\Controller\\PublicPreviewController' => $baseDir . '/../lib/Controller/PublicPreviewController.php', |
|
26 | - 'OCA\\Files_Sharing\\Controller\\RemoteController' => $baseDir . '/../lib/Controller/RemoteController.php', |
|
27 | - 'OCA\\Files_Sharing\\Controller\\ShareAPIController' => $baseDir . '/../lib/Controller/ShareAPIController.php', |
|
28 | - 'OCA\\Files_Sharing\\Controller\\ShareController' => $baseDir . '/../lib/Controller/ShareController.php', |
|
29 | - 'OCA\\Files_Sharing\\Controller\\ShareInfoController' => $baseDir . '/../lib/Controller/ShareInfoController.php', |
|
30 | - 'OCA\\Files_Sharing\\Controller\\ShareesAPIController' => $baseDir . '/../lib/Controller/ShareesAPIController.php', |
|
31 | - 'OCA\\Files_Sharing\\DeleteOrphanedSharesJob' => $baseDir . '/../lib/DeleteOrphanedSharesJob.php', |
|
32 | - 'OCA\\Files_Sharing\\Exceptions\\BrokenPath' => $baseDir . '/../lib/Exceptions/BrokenPath.php', |
|
33 | - 'OCA\\Files_Sharing\\Exceptions\\S2SException' => $baseDir . '/../lib/Exceptions/S2SException.php', |
|
34 | - 'OCA\\Files_Sharing\\ExpireSharesJob' => $baseDir . '/../lib/ExpireSharesJob.php', |
|
35 | - 'OCA\\Files_Sharing\\External\\Cache' => $baseDir . '/../lib/External/Cache.php', |
|
36 | - 'OCA\\Files_Sharing\\External\\Manager' => $baseDir . '/../lib/External/Manager.php', |
|
37 | - 'OCA\\Files_Sharing\\External\\Mount' => $baseDir . '/../lib/External/Mount.php', |
|
38 | - 'OCA\\Files_Sharing\\External\\MountProvider' => $baseDir . '/../lib/External/MountProvider.php', |
|
39 | - 'OCA\\Files_Sharing\\External\\Scanner' => $baseDir . '/../lib/External/Scanner.php', |
|
40 | - 'OCA\\Files_Sharing\\External\\Storage' => $baseDir . '/../lib/External/Storage.php', |
|
41 | - 'OCA\\Files_Sharing\\External\\Watcher' => $baseDir . '/../lib/External/Watcher.php', |
|
42 | - 'OCA\\Files_Sharing\\Helper' => $baseDir . '/../lib/Helper.php', |
|
43 | - 'OCA\\Files_Sharing\\Hooks' => $baseDir . '/../lib/Hooks.php', |
|
44 | - 'OCA\\Files_Sharing\\ISharedStorage' => $baseDir . '/../lib/ISharedStorage.php', |
|
45 | - 'OCA\\Files_Sharing\\Middleware\\OCSShareAPIMiddleware' => $baseDir . '/../lib/Middleware/OCSShareAPIMiddleware.php', |
|
46 | - 'OCA\\Files_Sharing\\Middleware\\ShareInfoMiddleware' => $baseDir . '/../lib/Middleware/ShareInfoMiddleware.php', |
|
47 | - 'OCA\\Files_Sharing\\Middleware\\SharingCheckMiddleware' => $baseDir . '/../lib/Middleware/SharingCheckMiddleware.php', |
|
48 | - 'OCA\\Files_Sharing\\Migration\\OwncloudGuestShareType' => $baseDir . '/../lib/Migration/OwncloudGuestShareType.php', |
|
49 | - 'OCA\\Files_Sharing\\Migration\\SetPasswordColumn' => $baseDir . '/../lib/Migration/SetPasswordColumn.php', |
|
50 | - 'OCA\\Files_Sharing\\MountProvider' => $baseDir . '/../lib/MountProvider.php', |
|
51 | - 'OCA\\Files_Sharing\\Scanner' => $baseDir . '/../lib/Scanner.php', |
|
52 | - 'OCA\\Files_Sharing\\ShareBackend\\File' => $baseDir . '/../lib/ShareBackend/File.php', |
|
53 | - 'OCA\\Files_Sharing\\ShareBackend\\Folder' => $baseDir . '/../lib/ShareBackend/Folder.php', |
|
54 | - 'OCA\\Files_Sharing\\SharedMount' => $baseDir . '/../lib/SharedMount.php', |
|
55 | - 'OCA\\Files_Sharing\\SharedStorage' => $baseDir . '/../lib/SharedStorage.php', |
|
56 | - 'OCA\\Files_Sharing\\Template\\ExternalShareMenuAction' => $baseDir . '/../lib/Template/ExternalShareMenuAction.php', |
|
57 | - 'OCA\\Files_Sharing\\Template\\LinkMenuAction' => $baseDir . '/../lib/Template/LinkMenuAction.php', |
|
58 | - 'OCA\\Files_Sharing\\Updater' => $baseDir . '/../lib/Updater.php', |
|
9 | + 'OCA\\Files_Sharing\\Activity\\Filter' => $baseDir.'/../lib/Activity/Filter.php', |
|
10 | + 'OCA\\Files_Sharing\\Activity\\Providers\\Base' => $baseDir.'/../lib/Activity/Providers/Base.php', |
|
11 | + 'OCA\\Files_Sharing\\Activity\\Providers\\Downloads' => $baseDir.'/../lib/Activity/Providers/Downloads.php', |
|
12 | + 'OCA\\Files_Sharing\\Activity\\Providers\\Groups' => $baseDir.'/../lib/Activity/Providers/Groups.php', |
|
13 | + 'OCA\\Files_Sharing\\Activity\\Providers\\PublicLinks' => $baseDir.'/../lib/Activity/Providers/PublicLinks.php', |
|
14 | + 'OCA\\Files_Sharing\\Activity\\Providers\\RemoteShares' => $baseDir.'/../lib/Activity/Providers/RemoteShares.php', |
|
15 | + 'OCA\\Files_Sharing\\Activity\\Providers\\Users' => $baseDir.'/../lib/Activity/Providers/Users.php', |
|
16 | + 'OCA\\Files_Sharing\\Activity\\Settings\\PublicLinks' => $baseDir.'/../lib/Activity/Settings/PublicLinks.php', |
|
17 | + 'OCA\\Files_Sharing\\Activity\\Settings\\RemoteShare' => $baseDir.'/../lib/Activity/Settings/RemoteShare.php', |
|
18 | + 'OCA\\Files_Sharing\\Activity\\Settings\\Shared' => $baseDir.'/../lib/Activity/Settings/Shared.php', |
|
19 | + 'OCA\\Files_Sharing\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
20 | + 'OCA\\Files_Sharing\\Cache' => $baseDir.'/../lib/Cache.php', |
|
21 | + 'OCA\\Files_Sharing\\Capabilities' => $baseDir.'/../lib/Capabilities.php', |
|
22 | + 'OCA\\Files_Sharing\\Collaboration\\ShareRecipientSorter' => $baseDir.'/../lib/Collaboration/ShareRecipientSorter.php', |
|
23 | + 'OCA\\Files_Sharing\\Command\\CleanupRemoteStorages' => $baseDir.'/../lib/Command/CleanupRemoteStorages.php', |
|
24 | + 'OCA\\Files_Sharing\\Controller\\ExternalSharesController' => $baseDir.'/../lib/Controller/ExternalSharesController.php', |
|
25 | + 'OCA\\Files_Sharing\\Controller\\PublicPreviewController' => $baseDir.'/../lib/Controller/PublicPreviewController.php', |
|
26 | + 'OCA\\Files_Sharing\\Controller\\RemoteController' => $baseDir.'/../lib/Controller/RemoteController.php', |
|
27 | + 'OCA\\Files_Sharing\\Controller\\ShareAPIController' => $baseDir.'/../lib/Controller/ShareAPIController.php', |
|
28 | + 'OCA\\Files_Sharing\\Controller\\ShareController' => $baseDir.'/../lib/Controller/ShareController.php', |
|
29 | + 'OCA\\Files_Sharing\\Controller\\ShareInfoController' => $baseDir.'/../lib/Controller/ShareInfoController.php', |
|
30 | + 'OCA\\Files_Sharing\\Controller\\ShareesAPIController' => $baseDir.'/../lib/Controller/ShareesAPIController.php', |
|
31 | + 'OCA\\Files_Sharing\\DeleteOrphanedSharesJob' => $baseDir.'/../lib/DeleteOrphanedSharesJob.php', |
|
32 | + 'OCA\\Files_Sharing\\Exceptions\\BrokenPath' => $baseDir.'/../lib/Exceptions/BrokenPath.php', |
|
33 | + 'OCA\\Files_Sharing\\Exceptions\\S2SException' => $baseDir.'/../lib/Exceptions/S2SException.php', |
|
34 | + 'OCA\\Files_Sharing\\ExpireSharesJob' => $baseDir.'/../lib/ExpireSharesJob.php', |
|
35 | + 'OCA\\Files_Sharing\\External\\Cache' => $baseDir.'/../lib/External/Cache.php', |
|
36 | + 'OCA\\Files_Sharing\\External\\Manager' => $baseDir.'/../lib/External/Manager.php', |
|
37 | + 'OCA\\Files_Sharing\\External\\Mount' => $baseDir.'/../lib/External/Mount.php', |
|
38 | + 'OCA\\Files_Sharing\\External\\MountProvider' => $baseDir.'/../lib/External/MountProvider.php', |
|
39 | + 'OCA\\Files_Sharing\\External\\Scanner' => $baseDir.'/../lib/External/Scanner.php', |
|
40 | + 'OCA\\Files_Sharing\\External\\Storage' => $baseDir.'/../lib/External/Storage.php', |
|
41 | + 'OCA\\Files_Sharing\\External\\Watcher' => $baseDir.'/../lib/External/Watcher.php', |
|
42 | + 'OCA\\Files_Sharing\\Helper' => $baseDir.'/../lib/Helper.php', |
|
43 | + 'OCA\\Files_Sharing\\Hooks' => $baseDir.'/../lib/Hooks.php', |
|
44 | + 'OCA\\Files_Sharing\\ISharedStorage' => $baseDir.'/../lib/ISharedStorage.php', |
|
45 | + 'OCA\\Files_Sharing\\Middleware\\OCSShareAPIMiddleware' => $baseDir.'/../lib/Middleware/OCSShareAPIMiddleware.php', |
|
46 | + 'OCA\\Files_Sharing\\Middleware\\ShareInfoMiddleware' => $baseDir.'/../lib/Middleware/ShareInfoMiddleware.php', |
|
47 | + 'OCA\\Files_Sharing\\Middleware\\SharingCheckMiddleware' => $baseDir.'/../lib/Middleware/SharingCheckMiddleware.php', |
|
48 | + 'OCA\\Files_Sharing\\Migration\\OwncloudGuestShareType' => $baseDir.'/../lib/Migration/OwncloudGuestShareType.php', |
|
49 | + 'OCA\\Files_Sharing\\Migration\\SetPasswordColumn' => $baseDir.'/../lib/Migration/SetPasswordColumn.php', |
|
50 | + 'OCA\\Files_Sharing\\MountProvider' => $baseDir.'/../lib/MountProvider.php', |
|
51 | + 'OCA\\Files_Sharing\\Scanner' => $baseDir.'/../lib/Scanner.php', |
|
52 | + 'OCA\\Files_Sharing\\ShareBackend\\File' => $baseDir.'/../lib/ShareBackend/File.php', |
|
53 | + 'OCA\\Files_Sharing\\ShareBackend\\Folder' => $baseDir.'/../lib/ShareBackend/Folder.php', |
|
54 | + 'OCA\\Files_Sharing\\SharedMount' => $baseDir.'/../lib/SharedMount.php', |
|
55 | + 'OCA\\Files_Sharing\\SharedStorage' => $baseDir.'/../lib/SharedStorage.php', |
|
56 | + 'OCA\\Files_Sharing\\Template\\ExternalShareMenuAction' => $baseDir.'/../lib/Template/ExternalShareMenuAction.php', |
|
57 | + 'OCA\\Files_Sharing\\Template\\LinkMenuAction' => $baseDir.'/../lib/Template/LinkMenuAction.php', |
|
58 | + 'OCA\\Files_Sharing\\Updater' => $baseDir.'/../lib/Updater.php', |
|
59 | 59 | ); |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | <meta charset="utf-8"> |
5 | 5 | <title> |
6 | 6 | <?php |
7 | - p(!empty($_['application'])?$_['application'].' - ':''); |
|
7 | + p(!empty($_['application']) ? $_['application'].' - ' : ''); |
|
8 | 8 | p($theme->getTitle()); |
9 | 9 | ?> |
10 | 10 | </title> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | <meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>"> |
15 | 15 | <meta name="apple-mobile-web-app-capable" content="yes"> |
16 | 16 | <meta name="apple-mobile-web-app-status-bar-style" content="black"> |
17 | - <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid']!='files')? $_['application']:$theme->getTitle()); ?>"> |
|
17 | + <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid'] != 'files') ? $_['application'] : $theme->getTitle()); ?>"> |
|
18 | 18 | <meta name="mobile-web-app-capable" content="yes"> |
19 | 19 | <meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>"> |
20 | 20 | <link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>"> |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | <?php emit_script_loading_tags($_); ?> |
26 | 26 | <?php print_unescaped($_['headers']); ?> |
27 | 27 | </head> |
28 | -<body id="<?php p($_['bodyid']);?>"> |
|
28 | +<body id="<?php p($_['bodyid']); ?>"> |
|
29 | 29 | <?php include('layout.noscript.warning.php'); ?> |
30 | 30 | <header> |
31 | 31 | <div id="header" class="<?php p($_['header-classes']); ?>"> |
@@ -43,23 +43,23 @@ discard block |
||
43 | 43 | |
44 | 44 | <?php |
45 | 45 | /** @var \OCP\AppFramework\Http\Template\PublicTemplateResponse $template */ |
46 | - if($template->getActionCount() !== 0) { |
|
46 | + if ($template->getActionCount() !== 0) { |
|
47 | 47 | $primary = $template->getPrimaryAction(); |
48 | 48 | $others = $template->getOtherActions(); |
49 | 49 | ?> |
50 | 50 | <div class="header-right"> |
51 | - <span id="header-primary-action" class="<?php if($template->getActionCount() === 1) { p($primary->getIcon()); } ?>"> |
|
51 | + <span id="header-primary-action" class="<?php if ($template->getActionCount() === 1) { p($primary->getIcon()); } ?>"> |
|
52 | 52 | <a href="<?php p($primary->getLink()); ?>"> |
53 | 53 | <span class="share-menutoggle-text"><?php p($primary->getLabel()) ?></span> |
54 | 54 | </a> |
55 | 55 | </span> |
56 | - <?php if($template->getActionCount()>1) { ?> |
|
56 | + <?php if ($template->getActionCount() > 1) { ?> |
|
57 | 57 | <span class="menutoggle icon-more-white"></span> |
58 | 58 | <div id="share-menu" class="popovermenu menu"> |
59 | 59 | <ul> |
60 | 60 | <?php |
61 | 61 | /** @var \OCP\AppFramework\Http\Template\IMenuAction $action */ |
62 | - foreach($template->getOtherActions() as $action) { |
|
62 | + foreach ($template->getOtherActions() as $action) { |
|
63 | 63 | print_unescaped($action->render()); |
64 | 64 | } |
65 | 65 | ?> |
@@ -43,12 +43,12 @@ |
||
43 | 43 | * @return string |
44 | 44 | */ |
45 | 45 | public function render(): string { |
46 | - return '<li>' . |
|
47 | - '<a id="directLink-container">' . |
|
48 | - '<span class="icon ' . Util::sanitizeHTML($this->getIcon()) . '"></span>' . |
|
49 | - '<label for="directLink">' . Util::sanitizeHTML($this->getLabel()) . '</label>' . |
|
50 | - '<input id="directLink" type="text" readonly="" value="' . Util::sanitizeHTML($this->getLink()) . '">' . |
|
51 | - '</a>' . |
|
46 | + return '<li>'. |
|
47 | + '<a id="directLink-container">'. |
|
48 | + '<span class="icon '.Util::sanitizeHTML($this->getIcon()).'"></span>'. |
|
49 | + '<label for="directLink">'.Util::sanitizeHTML($this->getLabel()).'</label>'. |
|
50 | + '<input id="directLink" type="text" readonly="" value="'.Util::sanitizeHTML($this->getLink()).'">'. |
|
51 | + '</a>'. |
|
52 | 52 | '</li>'; |
53 | 53 | } |
54 | 54 | } |
55 | 55 | \ No newline at end of file |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * "admin". |
72 | 72 | * @param bool $registerCall = true |
73 | 73 | */ |
74 | - public function __construct( $app, $name, $renderAs = "", $registerCall = true ) { |
|
74 | + public function __construct($app, $name, $renderAs = "", $registerCall = true) { |
|
75 | 75 | // Read the selected theme from the config file |
76 | 76 | self::initTemplateEngine($renderAs); |
77 | 77 | |
@@ -98,20 +98,20 @@ discard block |
||
98 | 98 | * @param string $renderAs |
99 | 99 | */ |
100 | 100 | public static function initTemplateEngine($renderAs) { |
101 | - if (self::$initTemplateEngineFirstRun){ |
|
101 | + if (self::$initTemplateEngineFirstRun) { |
|
102 | 102 | |
103 | 103 | //apps that started before the template initialization can load their own scripts/styles |
104 | 104 | //so to make sure this scripts/styles here are loaded first we use OC_Util::addScript() with $prepend=true |
105 | 105 | //meaning the last script/style in this list will be loaded first |
106 | - if (\OC::$server->getSystemConfig()->getValue ('installed', false) && $renderAs !== 'error' && !\OCP\Util::needUpgrade()) { |
|
107 | - if (\OC::$server->getConfig ()->getAppValue ( 'core', 'backgroundjobs_mode', 'ajax' ) == 'ajax') { |
|
108 | - OC_Util::addScript ( 'backgroundjobs', null, true ); |
|
106 | + if (\OC::$server->getSystemConfig()->getValue('installed', false) && $renderAs !== 'error' && !\OCP\Util::needUpgrade()) { |
|
107 | + if (\OC::$server->getConfig()->getAppValue('core', 'backgroundjobs_mode', 'ajax') == 'ajax') { |
|
108 | + OC_Util::addScript('backgroundjobs', null, true); |
|
109 | 109 | } |
110 | 110 | } |
111 | 111 | |
112 | 112 | OC_Util::addStyle('server', null, true); |
113 | - OC_Util::addStyle('jquery-ui-fixes',null,true); |
|
114 | - OC_Util::addVendorStyle('jquery-ui/themes/base/jquery-ui',null,true); |
|
113 | + OC_Util::addStyle('jquery-ui-fixes', null, true); |
|
114 | + OC_Util::addVendorStyle('jquery-ui/themes/base/jquery-ui', null, true); |
|
115 | 115 | OC_Util::addVendorStyle('select2/select2', null, true); |
116 | 116 | OC_Util::addStyle('jquery.ocdialog'); |
117 | 117 | OC_Util::addTranslations("core", null, true); |
@@ -126,13 +126,13 @@ discard block |
||
126 | 126 | // Add the stuff we need always |
127 | 127 | // following logic will import all vendor libraries that are |
128 | 128 | // specified in core/js/core.json |
129 | - $fileContent = file_get_contents(OC::$SERVERROOT . '/core/js/core.json'); |
|
130 | - if($fileContent !== false) { |
|
129 | + $fileContent = file_get_contents(OC::$SERVERROOT.'/core/js/core.json'); |
|
130 | + if ($fileContent !== false) { |
|
131 | 131 | $coreDependencies = json_decode($fileContent, true); |
132 | - foreach(array_reverse($coreDependencies['vendor']) as $vendorLibrary) { |
|
132 | + foreach (array_reverse($coreDependencies['vendor']) as $vendorLibrary) { |
|
133 | 133 | //remove trailing ".js" as addVendorScript will append it |
134 | 134 | OC_Util::addVendorScript( |
135 | - substr($vendorLibrary, 0, -3),null,true); |
|
135 | + substr($vendorLibrary, 0, -3), null, true); |
|
136 | 136 | } |
137 | 137 | } else { |
138 | 138 | throw new \Exception('Cannot read core/js/core.json'); |
@@ -167,12 +167,12 @@ discard block |
||
167 | 167 | */ |
168 | 168 | protected function findTemplate($theme, $app, $name) { |
169 | 169 | // Check if it is a app template or not. |
170 | - if( $app !== '' ) { |
|
170 | + if ($app !== '') { |
|
171 | 171 | $dirs = $this->getAppTemplateDirs($theme, $app, OC::$SERVERROOT, OC_App::getAppPath($app)); |
172 | 172 | } else { |
173 | 173 | $dirs = $this->getCoreTemplateDirs($theme, OC::$SERVERROOT); |
174 | 174 | } |
175 | - $locator = new \OC\Template\TemplateFileLocator( $dirs ); |
|
175 | + $locator = new \OC\Template\TemplateFileLocator($dirs); |
|
176 | 176 | $template = $locator->find($name); |
177 | 177 | $path = $locator->getPath(); |
178 | 178 | return array($path, $template); |
@@ -185,8 +185,8 @@ discard block |
||
185 | 185 | * @param string $text the text content for the element. If $text is null then the |
186 | 186 | * element will be written as empty element. So use "" to get a closing tag. |
187 | 187 | */ |
188 | - public function addHeader($tag, $attributes, $text=null) { |
|
189 | - $this->headers[]= array( |
|
188 | + public function addHeader($tag, $attributes, $text = null) { |
|
189 | + $this->headers[] = array( |
|
190 | 190 | 'tag' => $tag, |
191 | 191 | 'attributes' => $attributes, |
192 | 192 | 'text' => $text |
@@ -203,10 +203,10 @@ discard block |
||
203 | 203 | public function fetchPage($additionalParams = null) { |
204 | 204 | $data = parent::fetchPage($additionalParams); |
205 | 205 | |
206 | - if( $this->renderAs ) { |
|
206 | + if ($this->renderAs) { |
|
207 | 207 | $page = new TemplateLayout($this->renderAs, $this->app); |
208 | 208 | |
209 | - if(is_array($additionalParams)) { |
|
209 | + if (is_array($additionalParams)) { |
|
210 | 210 | foreach ($additionalParams as $key => $value) { |
211 | 211 | $page->assign($key, $value); |
212 | 212 | } |
@@ -214,12 +214,12 @@ discard block |
||
214 | 214 | |
215 | 215 | // Add custom headers |
216 | 216 | $headers = ''; |
217 | - foreach(OC_Util::$headers as $header) { |
|
217 | + foreach (OC_Util::$headers as $header) { |
|
218 | 218 | $headers .= '<'.\OCP\Util::sanitizeHTML($header['tag']); |
219 | - if ( strcasecmp($header['tag'], 'script') === 0 && in_array('src', array_map('strtolower', array_keys($header['attributes']))) ) { |
|
219 | + if (strcasecmp($header['tag'], 'script') === 0 && in_array('src', array_map('strtolower', array_keys($header['attributes'])))) { |
|
220 | 220 | $headers .= ' defer'; |
221 | 221 | } |
222 | - foreach($header['attributes'] as $name=>$value) { |
|
222 | + foreach ($header['attributes'] as $name=>$value) { |
|
223 | 223 | $headers .= ' '.\OCP\Util::sanitizeHTML($name).'="'.\OCP\Util::sanitizeHTML($value).'"'; |
224 | 224 | } |
225 | 225 | if ($header['text'] !== null) { |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | * Includes another template. use <?php echo $this->inc('template'); ?> to |
249 | 249 | * do this. |
250 | 250 | */ |
251 | - public function inc( $file, $additionalParams = null ) { |
|
251 | + public function inc($file, $additionalParams = null) { |
|
252 | 252 | return $this->load($this->path.$file.'.php', $additionalParams); |
253 | 253 | } |
254 | 254 | |
@@ -259,10 +259,10 @@ discard block |
||
259 | 259 | * @param array $parameters Parameters for the template |
260 | 260 | * @return boolean|null |
261 | 261 | */ |
262 | - public static function printUserPage( $application, $name, $parameters = array() ) { |
|
263 | - $content = new OC_Template( $application, $name, "user" ); |
|
264 | - foreach( $parameters as $key => $value ) { |
|
265 | - $content->assign( $key, $value ); |
|
262 | + public static function printUserPage($application, $name, $parameters = array()) { |
|
263 | + $content = new OC_Template($application, $name, "user"); |
|
264 | + foreach ($parameters as $key => $value) { |
|
265 | + $content->assign($key, $value); |
|
266 | 266 | } |
267 | 267 | print $content->printPage(); |
268 | 268 | } |
@@ -274,10 +274,10 @@ discard block |
||
274 | 274 | * @param array $parameters Parameters for the template |
275 | 275 | * @return bool |
276 | 276 | */ |
277 | - public static function printAdminPage( $application, $name, $parameters = array() ) { |
|
278 | - $content = new OC_Template( $application, $name, "admin" ); |
|
279 | - foreach( $parameters as $key => $value ) { |
|
280 | - $content->assign( $key, $value ); |
|
277 | + public static function printAdminPage($application, $name, $parameters = array()) { |
|
278 | + $content = new OC_Template($application, $name, "admin"); |
|
279 | + foreach ($parameters as $key => $value) { |
|
280 | + $content->assign($key, $value); |
|
281 | 281 | } |
282 | 282 | return $content->printPage(); |
283 | 283 | } |
@@ -289,10 +289,10 @@ discard block |
||
289 | 289 | * @param array|string $parameters Parameters for the template |
290 | 290 | * @return bool |
291 | 291 | */ |
292 | - public static function printGuestPage( $application, $name, $parameters = array() ) { |
|
293 | - $content = new OC_Template( $application, $name, "guest" ); |
|
294 | - foreach( $parameters as $key => $value ) { |
|
295 | - $content->assign( $key, $value ); |
|
292 | + public static function printGuestPage($application, $name, $parameters = array()) { |
|
293 | + $content = new OC_Template($application, $name, "guest"); |
|
294 | + foreach ($parameters as $key => $value) { |
|
295 | + $content->assign($key, $value); |
|
296 | 296 | } |
297 | 297 | return $content->printPage(); |
298 | 298 | } |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | * @param string $hint An optional hint message - needs to be properly escape |
304 | 304 | * @suppress PhanAccessMethodInternal |
305 | 305 | */ |
306 | - public static function printErrorPage( $error_msg, $hint = '' ) { |
|
306 | + public static function printErrorPage($error_msg, $hint = '') { |
|
307 | 307 | if (\OC::$server->getAppManager()->isEnabledForUser('theming') && !\OC_App::isAppLoaded('theming')) { |
308 | 308 | \OC_App::loadApp('theming'); |
309 | 309 | } |
@@ -315,16 +315,16 @@ discard block |
||
315 | 315 | } |
316 | 316 | |
317 | 317 | try { |
318 | - $content = new \OC_Template( '', 'error', 'error', false ); |
|
318 | + $content = new \OC_Template('', 'error', 'error', false); |
|
319 | 319 | $errors = array(array('error' => $error_msg, 'hint' => $hint)); |
320 | - $content->assign( 'errors', $errors ); |
|
320 | + $content->assign('errors', $errors); |
|
321 | 321 | $content->printPage(); |
322 | 322 | } catch (\Exception $e) { |
323 | 323 | $logger = \OC::$server->getLogger(); |
324 | 324 | $logger->error("$error_msg $hint", ['app' => 'core']); |
325 | 325 | $logger->logException($e, ['app' => 'core']); |
326 | 326 | |
327 | - header(self::getHttpProtocol() . ' 500 Internal Server Error'); |
|
327 | + header(self::getHttpProtocol().' 500 Internal Server Error'); |
|
328 | 328 | header('Content-Type: text/plain; charset=utf-8'); |
329 | 329 | print("$error_msg $hint"); |
330 | 330 | } |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | $logger->logException($exception, ['app' => 'core']); |
361 | 361 | $logger->logException($e, ['app' => 'core']); |
362 | 362 | |
363 | - header(self::getHttpProtocol() . ' 500 Internal Server Error'); |
|
363 | + header(self::getHttpProtocol().' 500 Internal Server Error'); |
|
364 | 364 | header('Content-Type: text/plain; charset=utf-8'); |
365 | 365 | print("Internal Server Error\n\n"); |
366 | 366 | print("The server encountered an internal error and was unable to complete your request.\n"); |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | 'HTTP/1.1', |
387 | 387 | 'HTTP/2', |
388 | 388 | ]; |
389 | - if(in_array($claimedProtocol, $validProtocols, true)) { |
|
389 | + if (in_array($claimedProtocol, $validProtocols, true)) { |
|
390 | 390 | return $claimedProtocol; |
391 | 391 | } |
392 | 392 | return 'HTTP/1.1'; |
@@ -56,44 +56,44 @@ discard block |
||
56 | 56 | * @param string $renderAs |
57 | 57 | * @param string $appId application id |
58 | 58 | */ |
59 | - public function __construct( $renderAs, $appId = '' ) { |
|
59 | + public function __construct($renderAs, $appId = '') { |
|
60 | 60 | |
61 | 61 | // yes - should be injected .... |
62 | 62 | $this->config = \OC::$server->getConfig(); |
63 | 63 | |
64 | 64 | |
65 | 65 | // Decide which page we show |
66 | - if($renderAs == 'user') { |
|
67 | - parent::__construct( 'core', 'layout.user' ); |
|
68 | - if(in_array(\OC_App::getCurrentApp(), ['settings','admin', 'help']) !== false) { |
|
66 | + if ($renderAs == 'user') { |
|
67 | + parent::__construct('core', 'layout.user'); |
|
68 | + if (in_array(\OC_App::getCurrentApp(), ['settings', 'admin', 'help']) !== false) { |
|
69 | 69 | $this->assign('bodyid', 'body-settings'); |
70 | - }else{ |
|
70 | + } else { |
|
71 | 71 | $this->assign('bodyid', 'body-user'); |
72 | 72 | } |
73 | 73 | |
74 | 74 | // Code integrity notification |
75 | 75 | $integrityChecker = \OC::$server->getIntegrityCodeChecker(); |
76 | - if(\OC_User::isAdminUser(\OC_User::getUser()) && $integrityChecker->isCodeCheckEnforced() && !$integrityChecker->hasPassedCheck()) { |
|
76 | + if (\OC_User::isAdminUser(\OC_User::getUser()) && $integrityChecker->isCodeCheckEnforced() && !$integrityChecker->hasPassedCheck()) { |
|
77 | 77 | \OCP\Util::addScript('core', 'integritycheck-failed-notification'); |
78 | 78 | } |
79 | 79 | |
80 | 80 | // Add navigation entry |
81 | - $this->assign( 'application', ''); |
|
82 | - $this->assign( 'appid', $appId ); |
|
81 | + $this->assign('application', ''); |
|
82 | + $this->assign('appid', $appId); |
|
83 | 83 | $navigation = \OC_App::getNavigation(); |
84 | - $this->assign( 'navigation', $navigation); |
|
84 | + $this->assign('navigation', $navigation); |
|
85 | 85 | $settingsNavigation = \OC_App::getSettingsNavigation(); |
86 | - $this->assign( 'settingsnavigation', $settingsNavigation); |
|
87 | - foreach($navigation as $entry) { |
|
86 | + $this->assign('settingsnavigation', $settingsNavigation); |
|
87 | + foreach ($navigation as $entry) { |
|
88 | 88 | if ($entry['active']) { |
89 | - $this->assign( 'application', $entry['name'] ); |
|
89 | + $this->assign('application', $entry['name']); |
|
90 | 90 | break; |
91 | 91 | } |
92 | 92 | } |
93 | 93 | |
94 | - foreach($settingsNavigation as $entry) { |
|
94 | + foreach ($settingsNavigation as $entry) { |
|
95 | 95 | if ($entry['active']) { |
96 | - $this->assign( 'application', $entry['name'] ); |
|
96 | + $this->assign('application', $entry['name']); |
|
97 | 97 | break; |
98 | 98 | } |
99 | 99 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $this->assign('bodyid', 'body-login'); |
126 | 126 | } else if ($renderAs == 'public') { |
127 | 127 | parent::__construct('core', 'layout.public'); |
128 | - $this->assign( 'appid', $appId ); |
|
128 | + $this->assign('appid', $appId); |
|
129 | 129 | $this->assign('bodyid', 'body-public'); |
130 | 130 | } else { |
131 | 131 | parent::__construct('core', 'layout.base'); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $lang = str_replace('_', '-', $lang); |
137 | 137 | $this->assign('language', $lang); |
138 | 138 | |
139 | - if(\OC::$server->getSystemConfig()->getValue('installed', false)) { |
|
139 | + if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
|
140 | 140 | if (empty(self::$versionHash)) { |
141 | 141 | $v = \OC_App::getAppVersions(); |
142 | 142 | $v['core'] = implode('.', \OCP\Util::getVersion()); |
@@ -167,10 +167,10 @@ discard block |
||
167 | 167 | $this->append('jsfiles', \OC::$server->getURLGenerator()->linkToRoute('core.OCJS.getConfig', ['v' => self::$versionHash])); |
168 | 168 | } |
169 | 169 | } |
170 | - foreach($jsFiles as $info) { |
|
170 | + foreach ($jsFiles as $info) { |
|
171 | 171 | $web = $info[1]; |
172 | 172 | $file = $info[2]; |
173 | - $this->append( 'jsfiles', $web.'/'.$file . $this->getVersionHashSuffix() ); |
|
173 | + $this->append('jsfiles', $web.'/'.$file.$this->getVersionHashSuffix()); |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | try { |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | // Do not initialise scss appdata until we have a fully installed instance |
183 | 183 | // Do not load scss for update, errors, installation or login page |
184 | - if(\OC::$server->getSystemConfig()->getValue('installed', false) |
|
184 | + if (\OC::$server->getSystemConfig()->getValue('installed', false) |
|
185 | 185 | && !\OCP\Util::needUpgrade() |
186 | 186 | && $pathInfo !== '' |
187 | 187 | && !preg_match('/^\/login/', $pathInfo) |
@@ -198,14 +198,14 @@ discard block |
||
198 | 198 | $this->assign('cssfiles', array()); |
199 | 199 | $this->assign('printcssfiles', []); |
200 | 200 | $this->assign('versionHash', self::$versionHash); |
201 | - foreach($cssFiles as $info) { |
|
201 | + foreach ($cssFiles as $info) { |
|
202 | 202 | $web = $info[1]; |
203 | 203 | $file = $info[2]; |
204 | 204 | |
205 | 205 | if (substr($file, -strlen('print.css')) === 'print.css') { |
206 | - $this->append( 'printcssfiles', $web.'/'.$file . $this->getVersionHashSuffix() ); |
|
206 | + $this->append('printcssfiles', $web.'/'.$file.$this->getVersionHashSuffix()); |
|
207 | 207 | } else { |
208 | - $this->append( 'cssfiles', $web.'/'.$file . $this->getVersionHashSuffix($web, $file) ); |
|
208 | + $this->append('cssfiles', $web.'/'.$file.$this->getVersionHashSuffix($web, $file)); |
|
209 | 209 | } |
210 | 210 | } |
211 | 211 | } |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | |
226 | 226 | if ($this->config->getSystemValue('installed', false)) { |
227 | 227 | if (\OC::$server->getAppManager()->isInstalled('theming')) { |
228 | - $themingSuffix = '-' . $this->config->getAppValue('theming', 'cachebuster', '0'); |
|
228 | + $themingSuffix = '-'.$this->config->getAppValue('theming', 'cachebuster', '0'); |
|
229 | 229 | } |
230 | 230 | $v = \OC_App::getAppVersions(); |
231 | 231 | } |
@@ -233,21 +233,21 @@ discard block |
||
233 | 233 | // Try the webroot path for a match |
234 | 234 | if ($path !== false && $path !== '') { |
235 | 235 | $appName = $this->getAppNamefromPath($path); |
236 | - if(array_key_exists($appName, $v)) { |
|
236 | + if (array_key_exists($appName, $v)) { |
|
237 | 237 | $appVersion = $v[$appName]; |
238 | - return '?v=' . substr(md5($appVersion), 0, 8) . $themingSuffix; |
|
238 | + return '?v='.substr(md5($appVersion), 0, 8).$themingSuffix; |
|
239 | 239 | } |
240 | 240 | } |
241 | 241 | // fallback to the file path instead |
242 | 242 | if ($file !== false && $file !== '') { |
243 | 243 | $appName = $this->getAppNamefromPath($file); |
244 | - if(array_key_exists($appName, $v)) { |
|
244 | + if (array_key_exists($appName, $v)) { |
|
245 | 245 | $appVersion = $v[$appName]; |
246 | - return '?v=' . substr(md5($appVersion), 0, 8) . $themingSuffix; |
|
246 | + return '?v='.substr(md5($appVersion), 0, 8).$themingSuffix; |
|
247 | 247 | } |
248 | 248 | } |
249 | 249 | |
250 | - return '?v=' . self::$versionHash . $themingSuffix; |
|
250 | + return '?v='.self::$versionHash.$themingSuffix; |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | /** |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | // Read the selected theme from the config file |
259 | 259 | $theme = \OC_Util::getTheme(); |
260 | 260 | |
261 | - if($compileScss) { |
|
261 | + if ($compileScss) { |
|
262 | 262 | $SCSSCacher = \OC::$server->query(SCSSCacher::class); |
263 | 263 | } else { |
264 | 264 | $SCSSCacher = null; |
@@ -267,8 +267,8 @@ discard block |
||
267 | 267 | $locator = new \OC\Template\CSSResourceLocator( |
268 | 268 | \OC::$server->getLogger(), |
269 | 269 | $theme, |
270 | - array( \OC::$SERVERROOT => \OC::$WEBROOT ), |
|
271 | - array( \OC::$SERVERROOT => \OC::$WEBROOT ), |
|
270 | + array(\OC::$SERVERROOT => \OC::$WEBROOT), |
|
271 | + array(\OC::$SERVERROOT => \OC::$WEBROOT), |
|
272 | 272 | $SCSSCacher |
273 | 273 | ); |
274 | 274 | $locator->find($styles); |
@@ -303,8 +303,8 @@ discard block |
||
303 | 303 | $locator = new \OC\Template\JSResourceLocator( |
304 | 304 | \OC::$server->getLogger(), |
305 | 305 | $theme, |
306 | - array( \OC::$SERVERROOT => \OC::$WEBROOT ), |
|
307 | - array( \OC::$SERVERROOT => \OC::$WEBROOT ), |
|
306 | + array(\OC::$SERVERROOT => \OC::$WEBROOT), |
|
307 | + array(\OC::$SERVERROOT => \OC::$WEBROOT), |
|
308 | 308 | new JSCombiner( |
309 | 309 | \OC::$server->getAppDataDir('js'), |
310 | 310 | \OC::$server->getURLGenerator(), |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | */ |
326 | 326 | public static function convertToRelativePath($filePath) { |
327 | 327 | $relativePath = explode(\OC::$SERVERROOT, $filePath); |
328 | - if(count($relativePath) !== 2) { |
|
328 | + if (count($relativePath) !== 2) { |
|
329 | 329 | throw new \Exception('$filePath is not under the \OC::$SERVERROOT'); |
330 | 330 | } |
331 | 331 |