@@ -49,8 +49,8 @@ |
||
49 | 49 | |
50 | 50 | <div class="header-right"> |
51 | 51 | <?php if (!isset($_['hideFileList']) || (isset($_['hideFileList']) && $_['hideFileList'] === false)) { |
52 | - if ($_['server2serversharing']) { |
|
53 | - ?> |
|
52 | + if ($_['server2serversharing']) { |
|
53 | + ?> |
|
54 | 54 | <span id="save" data-protected="<?php p($_['protected']) ?>" |
55 | 55 | data-owner-display-name="<?php p($_['displayName']) ?>" data-owner="<?php p($_['owner']) ?>" data-name="<?php p($_['filename']) ?>"> |
56 | 56 | <button id="save-button"><?php p($l->t('Add to your Nextcloud')) ?></button> |
@@ -20,146 +20,146 @@ |
||
20 | 20 | |
21 | 21 | class OC_Theme { |
22 | 22 | |
23 | - /** |
|
24 | - * Returns the base URL |
|
25 | - * @return string URL |
|
26 | - */ |
|
27 | - public function getBaseUrl() { |
|
28 | - return 'https://nextcloud.com'; |
|
29 | - } |
|
30 | - |
|
31 | - /** |
|
32 | - * Returns the URL where the sync clients are listed |
|
33 | - * @return string URL |
|
34 | - */ |
|
35 | - public function getSyncClientUrl() { |
|
36 | - return 'https://nextcloud.com/install/#install-clients'; |
|
37 | - } |
|
38 | - |
|
39 | - /** |
|
40 | - * Returns the URL to the App Store for the iOS Client |
|
41 | - * @return string URL |
|
42 | - */ |
|
43 | - public function getiOSClientUrl() { |
|
44 | - return 'https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8'; |
|
45 | - } |
|
46 | - |
|
47 | - /** |
|
48 | - * Returns the AppId for the App Store for the iOS Client |
|
49 | - * @return string AppId |
|
50 | - */ |
|
51 | - public function getiTunesAppId() { |
|
52 | - return '1125420102'; |
|
53 | - } |
|
54 | - |
|
55 | - /** |
|
56 | - * Returns the URL to Google Play for the Android Client |
|
57 | - * @return string URL |
|
58 | - */ |
|
59 | - public function getAndroidClientUrl() { |
|
60 | - return 'https://play.google.com/store/apps/details?id=com.nextcloud.client'; |
|
61 | - } |
|
62 | - |
|
63 | - /** |
|
64 | - * Returns the documentation URL |
|
65 | - * @return string URL |
|
66 | - */ |
|
67 | - public function getDocBaseUrl() { |
|
68 | - return 'https://docs.nextcloud.com'; |
|
69 | - } |
|
70 | - |
|
71 | - /** |
|
72 | - * Returns the title |
|
73 | - * @return string title |
|
74 | - */ |
|
75 | - public function getTitle() { |
|
76 | - return 'Custom Cloud'; |
|
77 | - } |
|
78 | - |
|
79 | - /** |
|
80 | - * Returns the short name of the software |
|
81 | - * @return string title |
|
82 | - */ |
|
83 | - public function getName() { |
|
84 | - return 'Custom Cloud'; |
|
85 | - } |
|
86 | - |
|
87 | - /** |
|
88 | - * Returns the short name of the software containing HTML strings |
|
89 | - * @return string title |
|
90 | - */ |
|
91 | - public function getHTMLName() { |
|
92 | - return 'Custom Cloud'; |
|
93 | - } |
|
94 | - |
|
95 | - /** |
|
96 | - * Returns entity (e.g. company name) - used for footer, copyright |
|
97 | - * @return string entity name |
|
98 | - */ |
|
99 | - public function getEntity() { |
|
100 | - return 'Custom Cloud Co.'; |
|
101 | - } |
|
102 | - |
|
103 | - /** |
|
104 | - * Returns slogan |
|
105 | - * @return string slogan |
|
106 | - */ |
|
107 | - public function getSlogan() { |
|
108 | - return 'Your custom cloud, personalized for you!'; |
|
109 | - } |
|
110 | - |
|
111 | - /** |
|
112 | - * Returns logo claim |
|
113 | - * @return string logo claim |
|
114 | - * @deprecated 13.0.0 not used anymore |
|
115 | - */ |
|
116 | - public function getLogoClaim() { |
|
117 | - return ''; |
|
118 | - } |
|
119 | - |
|
120 | - /** |
|
121 | - * Returns short version of the footer |
|
122 | - * @return string short footer |
|
123 | - */ |
|
124 | - public function getShortFooter() { |
|
125 | - $footer = '© 2017 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
|
126 | - '<br/>' . $this->getSlogan(); |
|
127 | - |
|
128 | - return $footer; |
|
129 | - } |
|
130 | - |
|
131 | - /** |
|
132 | - * Returns long version of the footer |
|
133 | - * @return string long footer |
|
134 | - */ |
|
135 | - public function getLongFooter() { |
|
136 | - $footer = '© 2017 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
|
137 | - '<br/>' . $this->getSlogan(); |
|
138 | - |
|
139 | - return $footer; |
|
140 | - } |
|
141 | - |
|
142 | - public function buildDocLinkToKey($key) { |
|
143 | - return $this->getDocBaseUrl() . '/server/12/go.php?to=' . $key; |
|
144 | - } |
|
145 | - |
|
146 | - |
|
147 | - /** |
|
148 | - * Returns mail header color |
|
149 | - * @return string |
|
150 | - */ |
|
151 | - public function getColorPrimary() { |
|
152 | - return '#745bca'; |
|
153 | - } |
|
154 | - |
|
155 | - /** |
|
156 | - * Returns variables to overload defaults from core/css/variables.scss |
|
157 | - * @return array |
|
158 | - */ |
|
159 | - public function getScssVariables() { |
|
160 | - return [ |
|
161 | - 'color-primary' => '#745bca' |
|
162 | - ]; |
|
163 | - } |
|
23 | + /** |
|
24 | + * Returns the base URL |
|
25 | + * @return string URL |
|
26 | + */ |
|
27 | + public function getBaseUrl() { |
|
28 | + return 'https://nextcloud.com'; |
|
29 | + } |
|
30 | + |
|
31 | + /** |
|
32 | + * Returns the URL where the sync clients are listed |
|
33 | + * @return string URL |
|
34 | + */ |
|
35 | + public function getSyncClientUrl() { |
|
36 | + return 'https://nextcloud.com/install/#install-clients'; |
|
37 | + } |
|
38 | + |
|
39 | + /** |
|
40 | + * Returns the URL to the App Store for the iOS Client |
|
41 | + * @return string URL |
|
42 | + */ |
|
43 | + public function getiOSClientUrl() { |
|
44 | + return 'https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8'; |
|
45 | + } |
|
46 | + |
|
47 | + /** |
|
48 | + * Returns the AppId for the App Store for the iOS Client |
|
49 | + * @return string AppId |
|
50 | + */ |
|
51 | + public function getiTunesAppId() { |
|
52 | + return '1125420102'; |
|
53 | + } |
|
54 | + |
|
55 | + /** |
|
56 | + * Returns the URL to Google Play for the Android Client |
|
57 | + * @return string URL |
|
58 | + */ |
|
59 | + public function getAndroidClientUrl() { |
|
60 | + return 'https://play.google.com/store/apps/details?id=com.nextcloud.client'; |
|
61 | + } |
|
62 | + |
|
63 | + /** |
|
64 | + * Returns the documentation URL |
|
65 | + * @return string URL |
|
66 | + */ |
|
67 | + public function getDocBaseUrl() { |
|
68 | + return 'https://docs.nextcloud.com'; |
|
69 | + } |
|
70 | + |
|
71 | + /** |
|
72 | + * Returns the title |
|
73 | + * @return string title |
|
74 | + */ |
|
75 | + public function getTitle() { |
|
76 | + return 'Custom Cloud'; |
|
77 | + } |
|
78 | + |
|
79 | + /** |
|
80 | + * Returns the short name of the software |
|
81 | + * @return string title |
|
82 | + */ |
|
83 | + public function getName() { |
|
84 | + return 'Custom Cloud'; |
|
85 | + } |
|
86 | + |
|
87 | + /** |
|
88 | + * Returns the short name of the software containing HTML strings |
|
89 | + * @return string title |
|
90 | + */ |
|
91 | + public function getHTMLName() { |
|
92 | + return 'Custom Cloud'; |
|
93 | + } |
|
94 | + |
|
95 | + /** |
|
96 | + * Returns entity (e.g. company name) - used for footer, copyright |
|
97 | + * @return string entity name |
|
98 | + */ |
|
99 | + public function getEntity() { |
|
100 | + return 'Custom Cloud Co.'; |
|
101 | + } |
|
102 | + |
|
103 | + /** |
|
104 | + * Returns slogan |
|
105 | + * @return string slogan |
|
106 | + */ |
|
107 | + public function getSlogan() { |
|
108 | + return 'Your custom cloud, personalized for you!'; |
|
109 | + } |
|
110 | + |
|
111 | + /** |
|
112 | + * Returns logo claim |
|
113 | + * @return string logo claim |
|
114 | + * @deprecated 13.0.0 not used anymore |
|
115 | + */ |
|
116 | + public function getLogoClaim() { |
|
117 | + return ''; |
|
118 | + } |
|
119 | + |
|
120 | + /** |
|
121 | + * Returns short version of the footer |
|
122 | + * @return string short footer |
|
123 | + */ |
|
124 | + public function getShortFooter() { |
|
125 | + $footer = '© 2017 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
|
126 | + '<br/>' . $this->getSlogan(); |
|
127 | + |
|
128 | + return $footer; |
|
129 | + } |
|
130 | + |
|
131 | + /** |
|
132 | + * Returns long version of the footer |
|
133 | + * @return string long footer |
|
134 | + */ |
|
135 | + public function getLongFooter() { |
|
136 | + $footer = '© 2017 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
|
137 | + '<br/>' . $this->getSlogan(); |
|
138 | + |
|
139 | + return $footer; |
|
140 | + } |
|
141 | + |
|
142 | + public function buildDocLinkToKey($key) { |
|
143 | + return $this->getDocBaseUrl() . '/server/12/go.php?to=' . $key; |
|
144 | + } |
|
145 | + |
|
146 | + |
|
147 | + /** |
|
148 | + * Returns mail header color |
|
149 | + * @return string |
|
150 | + */ |
|
151 | + public function getColorPrimary() { |
|
152 | + return '#745bca'; |
|
153 | + } |
|
154 | + |
|
155 | + /** |
|
156 | + * Returns variables to overload defaults from core/css/variables.scss |
|
157 | + * @return array |
|
158 | + */ |
|
159 | + public function getScssVariables() { |
|
160 | + return [ |
|
161 | + 'color-primary' => '#745bca' |
|
162 | + ]; |
|
163 | + } |
|
164 | 164 | |
165 | 165 | } |
@@ -34,235 +34,235 @@ |
||
34 | 34 | |
35 | 35 | class JSConfigHelper { |
36 | 36 | |
37 | - /** @var IL10N */ |
|
38 | - private $l; |
|
37 | + /** @var IL10N */ |
|
38 | + private $l; |
|
39 | 39 | |
40 | - /** @var Defaults */ |
|
41 | - private $defaults; |
|
40 | + /** @var Defaults */ |
|
41 | + private $defaults; |
|
42 | 42 | |
43 | - /** @var IAppManager */ |
|
44 | - private $appManager; |
|
43 | + /** @var IAppManager */ |
|
44 | + private $appManager; |
|
45 | 45 | |
46 | - /** @var ISession */ |
|
47 | - private $session; |
|
46 | + /** @var ISession */ |
|
47 | + private $session; |
|
48 | 48 | |
49 | - /** @var IUser|null */ |
|
50 | - private $currentUser; |
|
49 | + /** @var IUser|null */ |
|
50 | + private $currentUser; |
|
51 | 51 | |
52 | - /** @var IConfig */ |
|
53 | - private $config; |
|
52 | + /** @var IConfig */ |
|
53 | + private $config; |
|
54 | 54 | |
55 | - /** @var IGroupManager */ |
|
56 | - private $groupManager; |
|
55 | + /** @var IGroupManager */ |
|
56 | + private $groupManager; |
|
57 | 57 | |
58 | - /** @var IniGetWrapper */ |
|
59 | - private $iniWrapper; |
|
58 | + /** @var IniGetWrapper */ |
|
59 | + private $iniWrapper; |
|
60 | 60 | |
61 | - /** @var IURLGenerator */ |
|
62 | - private $urlGenerator; |
|
61 | + /** @var IURLGenerator */ |
|
62 | + private $urlGenerator; |
|
63 | 63 | |
64 | - /** |
|
65 | - * @param IL10N $l |
|
66 | - * @param Defaults $defaults |
|
67 | - * @param IAppManager $appManager |
|
68 | - * @param ISession $session |
|
69 | - * @param IUser|null $currentUser |
|
70 | - * @param IConfig $config |
|
71 | - * @param IGroupManager $groupManager |
|
72 | - * @param IniGetWrapper $iniWrapper |
|
73 | - * @param IURLGenerator $urlGenerator |
|
74 | - */ |
|
75 | - public function __construct(IL10N $l, |
|
76 | - Defaults $defaults, |
|
77 | - IAppManager $appManager, |
|
78 | - ISession $session, |
|
79 | - $currentUser, |
|
80 | - IConfig $config, |
|
81 | - IGroupManager $groupManager, |
|
82 | - IniGetWrapper $iniWrapper, |
|
83 | - IURLGenerator $urlGenerator) { |
|
84 | - $this->l = $l; |
|
85 | - $this->defaults = $defaults; |
|
86 | - $this->appManager = $appManager; |
|
87 | - $this->session = $session; |
|
88 | - $this->currentUser = $currentUser; |
|
89 | - $this->config = $config; |
|
90 | - $this->groupManager = $groupManager; |
|
91 | - $this->iniWrapper = $iniWrapper; |
|
92 | - $this->urlGenerator = $urlGenerator; |
|
93 | - } |
|
64 | + /** |
|
65 | + * @param IL10N $l |
|
66 | + * @param Defaults $defaults |
|
67 | + * @param IAppManager $appManager |
|
68 | + * @param ISession $session |
|
69 | + * @param IUser|null $currentUser |
|
70 | + * @param IConfig $config |
|
71 | + * @param IGroupManager $groupManager |
|
72 | + * @param IniGetWrapper $iniWrapper |
|
73 | + * @param IURLGenerator $urlGenerator |
|
74 | + */ |
|
75 | + public function __construct(IL10N $l, |
|
76 | + Defaults $defaults, |
|
77 | + IAppManager $appManager, |
|
78 | + ISession $session, |
|
79 | + $currentUser, |
|
80 | + IConfig $config, |
|
81 | + IGroupManager $groupManager, |
|
82 | + IniGetWrapper $iniWrapper, |
|
83 | + IURLGenerator $urlGenerator) { |
|
84 | + $this->l = $l; |
|
85 | + $this->defaults = $defaults; |
|
86 | + $this->appManager = $appManager; |
|
87 | + $this->session = $session; |
|
88 | + $this->currentUser = $currentUser; |
|
89 | + $this->config = $config; |
|
90 | + $this->groupManager = $groupManager; |
|
91 | + $this->iniWrapper = $iniWrapper; |
|
92 | + $this->urlGenerator = $urlGenerator; |
|
93 | + } |
|
94 | 94 | |
95 | - public function getConfig() { |
|
95 | + public function getConfig() { |
|
96 | 96 | |
97 | - if ($this->currentUser !== null) { |
|
98 | - $uid = $this->currentUser->getUID(); |
|
99 | - } else { |
|
100 | - $uid = null; |
|
101 | - } |
|
97 | + if ($this->currentUser !== null) { |
|
98 | + $uid = $this->currentUser->getUID(); |
|
99 | + } else { |
|
100 | + $uid = null; |
|
101 | + } |
|
102 | 102 | |
103 | - // Get the config |
|
104 | - $apps_paths = []; |
|
103 | + // Get the config |
|
104 | + $apps_paths = []; |
|
105 | 105 | |
106 | - if ($this->currentUser === null) { |
|
107 | - $apps = $this->appManager->getInstalledApps(); |
|
108 | - } else { |
|
109 | - $apps = $this->appManager->getEnabledAppsForUser($this->currentUser); |
|
110 | - } |
|
106 | + if ($this->currentUser === null) { |
|
107 | + $apps = $this->appManager->getInstalledApps(); |
|
108 | + } else { |
|
109 | + $apps = $this->appManager->getEnabledAppsForUser($this->currentUser); |
|
110 | + } |
|
111 | 111 | |
112 | - foreach($apps as $app) { |
|
113 | - $apps_paths[$app] = \OC_App::getAppWebPath($app); |
|
114 | - } |
|
112 | + foreach($apps as $app) { |
|
113 | + $apps_paths[$app] = \OC_App::getAppWebPath($app); |
|
114 | + } |
|
115 | 115 | |
116 | 116 | |
117 | - $enableLinkPasswordByDefault = $this->config->getAppValue('core', 'shareapi_enable_link_password_by_default', 'no'); |
|
118 | - $enableLinkPasswordByDefault = ($enableLinkPasswordByDefault === 'yes') ? true : false; |
|
119 | - $defaultExpireDateEnabled = $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no') === 'yes'; |
|
120 | - $defaultExpireDate = $enforceDefaultExpireDate = null; |
|
121 | - if ($defaultExpireDateEnabled) { |
|
122 | - $defaultExpireDate = (int) $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7'); |
|
123 | - $enforceDefaultExpireDate = $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'no') === 'yes'; |
|
124 | - } |
|
125 | - $outgoingServer2serverShareEnabled = $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes'; |
|
117 | + $enableLinkPasswordByDefault = $this->config->getAppValue('core', 'shareapi_enable_link_password_by_default', 'no'); |
|
118 | + $enableLinkPasswordByDefault = ($enableLinkPasswordByDefault === 'yes') ? true : false; |
|
119 | + $defaultExpireDateEnabled = $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no') === 'yes'; |
|
120 | + $defaultExpireDate = $enforceDefaultExpireDate = null; |
|
121 | + if ($defaultExpireDateEnabled) { |
|
122 | + $defaultExpireDate = (int) $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7'); |
|
123 | + $enforceDefaultExpireDate = $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'no') === 'yes'; |
|
124 | + } |
|
125 | + $outgoingServer2serverShareEnabled = $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes'; |
|
126 | 126 | |
127 | - $countOfDataLocation = 0; |
|
128 | - $dataLocation = str_replace(\OC::$SERVERROOT .'/', '', $this->config->getSystemValue('datadirectory', ''), $countOfDataLocation); |
|
129 | - if($countOfDataLocation !== 1 || !$this->groupManager->isAdmin($uid)) { |
|
130 | - $dataLocation = false; |
|
131 | - } |
|
127 | + $countOfDataLocation = 0; |
|
128 | + $dataLocation = str_replace(\OC::$SERVERROOT .'/', '', $this->config->getSystemValue('datadirectory', ''), $countOfDataLocation); |
|
129 | + if($countOfDataLocation !== 1 || !$this->groupManager->isAdmin($uid)) { |
|
130 | + $dataLocation = false; |
|
131 | + } |
|
132 | 132 | |
133 | - if ($this->currentUser instanceof IUser) { |
|
134 | - $lastConfirmTimestamp = $this->session->get('last-password-confirm'); |
|
135 | - if (!is_int($lastConfirmTimestamp)) { |
|
136 | - $lastConfirmTimestamp = 0; |
|
137 | - } |
|
138 | - } else { |
|
139 | - $lastConfirmTimestamp = 0; |
|
140 | - } |
|
133 | + if ($this->currentUser instanceof IUser) { |
|
134 | + $lastConfirmTimestamp = $this->session->get('last-password-confirm'); |
|
135 | + if (!is_int($lastConfirmTimestamp)) { |
|
136 | + $lastConfirmTimestamp = 0; |
|
137 | + } |
|
138 | + } else { |
|
139 | + $lastConfirmTimestamp = 0; |
|
140 | + } |
|
141 | 141 | |
142 | - $array = [ |
|
143 | - "oc_debug" => $this->config->getSystemValue('debug', false) ? 'true' : 'false', |
|
144 | - "oc_isadmin" => $this->groupManager->isAdmin($uid) ? 'true' : 'false', |
|
145 | - "oc_dataURL" => is_string($dataLocation) ? "\"".$dataLocation."\"" : 'false', |
|
146 | - "oc_webroot" => "\"".\OC::$WEBROOT."\"", |
|
147 | - "oc_appswebroots" => str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution |
|
148 | - "datepickerFormatDate" => json_encode($this->l->l('jsdate', null)), |
|
149 | - 'nc_lastLogin' => $lastConfirmTimestamp, |
|
150 | - "dayNames" => json_encode([ |
|
151 | - (string)$this->l->t('Sunday'), |
|
152 | - (string)$this->l->t('Monday'), |
|
153 | - (string)$this->l->t('Tuesday'), |
|
154 | - (string)$this->l->t('Wednesday'), |
|
155 | - (string)$this->l->t('Thursday'), |
|
156 | - (string)$this->l->t('Friday'), |
|
157 | - (string)$this->l->t('Saturday') |
|
158 | - ]), |
|
159 | - "dayNamesShort" => json_encode([ |
|
160 | - (string)$this->l->t('Sun.'), |
|
161 | - (string)$this->l->t('Mon.'), |
|
162 | - (string)$this->l->t('Tue.'), |
|
163 | - (string)$this->l->t('Wed.'), |
|
164 | - (string)$this->l->t('Thu.'), |
|
165 | - (string)$this->l->t('Fri.'), |
|
166 | - (string)$this->l->t('Sat.') |
|
167 | - ]), |
|
168 | - "dayNamesMin" => json_encode([ |
|
169 | - (string)$this->l->t('Su'), |
|
170 | - (string)$this->l->t('Mo'), |
|
171 | - (string)$this->l->t('Tu'), |
|
172 | - (string)$this->l->t('We'), |
|
173 | - (string)$this->l->t('Th'), |
|
174 | - (string)$this->l->t('Fr'), |
|
175 | - (string)$this->l->t('Sa') |
|
176 | - ]), |
|
177 | - "monthNames" => json_encode([ |
|
178 | - (string)$this->l->t('January'), |
|
179 | - (string)$this->l->t('February'), |
|
180 | - (string)$this->l->t('March'), |
|
181 | - (string)$this->l->t('April'), |
|
182 | - (string)$this->l->t('May'), |
|
183 | - (string)$this->l->t('June'), |
|
184 | - (string)$this->l->t('July'), |
|
185 | - (string)$this->l->t('August'), |
|
186 | - (string)$this->l->t('September'), |
|
187 | - (string)$this->l->t('October'), |
|
188 | - (string)$this->l->t('November'), |
|
189 | - (string)$this->l->t('December') |
|
190 | - ]), |
|
191 | - "monthNamesShort" => json_encode([ |
|
192 | - (string)$this->l->t('Jan.'), |
|
193 | - (string)$this->l->t('Feb.'), |
|
194 | - (string)$this->l->t('Mar.'), |
|
195 | - (string)$this->l->t('Apr.'), |
|
196 | - (string)$this->l->t('May.'), |
|
197 | - (string)$this->l->t('Jun.'), |
|
198 | - (string)$this->l->t('Jul.'), |
|
199 | - (string)$this->l->t('Aug.'), |
|
200 | - (string)$this->l->t('Sep.'), |
|
201 | - (string)$this->l->t('Oct.'), |
|
202 | - (string)$this->l->t('Nov.'), |
|
203 | - (string)$this->l->t('Dec.') |
|
204 | - ]), |
|
205 | - "firstDay" => json_encode($this->l->l('firstday', null)) , |
|
206 | - "oc_config" => json_encode([ |
|
207 | - 'session_lifetime' => min($this->config->getSystemValue('session_lifetime', $this->iniWrapper->getNumeric('session.gc_maxlifetime')), $this->iniWrapper->getNumeric('session.gc_maxlifetime')), |
|
208 | - 'session_keepalive' => $this->config->getSystemValue('session_keepalive', true), |
|
209 | - 'version' => implode('.', \OCP\Util::getVersion()), |
|
210 | - 'versionstring' => \OC_Util::getVersionString(), |
|
211 | - 'enable_avatars' => true, // here for legacy reasons - to not crash existing code that relies on this value |
|
212 | - 'lost_password_link'=> $this->config->getSystemValue('lost_password_link', null), |
|
213 | - 'modRewriteWorking' => ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true'), |
|
214 | - 'sharing.maxAutocompleteResults' => intval($this->config->getSystemValue('sharing.maxAutocompleteResults', 0)), |
|
215 | - 'sharing.minSearchStringLength' => intval($this->config->getSystemValue('sharing.minSearchStringLength', 0)), |
|
216 | - 'blacklist_files_regex' => \OCP\Files\FileInfo::BLACKLIST_FILES_REGEX, |
|
217 | - ]), |
|
218 | - "oc_appconfig" => json_encode([ |
|
219 | - 'core' => [ |
|
220 | - 'defaultExpireDateEnabled' => $defaultExpireDateEnabled, |
|
221 | - 'defaultExpireDate' => $defaultExpireDate, |
|
222 | - 'defaultExpireDateEnforced' => $enforceDefaultExpireDate, |
|
223 | - 'enforcePasswordForPublicLink' => \OCP\Util::isPublicLinkPasswordRequired(), |
|
224 | - 'enableLinkPasswordByDefault' => $enableLinkPasswordByDefault, |
|
225 | - 'sharingDisabledForUser' => \OCP\Util::isSharingDisabledForUser(), |
|
226 | - 'resharingAllowed' => \OCP\Share::isResharingAllowed(), |
|
227 | - 'remoteShareAllowed' => $outgoingServer2serverShareEnabled, |
|
228 | - 'federatedCloudShareDoc' => $this->urlGenerator->linkToDocs('user-sharing-federated'), |
|
229 | - 'allowGroupSharing' => \OC::$server->getShareManager()->allowGroupSharing() |
|
230 | - ] |
|
231 | - ]), |
|
232 | - "oc_defaults" => json_encode([ |
|
233 | - 'entity' => $this->defaults->getEntity(), |
|
234 | - 'name' => $this->defaults->getName(), |
|
235 | - 'title' => $this->defaults->getTitle(), |
|
236 | - 'baseUrl' => $this->defaults->getBaseUrl(), |
|
237 | - 'syncClientUrl' => $this->defaults->getSyncClientUrl(), |
|
238 | - 'docBaseUrl' => $this->defaults->getDocBaseUrl(), |
|
239 | - 'docPlaceholderUrl' => $this->defaults->buildDocLinkToKey('PLACEHOLDER'), |
|
240 | - 'slogan' => $this->defaults->getSlogan(), |
|
241 | - 'logoClaim' => '', |
|
242 | - 'shortFooter' => $this->defaults->getShortFooter(), |
|
243 | - 'longFooter' => $this->defaults->getLongFooter(), |
|
244 | - 'folder' => \OC_Util::getTheme(), |
|
245 | - ]), |
|
246 | - ]; |
|
142 | + $array = [ |
|
143 | + "oc_debug" => $this->config->getSystemValue('debug', false) ? 'true' : 'false', |
|
144 | + "oc_isadmin" => $this->groupManager->isAdmin($uid) ? 'true' : 'false', |
|
145 | + "oc_dataURL" => is_string($dataLocation) ? "\"".$dataLocation."\"" : 'false', |
|
146 | + "oc_webroot" => "\"".\OC::$WEBROOT."\"", |
|
147 | + "oc_appswebroots" => str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution |
|
148 | + "datepickerFormatDate" => json_encode($this->l->l('jsdate', null)), |
|
149 | + 'nc_lastLogin' => $lastConfirmTimestamp, |
|
150 | + "dayNames" => json_encode([ |
|
151 | + (string)$this->l->t('Sunday'), |
|
152 | + (string)$this->l->t('Monday'), |
|
153 | + (string)$this->l->t('Tuesday'), |
|
154 | + (string)$this->l->t('Wednesday'), |
|
155 | + (string)$this->l->t('Thursday'), |
|
156 | + (string)$this->l->t('Friday'), |
|
157 | + (string)$this->l->t('Saturday') |
|
158 | + ]), |
|
159 | + "dayNamesShort" => json_encode([ |
|
160 | + (string)$this->l->t('Sun.'), |
|
161 | + (string)$this->l->t('Mon.'), |
|
162 | + (string)$this->l->t('Tue.'), |
|
163 | + (string)$this->l->t('Wed.'), |
|
164 | + (string)$this->l->t('Thu.'), |
|
165 | + (string)$this->l->t('Fri.'), |
|
166 | + (string)$this->l->t('Sat.') |
|
167 | + ]), |
|
168 | + "dayNamesMin" => json_encode([ |
|
169 | + (string)$this->l->t('Su'), |
|
170 | + (string)$this->l->t('Mo'), |
|
171 | + (string)$this->l->t('Tu'), |
|
172 | + (string)$this->l->t('We'), |
|
173 | + (string)$this->l->t('Th'), |
|
174 | + (string)$this->l->t('Fr'), |
|
175 | + (string)$this->l->t('Sa') |
|
176 | + ]), |
|
177 | + "monthNames" => json_encode([ |
|
178 | + (string)$this->l->t('January'), |
|
179 | + (string)$this->l->t('February'), |
|
180 | + (string)$this->l->t('March'), |
|
181 | + (string)$this->l->t('April'), |
|
182 | + (string)$this->l->t('May'), |
|
183 | + (string)$this->l->t('June'), |
|
184 | + (string)$this->l->t('July'), |
|
185 | + (string)$this->l->t('August'), |
|
186 | + (string)$this->l->t('September'), |
|
187 | + (string)$this->l->t('October'), |
|
188 | + (string)$this->l->t('November'), |
|
189 | + (string)$this->l->t('December') |
|
190 | + ]), |
|
191 | + "monthNamesShort" => json_encode([ |
|
192 | + (string)$this->l->t('Jan.'), |
|
193 | + (string)$this->l->t('Feb.'), |
|
194 | + (string)$this->l->t('Mar.'), |
|
195 | + (string)$this->l->t('Apr.'), |
|
196 | + (string)$this->l->t('May.'), |
|
197 | + (string)$this->l->t('Jun.'), |
|
198 | + (string)$this->l->t('Jul.'), |
|
199 | + (string)$this->l->t('Aug.'), |
|
200 | + (string)$this->l->t('Sep.'), |
|
201 | + (string)$this->l->t('Oct.'), |
|
202 | + (string)$this->l->t('Nov.'), |
|
203 | + (string)$this->l->t('Dec.') |
|
204 | + ]), |
|
205 | + "firstDay" => json_encode($this->l->l('firstday', null)) , |
|
206 | + "oc_config" => json_encode([ |
|
207 | + 'session_lifetime' => min($this->config->getSystemValue('session_lifetime', $this->iniWrapper->getNumeric('session.gc_maxlifetime')), $this->iniWrapper->getNumeric('session.gc_maxlifetime')), |
|
208 | + 'session_keepalive' => $this->config->getSystemValue('session_keepalive', true), |
|
209 | + 'version' => implode('.', \OCP\Util::getVersion()), |
|
210 | + 'versionstring' => \OC_Util::getVersionString(), |
|
211 | + 'enable_avatars' => true, // here for legacy reasons - to not crash existing code that relies on this value |
|
212 | + 'lost_password_link'=> $this->config->getSystemValue('lost_password_link', null), |
|
213 | + 'modRewriteWorking' => ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true'), |
|
214 | + 'sharing.maxAutocompleteResults' => intval($this->config->getSystemValue('sharing.maxAutocompleteResults', 0)), |
|
215 | + 'sharing.minSearchStringLength' => intval($this->config->getSystemValue('sharing.minSearchStringLength', 0)), |
|
216 | + 'blacklist_files_regex' => \OCP\Files\FileInfo::BLACKLIST_FILES_REGEX, |
|
217 | + ]), |
|
218 | + "oc_appconfig" => json_encode([ |
|
219 | + 'core' => [ |
|
220 | + 'defaultExpireDateEnabled' => $defaultExpireDateEnabled, |
|
221 | + 'defaultExpireDate' => $defaultExpireDate, |
|
222 | + 'defaultExpireDateEnforced' => $enforceDefaultExpireDate, |
|
223 | + 'enforcePasswordForPublicLink' => \OCP\Util::isPublicLinkPasswordRequired(), |
|
224 | + 'enableLinkPasswordByDefault' => $enableLinkPasswordByDefault, |
|
225 | + 'sharingDisabledForUser' => \OCP\Util::isSharingDisabledForUser(), |
|
226 | + 'resharingAllowed' => \OCP\Share::isResharingAllowed(), |
|
227 | + 'remoteShareAllowed' => $outgoingServer2serverShareEnabled, |
|
228 | + 'federatedCloudShareDoc' => $this->urlGenerator->linkToDocs('user-sharing-federated'), |
|
229 | + 'allowGroupSharing' => \OC::$server->getShareManager()->allowGroupSharing() |
|
230 | + ] |
|
231 | + ]), |
|
232 | + "oc_defaults" => json_encode([ |
|
233 | + 'entity' => $this->defaults->getEntity(), |
|
234 | + 'name' => $this->defaults->getName(), |
|
235 | + 'title' => $this->defaults->getTitle(), |
|
236 | + 'baseUrl' => $this->defaults->getBaseUrl(), |
|
237 | + 'syncClientUrl' => $this->defaults->getSyncClientUrl(), |
|
238 | + 'docBaseUrl' => $this->defaults->getDocBaseUrl(), |
|
239 | + 'docPlaceholderUrl' => $this->defaults->buildDocLinkToKey('PLACEHOLDER'), |
|
240 | + 'slogan' => $this->defaults->getSlogan(), |
|
241 | + 'logoClaim' => '', |
|
242 | + 'shortFooter' => $this->defaults->getShortFooter(), |
|
243 | + 'longFooter' => $this->defaults->getLongFooter(), |
|
244 | + 'folder' => \OC_Util::getTheme(), |
|
245 | + ]), |
|
246 | + ]; |
|
247 | 247 | |
248 | - if ($this->currentUser !== null) { |
|
249 | - $array['oc_userconfig'] = json_encode([ |
|
250 | - 'avatar' => [ |
|
251 | - 'version' => (int)$this->config->getUserValue($uid, 'avatar', 'version', 0), |
|
252 | - ] |
|
253 | - ]); |
|
254 | - } |
|
248 | + if ($this->currentUser !== null) { |
|
249 | + $array['oc_userconfig'] = json_encode([ |
|
250 | + 'avatar' => [ |
|
251 | + 'version' => (int)$this->config->getUserValue($uid, 'avatar', 'version', 0), |
|
252 | + ] |
|
253 | + ]); |
|
254 | + } |
|
255 | 255 | |
256 | - // Allow hooks to modify the output values |
|
257 | - \OC_Hook::emit('\OCP\Config', 'js', array('array' => &$array)); |
|
256 | + // Allow hooks to modify the output values |
|
257 | + \OC_Hook::emit('\OCP\Config', 'js', array('array' => &$array)); |
|
258 | 258 | |
259 | - $result = ''; |
|
259 | + $result = ''; |
|
260 | 260 | |
261 | - // Echo it |
|
262 | - foreach ($array as $setting => $value) { |
|
263 | - $result .= 'var '. $setting . '='. $value . ';' . PHP_EOL; |
|
264 | - } |
|
261 | + // Echo it |
|
262 | + foreach ($array as $setting => $value) { |
|
263 | + $result .= 'var '. $setting . '='. $value . ';' . PHP_EOL; |
|
264 | + } |
|
265 | 265 | |
266 | - return $result; |
|
267 | - } |
|
266 | + return $result; |
|
267 | + } |
|
268 | 268 | } |
@@ -31,287 +31,287 @@ |
||
31 | 31 | */ |
32 | 32 | class OC_Defaults { |
33 | 33 | |
34 | - private $theme; |
|
35 | - private $l; |
|
34 | + private $theme; |
|
35 | + private $l; |
|
36 | 36 | |
37 | - private $defaultEntity; |
|
38 | - private $defaultName; |
|
39 | - private $defaultTitle; |
|
40 | - private $defaultBaseUrl; |
|
41 | - private $defaultSyncClientUrl; |
|
42 | - private $defaultiOSClientUrl; |
|
43 | - private $defaultiTunesAppId; |
|
44 | - private $defaultAndroidClientUrl; |
|
45 | - private $defaultDocBaseUrl; |
|
46 | - private $defaultDocVersion; |
|
47 | - private $defaultSlogan; |
|
48 | - private $defaultColorPrimary; |
|
37 | + private $defaultEntity; |
|
38 | + private $defaultName; |
|
39 | + private $defaultTitle; |
|
40 | + private $defaultBaseUrl; |
|
41 | + private $defaultSyncClientUrl; |
|
42 | + private $defaultiOSClientUrl; |
|
43 | + private $defaultiTunesAppId; |
|
44 | + private $defaultAndroidClientUrl; |
|
45 | + private $defaultDocBaseUrl; |
|
46 | + private $defaultDocVersion; |
|
47 | + private $defaultSlogan; |
|
48 | + private $defaultColorPrimary; |
|
49 | 49 | |
50 | - public function __construct() { |
|
51 | - $this->l = \OC::$server->getL10N('lib'); |
|
50 | + public function __construct() { |
|
51 | + $this->l = \OC::$server->getL10N('lib'); |
|
52 | 52 | |
53 | - $this->defaultEntity = 'Nextcloud'; /* e.g. company name, used for footers and copyright notices */ |
|
54 | - $this->defaultName = 'Nextcloud'; /* short name, used when referring to the software */ |
|
55 | - $this->defaultTitle = 'Nextcloud'; /* can be a longer name, for titles */ |
|
56 | - $this->defaultBaseUrl = 'https://nextcloud.com'; |
|
57 | - $this->defaultSyncClientUrl = 'https://nextcloud.com/install/#install-clients'; |
|
58 | - $this->defaultiOSClientUrl = 'https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8'; |
|
59 | - $this->defaultiTunesAppId = '1125420102'; |
|
60 | - $this->defaultAndroidClientUrl = 'https://play.google.com/store/apps/details?id=com.nextcloud.client'; |
|
61 | - $this->defaultDocBaseUrl = 'https://docs.nextcloud.com'; |
|
62 | - $this->defaultDocVersion = '12'; // used to generate doc links |
|
63 | - $this->defaultSlogan = $this->l->t('a safe home for all your data'); |
|
64 | - $this->defaultColorPrimary = '#0082c9'; |
|
53 | + $this->defaultEntity = 'Nextcloud'; /* e.g. company name, used for footers and copyright notices */ |
|
54 | + $this->defaultName = 'Nextcloud'; /* short name, used when referring to the software */ |
|
55 | + $this->defaultTitle = 'Nextcloud'; /* can be a longer name, for titles */ |
|
56 | + $this->defaultBaseUrl = 'https://nextcloud.com'; |
|
57 | + $this->defaultSyncClientUrl = 'https://nextcloud.com/install/#install-clients'; |
|
58 | + $this->defaultiOSClientUrl = 'https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8'; |
|
59 | + $this->defaultiTunesAppId = '1125420102'; |
|
60 | + $this->defaultAndroidClientUrl = 'https://play.google.com/store/apps/details?id=com.nextcloud.client'; |
|
61 | + $this->defaultDocBaseUrl = 'https://docs.nextcloud.com'; |
|
62 | + $this->defaultDocVersion = '12'; // used to generate doc links |
|
63 | + $this->defaultSlogan = $this->l->t('a safe home for all your data'); |
|
64 | + $this->defaultColorPrimary = '#0082c9'; |
|
65 | 65 | |
66 | - $themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php'; |
|
67 | - if (file_exists($themePath)) { |
|
68 | - // prevent defaults.php from printing output |
|
69 | - ob_start(); |
|
70 | - require_once $themePath; |
|
71 | - ob_end_clean(); |
|
72 | - if (class_exists('OC_Theme')) { |
|
73 | - $this->theme = new OC_Theme(); |
|
74 | - } |
|
75 | - } |
|
76 | - } |
|
66 | + $themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php'; |
|
67 | + if (file_exists($themePath)) { |
|
68 | + // prevent defaults.php from printing output |
|
69 | + ob_start(); |
|
70 | + require_once $themePath; |
|
71 | + ob_end_clean(); |
|
72 | + if (class_exists('OC_Theme')) { |
|
73 | + $this->theme = new OC_Theme(); |
|
74 | + } |
|
75 | + } |
|
76 | + } |
|
77 | 77 | |
78 | - /** |
|
79 | - * @param string $method |
|
80 | - */ |
|
81 | - private function themeExist($method) { |
|
82 | - if (isset($this->theme) && method_exists($this->theme, $method)) { |
|
83 | - return true; |
|
84 | - } |
|
85 | - return false; |
|
86 | - } |
|
78 | + /** |
|
79 | + * @param string $method |
|
80 | + */ |
|
81 | + private function themeExist($method) { |
|
82 | + if (isset($this->theme) && method_exists($this->theme, $method)) { |
|
83 | + return true; |
|
84 | + } |
|
85 | + return false; |
|
86 | + } |
|
87 | 87 | |
88 | - /** |
|
89 | - * Returns the base URL |
|
90 | - * @return string URL |
|
91 | - */ |
|
92 | - public function getBaseUrl() { |
|
93 | - if ($this->themeExist('getBaseUrl')) { |
|
94 | - return $this->theme->getBaseUrl(); |
|
95 | - } else { |
|
96 | - return $this->defaultBaseUrl; |
|
97 | - } |
|
98 | - } |
|
88 | + /** |
|
89 | + * Returns the base URL |
|
90 | + * @return string URL |
|
91 | + */ |
|
92 | + public function getBaseUrl() { |
|
93 | + if ($this->themeExist('getBaseUrl')) { |
|
94 | + return $this->theme->getBaseUrl(); |
|
95 | + } else { |
|
96 | + return $this->defaultBaseUrl; |
|
97 | + } |
|
98 | + } |
|
99 | 99 | |
100 | - /** |
|
101 | - * Returns the URL where the sync clients are listed |
|
102 | - * @return string URL |
|
103 | - */ |
|
104 | - public function getSyncClientUrl() { |
|
105 | - if ($this->themeExist('getSyncClientUrl')) { |
|
106 | - return $this->theme->getSyncClientUrl(); |
|
107 | - } else { |
|
108 | - return $this->defaultSyncClientUrl; |
|
109 | - } |
|
110 | - } |
|
100 | + /** |
|
101 | + * Returns the URL where the sync clients are listed |
|
102 | + * @return string URL |
|
103 | + */ |
|
104 | + public function getSyncClientUrl() { |
|
105 | + if ($this->themeExist('getSyncClientUrl')) { |
|
106 | + return $this->theme->getSyncClientUrl(); |
|
107 | + } else { |
|
108 | + return $this->defaultSyncClientUrl; |
|
109 | + } |
|
110 | + } |
|
111 | 111 | |
112 | - /** |
|
113 | - * Returns the URL to the App Store for the iOS Client |
|
114 | - * @return string URL |
|
115 | - */ |
|
116 | - public function getiOSClientUrl() { |
|
117 | - if ($this->themeExist('getiOSClientUrl')) { |
|
118 | - return $this->theme->getiOSClientUrl(); |
|
119 | - } else { |
|
120 | - return $this->defaultiOSClientUrl; |
|
121 | - } |
|
122 | - } |
|
112 | + /** |
|
113 | + * Returns the URL to the App Store for the iOS Client |
|
114 | + * @return string URL |
|
115 | + */ |
|
116 | + public function getiOSClientUrl() { |
|
117 | + if ($this->themeExist('getiOSClientUrl')) { |
|
118 | + return $this->theme->getiOSClientUrl(); |
|
119 | + } else { |
|
120 | + return $this->defaultiOSClientUrl; |
|
121 | + } |
|
122 | + } |
|
123 | 123 | |
124 | - /** |
|
125 | - * Returns the AppId for the App Store for the iOS Client |
|
126 | - * @return string AppId |
|
127 | - */ |
|
128 | - public function getiTunesAppId() { |
|
129 | - if ($this->themeExist('getiTunesAppId')) { |
|
130 | - return $this->theme->getiTunesAppId(); |
|
131 | - } else { |
|
132 | - return $this->defaultiTunesAppId; |
|
133 | - } |
|
134 | - } |
|
124 | + /** |
|
125 | + * Returns the AppId for the App Store for the iOS Client |
|
126 | + * @return string AppId |
|
127 | + */ |
|
128 | + public function getiTunesAppId() { |
|
129 | + if ($this->themeExist('getiTunesAppId')) { |
|
130 | + return $this->theme->getiTunesAppId(); |
|
131 | + } else { |
|
132 | + return $this->defaultiTunesAppId; |
|
133 | + } |
|
134 | + } |
|
135 | 135 | |
136 | - /** |
|
137 | - * Returns the URL to Google Play for the Android Client |
|
138 | - * @return string URL |
|
139 | - */ |
|
140 | - public function getAndroidClientUrl() { |
|
141 | - if ($this->themeExist('getAndroidClientUrl')) { |
|
142 | - return $this->theme->getAndroidClientUrl(); |
|
143 | - } else { |
|
144 | - return $this->defaultAndroidClientUrl; |
|
145 | - } |
|
146 | - } |
|
136 | + /** |
|
137 | + * Returns the URL to Google Play for the Android Client |
|
138 | + * @return string URL |
|
139 | + */ |
|
140 | + public function getAndroidClientUrl() { |
|
141 | + if ($this->themeExist('getAndroidClientUrl')) { |
|
142 | + return $this->theme->getAndroidClientUrl(); |
|
143 | + } else { |
|
144 | + return $this->defaultAndroidClientUrl; |
|
145 | + } |
|
146 | + } |
|
147 | 147 | |
148 | - /** |
|
149 | - * Returns the documentation URL |
|
150 | - * @return string URL |
|
151 | - */ |
|
152 | - public function getDocBaseUrl() { |
|
153 | - if ($this->themeExist('getDocBaseUrl')) { |
|
154 | - return $this->theme->getDocBaseUrl(); |
|
155 | - } else { |
|
156 | - return $this->defaultDocBaseUrl; |
|
157 | - } |
|
158 | - } |
|
148 | + /** |
|
149 | + * Returns the documentation URL |
|
150 | + * @return string URL |
|
151 | + */ |
|
152 | + public function getDocBaseUrl() { |
|
153 | + if ($this->themeExist('getDocBaseUrl')) { |
|
154 | + return $this->theme->getDocBaseUrl(); |
|
155 | + } else { |
|
156 | + return $this->defaultDocBaseUrl; |
|
157 | + } |
|
158 | + } |
|
159 | 159 | |
160 | - /** |
|
161 | - * Returns the title |
|
162 | - * @return string title |
|
163 | - */ |
|
164 | - public function getTitle() { |
|
165 | - if ($this->themeExist('getTitle')) { |
|
166 | - return $this->theme->getTitle(); |
|
167 | - } else { |
|
168 | - return $this->defaultTitle; |
|
169 | - } |
|
170 | - } |
|
160 | + /** |
|
161 | + * Returns the title |
|
162 | + * @return string title |
|
163 | + */ |
|
164 | + public function getTitle() { |
|
165 | + if ($this->themeExist('getTitle')) { |
|
166 | + return $this->theme->getTitle(); |
|
167 | + } else { |
|
168 | + return $this->defaultTitle; |
|
169 | + } |
|
170 | + } |
|
171 | 171 | |
172 | - /** |
|
173 | - * Returns the short name of the software |
|
174 | - * @return string title |
|
175 | - */ |
|
176 | - public function getName() { |
|
177 | - if ($this->themeExist('getName')) { |
|
178 | - return $this->theme->getName(); |
|
179 | - } else { |
|
180 | - return $this->defaultName; |
|
181 | - } |
|
182 | - } |
|
172 | + /** |
|
173 | + * Returns the short name of the software |
|
174 | + * @return string title |
|
175 | + */ |
|
176 | + public function getName() { |
|
177 | + if ($this->themeExist('getName')) { |
|
178 | + return $this->theme->getName(); |
|
179 | + } else { |
|
180 | + return $this->defaultName; |
|
181 | + } |
|
182 | + } |
|
183 | 183 | |
184 | - /** |
|
185 | - * Returns the short name of the software containing HTML strings |
|
186 | - * @return string title |
|
187 | - */ |
|
188 | - public function getHTMLName() { |
|
189 | - if ($this->themeExist('getHTMLName')) { |
|
190 | - return $this->theme->getHTMLName(); |
|
191 | - } else { |
|
192 | - return $this->defaultName; |
|
193 | - } |
|
194 | - } |
|
184 | + /** |
|
185 | + * Returns the short name of the software containing HTML strings |
|
186 | + * @return string title |
|
187 | + */ |
|
188 | + public function getHTMLName() { |
|
189 | + if ($this->themeExist('getHTMLName')) { |
|
190 | + return $this->theme->getHTMLName(); |
|
191 | + } else { |
|
192 | + return $this->defaultName; |
|
193 | + } |
|
194 | + } |
|
195 | 195 | |
196 | - /** |
|
197 | - * Returns entity (e.g. company name) - used for footer, copyright |
|
198 | - * @return string entity name |
|
199 | - */ |
|
200 | - public function getEntity() { |
|
201 | - if ($this->themeExist('getEntity')) { |
|
202 | - return $this->theme->getEntity(); |
|
203 | - } else { |
|
204 | - return $this->defaultEntity; |
|
205 | - } |
|
206 | - } |
|
196 | + /** |
|
197 | + * Returns entity (e.g. company name) - used for footer, copyright |
|
198 | + * @return string entity name |
|
199 | + */ |
|
200 | + public function getEntity() { |
|
201 | + if ($this->themeExist('getEntity')) { |
|
202 | + return $this->theme->getEntity(); |
|
203 | + } else { |
|
204 | + return $this->defaultEntity; |
|
205 | + } |
|
206 | + } |
|
207 | 207 | |
208 | - /** |
|
209 | - * Returns slogan |
|
210 | - * @return string slogan |
|
211 | - */ |
|
212 | - public function getSlogan() { |
|
213 | - if ($this->themeExist('getSlogan')) { |
|
214 | - return $this->theme->getSlogan(); |
|
215 | - } else { |
|
216 | - return $this->defaultSlogan; |
|
217 | - } |
|
218 | - } |
|
208 | + /** |
|
209 | + * Returns slogan |
|
210 | + * @return string slogan |
|
211 | + */ |
|
212 | + public function getSlogan() { |
|
213 | + if ($this->themeExist('getSlogan')) { |
|
214 | + return $this->theme->getSlogan(); |
|
215 | + } else { |
|
216 | + return $this->defaultSlogan; |
|
217 | + } |
|
218 | + } |
|
219 | 219 | |
220 | - /** |
|
221 | - * Returns logo claim |
|
222 | - * @return string logo claim |
|
223 | - * @deprecated 13.0.0 |
|
224 | - */ |
|
225 | - public function getLogoClaim() { |
|
226 | - return ''; |
|
227 | - } |
|
220 | + /** |
|
221 | + * Returns logo claim |
|
222 | + * @return string logo claim |
|
223 | + * @deprecated 13.0.0 |
|
224 | + */ |
|
225 | + public function getLogoClaim() { |
|
226 | + return ''; |
|
227 | + } |
|
228 | 228 | |
229 | - /** |
|
230 | - * Returns short version of the footer |
|
231 | - * @return string short footer |
|
232 | - */ |
|
233 | - public function getShortFooter() { |
|
234 | - if ($this->themeExist('getShortFooter')) { |
|
235 | - $footer = $this->theme->getShortFooter(); |
|
236 | - } else { |
|
237 | - $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' . |
|
238 | - ' rel="noreferrer">' .$this->getEntity() . '</a>'. |
|
239 | - ' – ' . $this->getSlogan(); |
|
240 | - } |
|
229 | + /** |
|
230 | + * Returns short version of the footer |
|
231 | + * @return string short footer |
|
232 | + */ |
|
233 | + public function getShortFooter() { |
|
234 | + if ($this->themeExist('getShortFooter')) { |
|
235 | + $footer = $this->theme->getShortFooter(); |
|
236 | + } else { |
|
237 | + $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' . |
|
238 | + ' rel="noreferrer">' .$this->getEntity() . '</a>'. |
|
239 | + ' – ' . $this->getSlogan(); |
|
240 | + } |
|
241 | 241 | |
242 | - return $footer; |
|
243 | - } |
|
242 | + return $footer; |
|
243 | + } |
|
244 | 244 | |
245 | - /** |
|
246 | - * Returns long version of the footer |
|
247 | - * @return string long footer |
|
248 | - */ |
|
249 | - public function getLongFooter() { |
|
250 | - if ($this->themeExist('getLongFooter')) { |
|
251 | - $footer = $this->theme->getLongFooter(); |
|
252 | - } else { |
|
253 | - $footer = $this->getShortFooter(); |
|
254 | - } |
|
245 | + /** |
|
246 | + * Returns long version of the footer |
|
247 | + * @return string long footer |
|
248 | + */ |
|
249 | + public function getLongFooter() { |
|
250 | + if ($this->themeExist('getLongFooter')) { |
|
251 | + $footer = $this->theme->getLongFooter(); |
|
252 | + } else { |
|
253 | + $footer = $this->getShortFooter(); |
|
254 | + } |
|
255 | 255 | |
256 | - return $footer; |
|
257 | - } |
|
256 | + return $footer; |
|
257 | + } |
|
258 | 258 | |
259 | - /** |
|
260 | - * @param string $key |
|
261 | - * @return string URL to doc with key |
|
262 | - */ |
|
263 | - public function buildDocLinkToKey($key) { |
|
264 | - if ($this->themeExist('buildDocLinkToKey')) { |
|
265 | - return $this->theme->buildDocLinkToKey($key); |
|
266 | - } |
|
267 | - return $this->getDocBaseUrl() . '/server/' . $this->defaultDocVersion . '/go.php?to=' . $key; |
|
268 | - } |
|
259 | + /** |
|
260 | + * @param string $key |
|
261 | + * @return string URL to doc with key |
|
262 | + */ |
|
263 | + public function buildDocLinkToKey($key) { |
|
264 | + if ($this->themeExist('buildDocLinkToKey')) { |
|
265 | + return $this->theme->buildDocLinkToKey($key); |
|
266 | + } |
|
267 | + return $this->getDocBaseUrl() . '/server/' . $this->defaultDocVersion . '/go.php?to=' . $key; |
|
268 | + } |
|
269 | 269 | |
270 | - /** |
|
271 | - * Returns primary color |
|
272 | - * @return string |
|
273 | - */ |
|
274 | - public function getColorPrimary() { |
|
270 | + /** |
|
271 | + * Returns primary color |
|
272 | + * @return string |
|
273 | + */ |
|
274 | + public function getColorPrimary() { |
|
275 | 275 | |
276 | - if ($this->themeExist('getColorPrimary')) { |
|
277 | - return $this->theme->getColorPrimary(); |
|
278 | - } |
|
279 | - if ($this->themeExist('getMailHeaderColor')) { |
|
280 | - return $this->theme->getMailHeaderColor(); |
|
281 | - } |
|
282 | - return $this->defaultColorPrimary; |
|
283 | - } |
|
276 | + if ($this->themeExist('getColorPrimary')) { |
|
277 | + return $this->theme->getColorPrimary(); |
|
278 | + } |
|
279 | + if ($this->themeExist('getMailHeaderColor')) { |
|
280 | + return $this->theme->getMailHeaderColor(); |
|
281 | + } |
|
282 | + return $this->defaultColorPrimary; |
|
283 | + } |
|
284 | 284 | |
285 | - /** |
|
286 | - * @return array scss variables to overwrite |
|
287 | - */ |
|
288 | - public function getScssVariables() { |
|
289 | - if($this->themeExist('getScssVariables')) { |
|
290 | - return $this->theme->getScssVariables(); |
|
291 | - } |
|
292 | - return []; |
|
293 | - } |
|
285 | + /** |
|
286 | + * @return array scss variables to overwrite |
|
287 | + */ |
|
288 | + public function getScssVariables() { |
|
289 | + if($this->themeExist('getScssVariables')) { |
|
290 | + return $this->theme->getScssVariables(); |
|
291 | + } |
|
292 | + return []; |
|
293 | + } |
|
294 | 294 | |
295 | - public function shouldReplaceIcons() { |
|
296 | - return false; |
|
297 | - } |
|
295 | + public function shouldReplaceIcons() { |
|
296 | + return false; |
|
297 | + } |
|
298 | 298 | |
299 | - /** |
|
300 | - * Themed logo url |
|
301 | - * |
|
302 | - * @param bool $useSvg Whether to point to the SVG image or a fallback |
|
303 | - * @return string |
|
304 | - */ |
|
305 | - public function getLogo($useSvg = true) { |
|
306 | - if ($this->themeExist('getLogo')) { |
|
307 | - return $this->theme->getLogo($useSvg); |
|
308 | - } |
|
299 | + /** |
|
300 | + * Themed logo url |
|
301 | + * |
|
302 | + * @param bool $useSvg Whether to point to the SVG image or a fallback |
|
303 | + * @return string |
|
304 | + */ |
|
305 | + public function getLogo($useSvg = true) { |
|
306 | + if ($this->themeExist('getLogo')) { |
|
307 | + return $this->theme->getLogo($useSvg); |
|
308 | + } |
|
309 | 309 | |
310 | - if($useSvg) { |
|
311 | - $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo.svg'); |
|
312 | - } else { |
|
313 | - $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo.png'); |
|
314 | - } |
|
315 | - return $logo . '?v=' . hash('sha1', implode('.', \OCP\Util::getVersion())); |
|
316 | - } |
|
310 | + if($useSvg) { |
|
311 | + $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo.svg'); |
|
312 | + } else { |
|
313 | + $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo.png'); |
|
314 | + } |
|
315 | + return $logo . '?v=' . hash('sha1', implode('.', \OCP\Util::getVersion())); |
|
316 | + } |
|
317 | 317 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $this->defaultSlogan = $this->l->t('a safe home for all your data'); |
64 | 64 | $this->defaultColorPrimary = '#0082c9'; |
65 | 65 | |
66 | - $themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php'; |
|
66 | + $themePath = OC::$SERVERROOT.'/themes/'.OC_Util::getTheme().'/defaults.php'; |
|
67 | 67 | if (file_exists($themePath)) { |
68 | 68 | // prevent defaults.php from printing output |
69 | 69 | ob_start(); |
@@ -234,9 +234,9 @@ discard block |
||
234 | 234 | if ($this->themeExist('getShortFooter')) { |
235 | 235 | $footer = $this->theme->getShortFooter(); |
236 | 236 | } else { |
237 | - $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' . |
|
238 | - ' rel="noreferrer">' .$this->getEntity() . '</a>'. |
|
239 | - ' – ' . $this->getSlogan(); |
|
237 | + $footer = '<a href="'.$this->getBaseUrl().'" target="_blank"'. |
|
238 | + ' rel="noreferrer">'.$this->getEntity().'</a>'. |
|
239 | + ' – '.$this->getSlogan(); |
|
240 | 240 | } |
241 | 241 | |
242 | 242 | return $footer; |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | if ($this->themeExist('buildDocLinkToKey')) { |
265 | 265 | return $this->theme->buildDocLinkToKey($key); |
266 | 266 | } |
267 | - return $this->getDocBaseUrl() . '/server/' . $this->defaultDocVersion . '/go.php?to=' . $key; |
|
267 | + return $this->getDocBaseUrl().'/server/'.$this->defaultDocVersion.'/go.php?to='.$key; |
|
268 | 268 | } |
269 | 269 | |
270 | 270 | /** |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | * @return array scss variables to overwrite |
287 | 287 | */ |
288 | 288 | public function getScssVariables() { |
289 | - if($this->themeExist('getScssVariables')) { |
|
289 | + if ($this->themeExist('getScssVariables')) { |
|
290 | 290 | return $this->theme->getScssVariables(); |
291 | 291 | } |
292 | 292 | return []; |
@@ -307,11 +307,11 @@ discard block |
||
307 | 307 | return $this->theme->getLogo($useSvg); |
308 | 308 | } |
309 | 309 | |
310 | - if($useSvg) { |
|
310 | + if ($useSvg) { |
|
311 | 311 | $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo.svg'); |
312 | 312 | } else { |
313 | 313 | $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo.png'); |
314 | 314 | } |
315 | - return $logo . '?v=' . hash('sha1', implode('.', \OCP\Util::getVersion())); |
|
315 | + return $logo.'?v='.hash('sha1', implode('.', \OCP\Util::getVersion())); |
|
316 | 316 | } |
317 | 317 | } |
@@ -40,177 +40,177 @@ |
||
40 | 40 | */ |
41 | 41 | class Defaults { |
42 | 42 | |
43 | - /** |
|
44 | - * \OC_Defaults instance to retrieve the defaults |
|
45 | - * @since 6.0.0 |
|
46 | - */ |
|
47 | - private $defaults; |
|
48 | - |
|
49 | - /** |
|
50 | - * creates a \OC_Defaults instance which is used in all methods to retrieve the |
|
51 | - * actual defaults |
|
52 | - * @since 6.0.0 |
|
53 | - */ |
|
54 | - public function __construct(\OC_Defaults $defaults = null) { |
|
55 | - if ($defaults === null) { |
|
56 | - $defaults = \OC::$server->getThemingDefaults(); |
|
57 | - } |
|
58 | - $this->defaults = $defaults; |
|
59 | - } |
|
60 | - |
|
61 | - /** |
|
62 | - * get base URL for the organisation behind your ownCloud instance |
|
63 | - * @return string |
|
64 | - * @since 6.0.0 |
|
65 | - */ |
|
66 | - public function getBaseUrl() { |
|
67 | - return $this->defaults->getBaseUrl(); |
|
68 | - } |
|
69 | - |
|
70 | - /** |
|
71 | - * link to the desktop sync client |
|
72 | - * @return string |
|
73 | - * @since 6.0.0 |
|
74 | - */ |
|
75 | - public function getSyncClientUrl() { |
|
76 | - return $this->defaults->getSyncClientUrl(); |
|
77 | - } |
|
78 | - |
|
79 | - /** |
|
80 | - * link to the iOS client |
|
81 | - * @return string |
|
82 | - * @since 8.0.0 |
|
83 | - */ |
|
84 | - public function getiOSClientUrl() { |
|
85 | - return $this->defaults->getiOSClientUrl(); |
|
86 | - } |
|
87 | - |
|
88 | - /** |
|
89 | - * link to the Android client |
|
90 | - * @return string |
|
91 | - * @since 8.0.0 |
|
92 | - */ |
|
93 | - public function getAndroidClientUrl() { |
|
94 | - return $this->defaults->getAndroidClientUrl(); |
|
95 | - } |
|
96 | - |
|
97 | - /** |
|
98 | - * base URL to the documentation of your ownCloud instance |
|
99 | - * @return string |
|
100 | - * @since 6.0.0 |
|
101 | - */ |
|
102 | - public function getDocBaseUrl() { |
|
103 | - return $this->defaults->getDocBaseUrl(); |
|
104 | - } |
|
105 | - |
|
106 | - /** |
|
107 | - * name of your ownCloud instance |
|
108 | - * @return string |
|
109 | - * @since 6.0.0 |
|
110 | - */ |
|
111 | - public function getName() { |
|
112 | - return $this->defaults->getName(); |
|
113 | - } |
|
114 | - |
|
115 | - /** |
|
116 | - * name of your ownCloud instance containing HTML styles |
|
117 | - * @return string |
|
118 | - * @since 8.0.0 |
|
119 | - */ |
|
120 | - public function getHTMLName() { |
|
121 | - return $this->defaults->getHTMLName(); |
|
122 | - } |
|
123 | - |
|
124 | - /** |
|
125 | - * Entity behind your onwCloud instance |
|
126 | - * @return string |
|
127 | - * @since 6.0.0 |
|
128 | - */ |
|
129 | - public function getEntity() { |
|
130 | - return $this->defaults->getEntity(); |
|
131 | - } |
|
132 | - |
|
133 | - /** |
|
134 | - * ownCloud slogan |
|
135 | - * @return string |
|
136 | - * @since 6.0.0 |
|
137 | - */ |
|
138 | - public function getSlogan() { |
|
139 | - return $this->defaults->getSlogan(); |
|
140 | - } |
|
141 | - |
|
142 | - /** |
|
143 | - * logo claim |
|
144 | - * @return string |
|
145 | - * @since 6.0.0 |
|
146 | - * @deprecated 13.0.0 |
|
147 | - */ |
|
148 | - public function getLogoClaim() { |
|
149 | - return ''; |
|
150 | - } |
|
151 | - |
|
152 | - /** |
|
153 | - * footer, short version |
|
154 | - * @return string |
|
155 | - * @since 6.0.0 |
|
156 | - */ |
|
157 | - public function getShortFooter() { |
|
158 | - return $this->defaults->getShortFooter(); |
|
159 | - } |
|
160 | - |
|
161 | - /** |
|
162 | - * footer, long version |
|
163 | - * @return string |
|
164 | - * @since 6.0.0 |
|
165 | - */ |
|
166 | - public function getLongFooter() { |
|
167 | - return $this->defaults->getLongFooter(); |
|
168 | - } |
|
169 | - |
|
170 | - /** |
|
171 | - * Returns the AppId for the App Store for the iOS Client |
|
172 | - * @return string AppId |
|
173 | - * @since 8.0.0 |
|
174 | - */ |
|
175 | - public function getiTunesAppId() { |
|
176 | - return $this->defaults->getiTunesAppId(); |
|
177 | - } |
|
178 | - |
|
179 | - /** |
|
180 | - * Themed logo url |
|
181 | - * |
|
182 | - * @param bool $useSvg Whether to point to the SVG image or a fallback |
|
183 | - * @return string |
|
184 | - * @since 12.0.0 |
|
185 | - */ |
|
186 | - public function getLogo($useSvg = true) { |
|
187 | - return $this->defaults->getLogo($useSvg); |
|
188 | - } |
|
189 | - |
|
190 | - /** |
|
191 | - * Returns primary color |
|
192 | - * @return string |
|
193 | - * @since 12.0.0 |
|
194 | - */ |
|
195 | - public function getColorPrimary() { |
|
196 | - return $this->defaults->getColorPrimary(); |
|
197 | - } |
|
198 | - |
|
199 | - /** |
|
200 | - * @param string $key |
|
201 | - * @return string URL to doc with key |
|
202 | - * @since 12.0.0 |
|
203 | - */ |
|
204 | - public function buildDocLinkToKey($key) { |
|
205 | - return $this->defaults->buildDocLinkToKey($key); |
|
206 | - } |
|
207 | - |
|
208 | - /** |
|
209 | - * Returns the title |
|
210 | - * @return string title |
|
211 | - * @since 12.0.0 |
|
212 | - */ |
|
213 | - public function getTitle() { |
|
214 | - return $this->defaults->getTitle(); |
|
215 | - } |
|
43 | + /** |
|
44 | + * \OC_Defaults instance to retrieve the defaults |
|
45 | + * @since 6.0.0 |
|
46 | + */ |
|
47 | + private $defaults; |
|
48 | + |
|
49 | + /** |
|
50 | + * creates a \OC_Defaults instance which is used in all methods to retrieve the |
|
51 | + * actual defaults |
|
52 | + * @since 6.0.0 |
|
53 | + */ |
|
54 | + public function __construct(\OC_Defaults $defaults = null) { |
|
55 | + if ($defaults === null) { |
|
56 | + $defaults = \OC::$server->getThemingDefaults(); |
|
57 | + } |
|
58 | + $this->defaults = $defaults; |
|
59 | + } |
|
60 | + |
|
61 | + /** |
|
62 | + * get base URL for the organisation behind your ownCloud instance |
|
63 | + * @return string |
|
64 | + * @since 6.0.0 |
|
65 | + */ |
|
66 | + public function getBaseUrl() { |
|
67 | + return $this->defaults->getBaseUrl(); |
|
68 | + } |
|
69 | + |
|
70 | + /** |
|
71 | + * link to the desktop sync client |
|
72 | + * @return string |
|
73 | + * @since 6.0.0 |
|
74 | + */ |
|
75 | + public function getSyncClientUrl() { |
|
76 | + return $this->defaults->getSyncClientUrl(); |
|
77 | + } |
|
78 | + |
|
79 | + /** |
|
80 | + * link to the iOS client |
|
81 | + * @return string |
|
82 | + * @since 8.0.0 |
|
83 | + */ |
|
84 | + public function getiOSClientUrl() { |
|
85 | + return $this->defaults->getiOSClientUrl(); |
|
86 | + } |
|
87 | + |
|
88 | + /** |
|
89 | + * link to the Android client |
|
90 | + * @return string |
|
91 | + * @since 8.0.0 |
|
92 | + */ |
|
93 | + public function getAndroidClientUrl() { |
|
94 | + return $this->defaults->getAndroidClientUrl(); |
|
95 | + } |
|
96 | + |
|
97 | + /** |
|
98 | + * base URL to the documentation of your ownCloud instance |
|
99 | + * @return string |
|
100 | + * @since 6.0.0 |
|
101 | + */ |
|
102 | + public function getDocBaseUrl() { |
|
103 | + return $this->defaults->getDocBaseUrl(); |
|
104 | + } |
|
105 | + |
|
106 | + /** |
|
107 | + * name of your ownCloud instance |
|
108 | + * @return string |
|
109 | + * @since 6.0.0 |
|
110 | + */ |
|
111 | + public function getName() { |
|
112 | + return $this->defaults->getName(); |
|
113 | + } |
|
114 | + |
|
115 | + /** |
|
116 | + * name of your ownCloud instance containing HTML styles |
|
117 | + * @return string |
|
118 | + * @since 8.0.0 |
|
119 | + */ |
|
120 | + public function getHTMLName() { |
|
121 | + return $this->defaults->getHTMLName(); |
|
122 | + } |
|
123 | + |
|
124 | + /** |
|
125 | + * Entity behind your onwCloud instance |
|
126 | + * @return string |
|
127 | + * @since 6.0.0 |
|
128 | + */ |
|
129 | + public function getEntity() { |
|
130 | + return $this->defaults->getEntity(); |
|
131 | + } |
|
132 | + |
|
133 | + /** |
|
134 | + * ownCloud slogan |
|
135 | + * @return string |
|
136 | + * @since 6.0.0 |
|
137 | + */ |
|
138 | + public function getSlogan() { |
|
139 | + return $this->defaults->getSlogan(); |
|
140 | + } |
|
141 | + |
|
142 | + /** |
|
143 | + * logo claim |
|
144 | + * @return string |
|
145 | + * @since 6.0.0 |
|
146 | + * @deprecated 13.0.0 |
|
147 | + */ |
|
148 | + public function getLogoClaim() { |
|
149 | + return ''; |
|
150 | + } |
|
151 | + |
|
152 | + /** |
|
153 | + * footer, short version |
|
154 | + * @return string |
|
155 | + * @since 6.0.0 |
|
156 | + */ |
|
157 | + public function getShortFooter() { |
|
158 | + return $this->defaults->getShortFooter(); |
|
159 | + } |
|
160 | + |
|
161 | + /** |
|
162 | + * footer, long version |
|
163 | + * @return string |
|
164 | + * @since 6.0.0 |
|
165 | + */ |
|
166 | + public function getLongFooter() { |
|
167 | + return $this->defaults->getLongFooter(); |
|
168 | + } |
|
169 | + |
|
170 | + /** |
|
171 | + * Returns the AppId for the App Store for the iOS Client |
|
172 | + * @return string AppId |
|
173 | + * @since 8.0.0 |
|
174 | + */ |
|
175 | + public function getiTunesAppId() { |
|
176 | + return $this->defaults->getiTunesAppId(); |
|
177 | + } |
|
178 | + |
|
179 | + /** |
|
180 | + * Themed logo url |
|
181 | + * |
|
182 | + * @param bool $useSvg Whether to point to the SVG image or a fallback |
|
183 | + * @return string |
|
184 | + * @since 12.0.0 |
|
185 | + */ |
|
186 | + public function getLogo($useSvg = true) { |
|
187 | + return $this->defaults->getLogo($useSvg); |
|
188 | + } |
|
189 | + |
|
190 | + /** |
|
191 | + * Returns primary color |
|
192 | + * @return string |
|
193 | + * @since 12.0.0 |
|
194 | + */ |
|
195 | + public function getColorPrimary() { |
|
196 | + return $this->defaults->getColorPrimary(); |
|
197 | + } |
|
198 | + |
|
199 | + /** |
|
200 | + * @param string $key |
|
201 | + * @return string URL to doc with key |
|
202 | + * @since 12.0.0 |
|
203 | + */ |
|
204 | + public function buildDocLinkToKey($key) { |
|
205 | + return $this->defaults->buildDocLinkToKey($key); |
|
206 | + } |
|
207 | + |
|
208 | + /** |
|
209 | + * Returns the title |
|
210 | + * @return string title |
|
211 | + * @since 12.0.0 |
|
212 | + */ |
|
213 | + public function getTitle() { |
|
214 | + return $this->defaults->getTitle(); |
|
215 | + } |
|
216 | 216 | } |