Skip to content

Commit a750bc8

Browse files
committed
Deprecate getEditionString()
1 parent 20b636f commit a750bc8

File tree

15 files changed

+17
-71
lines changed

15 files changed

+17
-71
lines changed

apps/files_sharing/templates/public.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,7 @@
4343

4444
<div class="header-appname-container">
4545
<h1 class="header-appname">
46-
<?php
47-
if(OC_Util::getEditionString() === '') {
48-
p($theme->getName());
49-
} else {
50-
print_unescaped($theme->getHTMLName());
51-
}
52-
?>
46+
<?php p($theme->getName()); ?>
5347
</h1>
5448
</div>
5549

core/Command/Status.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,11 @@ protected function configure() {
3838
}
3939

4040
protected function execute(InputInterface $input, OutputInterface $output) {
41-
$installed = (bool) \OC::$server->getConfig()->getSystemValue('installed', false);
42-
4341
$values = array(
44-
'installed' => $installed,
42+
'installed' => (bool) \OC::$server->getConfig()->getSystemValue('installed', false),
4543
'version' => implode('.', \OCP\Util::getVersion()),
4644
'versionstring' => \OC_Util::getVersionString(),
47-
'edition' => $installed ? \OC_Util::getEditionString() : '',
45+
'edition' => '',
4846
);
4947

5048
$this->writeArrayInOutputFormat($input, $output, $values);

core/Controller/OCSController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function getCapabilities() {
8181
'minor' => $minor,
8282
'micro' => $micro,
8383
'string' => \OC_Util::getVersionString(),
84-
'edition' => \OC_Util::getEditionString(),
84+
'edition' => '',
8585
);
8686

8787
$result['capabilities'] = $this->capabilitiesManager->getCapabilities();

core/templates/layout.user.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,7 @@
4848

4949
<a href="#" class="header-appname-container menutoggle" tabindex="2">
5050
<h1 class="header-appname">
51-
<?php
52-
if(OC_Util::getEditionString() === '') {
53-
p(!empty($_['application'])?$_['application']: $l->t('Apps'));
54-
} else {
55-
print_unescaped($theme->getHTMLName());
56-
}
57-
?>
51+
<?php p(!empty($_['application'])?$_['application']: $l->t('Apps')); ?>
5852
</h1>
5953
<div class="icon-caret"></div>
6054
</a>

lib/private/OCSClient.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,7 @@ public function __construct(IClientService $httpClientService,
7070
* @return bool
7171
*/
7272
public function isAppStoreEnabled() {
73-
// For a regular edition default to true, all others default to false
74-
$default = false;
75-
if (\OC_Util::getEditionString() === '') {
76-
$default = true;
77-
}
78-
79-
return $this->config->getSystemValue('appstoreenabled', $default) === true;
73+
return $this->config->getSystemValue('appstoreenabled', true) === true;
8074
}
8175

8276
/**

lib/private/Updater/VersionCheck.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function check() {
7171
$version['installed'] = $this->config->getAppValue('core', 'installedat');
7272
$version['updated'] = $this->config->getAppValue('core', 'lastupdatedat');
7373
$version['updatechannel'] = \OC_Util::getChannel();
74-
$version['edition'] = \OC_Util::getEditionString();
74+
$version['edition'] = '';
7575
$version['build'] = \OC_Util::getBuild();
7676
$versionString = implode('x', $version);
7777

lib/private/legacy/app.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,7 @@ public static function getSettingsNavigation() {
437437

438438
$settings = array();
439439
// by default, settings only contain the help menu
440-
if (OC_Util::getEditionString() === '' &&
441-
\OC::$server->getSystemConfig()->getValue('knowledgebaseenabled', true) == true
442-
) {
440+
if (\OC::$server->getSystemConfig()->getValue('knowledgebaseenabled', true)) {
443441
$settings = array(
444442
array(
445443
"id" => "help",

lib/private/legacy/util.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -382,18 +382,11 @@ public static function getVersionString() {
382382
}
383383

384384
/**
385-
* @description get the current installed edition of ownCloud. There is the community
386-
* edition that just returns an empty string and the enterprise edition
387-
* that returns "Enterprise".
385+
* @deprecated the value is of no use anymore
388386
* @return string
389387
*/
390388
public static function getEditionString() {
391-
if (OC_App::isEnabled('enterprise_key')) {
392-
return "Enterprise";
393-
} else {
394-
return "";
395-
}
396-
389+
return '';
397390
}
398391

399392
/**

settings/Controller/CheckSetupController.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -174,19 +174,13 @@ protected function getCurlVersion() {
174174
* @return string
175175
*/
176176
private function isUsedTlsLibOutdated() {
177-
// Appstore is disabled by default in EE
178-
$appStoreDefault = false;
179-
if (\OC_Util::getEditionString() === '') {
180-
$appStoreDefault = true;
181-
}
182-
183177
// Don't run check when:
184178
// 1. Server has `has_internet_connection` set to false
185179
// 2. AppStore AND S2S is disabled
186180
if(!$this->config->getSystemValue('has_internet_connection', true)) {
187181
return '';
188182
}
189-
if(!$this->config->getSystemValue('appstoreenabled', $appStoreDefault)
183+
if(!$this->config->getSystemValue('appstoreenabled', true)
190184
&& $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'no'
191185
&& $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'no') {
192186
return '';
@@ -200,7 +194,7 @@ private function isUsedTlsLibOutdated() {
200194
}
201195

202196
$features = (string)$this->l10n->t('installing and updating apps via the app store or Federated Cloud Sharing');
203-
if(!$this->config->getSystemValue('appstoreenabled', $appStoreDefault)) {
197+
if(!$this->config->getSystemValue('appstoreenabled', true)) {
204198
$features = (string)$this->l10n->t('Federated Cloud Sharing');
205199
}
206200

settings/templates/personal.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,10 @@
157157
</option>
158158
<?php endforeach;?>
159159
</select>
160-
<?php if (OC_Util::getEditionString() === ''): ?>
161160
<a href="https://www.transifex.com/nextcloud/nextcloud/"
162161
target="_blank" rel="noreferrer">
163162
<em><?php p($l->t('Help translate'));?></em>
164163
</a>
165-
<?php endif; ?>
166164
</form>
167165

168166

@@ -181,7 +179,6 @@
181179
alt="<?php p($l->t('iOS app'));?>" />
182180
</a>
183181

184-
<?php if (OC_Util::getEditionString() === ''): ?>
185182
<p>
186183
<?php print_unescaped($l->t('If you want to support the project
187184
<a href="https://nextcloud.com/contribute"
@@ -190,7 +187,6 @@
190187
<a href="https://nextcloud.com/contribute"
191188
target="_blank" rel="noreferrer">spread the word</a>!'));?>
192189
</p>
193-
<?php endif; ?>
194190

195191
<?php if(OC_APP::isEnabled('firstrunwizard')) {?>
196192
<p><a class="button" href="#" id="showWizard"><?php p($l->t('Show First Run Wizard again'));?></a></p>

0 commit comments

Comments
 (0)