Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/firstrunwizard.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2015-05-03 20:27:45 +0300
committerGeorg Ehrke <developer@georgehrke.com>2015-09-22 19:05:43 +0300
commit64090974adf8343218d307436a1c6d6923bef3fb (patch)
tree9a50dd448636e2e6e8b0275e9d99a9a9cc15f4b8
parent3bdf3b5a96afa48511e5d8a56cc7c620329dc0c8 (diff)
mimic core's getEditionString() to comply with code guidelines
-rw-r--r--lib/util.php38
-rw-r--r--templates/wizard.php6
-rw-r--r--wizard.php1
3 files changed, 42 insertions, 3 deletions
diff --git a/lib/util.php b/lib/util.php
new file mode 100644
index 00000000..318033e2
--- /dev/null
+++ b/lib/util.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * ownCloud - firstrunwizard App
+ *
+ * @author Georg Ehrke
+ * @copyright 2015 Georg Ehrke georg@ownCloud.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\FirstRunWizard;
+
+class Util {
+
+ /**
+ * mimic \OC_Util::getEditionString()
+ * @return string
+ */
+ public static function getEdition() {
+ if (\OC::$server->getAppManager()->isEnabledForUser('enterprise_key')) {
+ return "Enterprise";
+ }
+ return '';
+ }
+} \ No newline at end of file
diff --git a/templates/wizard.php b/templates/wizard.php
index df5122ef..b5d51e2a 100644
--- a/templates/wizard.php
+++ b/templates/wizard.php
@@ -4,7 +4,7 @@
<img class="svg" src="<?php print_unescaped(OCP\Util::imagePath('core', 'actions/close.svg')); ?>">
</a>
<h1><?php p($l->t('Welcome to %s', array($theme->getTitle()))); ?></h1>
-<?php if (OC_Util::getEditionString() === ''): ?>
+<?php if ($_['edition'] === ''): ?>
<p><?php p($l->t('Your personal web services. All your files, contacts, calendar and more, in one place.'));?></p>
<?php else: ?>
<p><?php p($theme->getSlogan()); ?></p>
@@ -25,7 +25,7 @@
alt="<?php p($l->t('iOS app'));?>" />
</a>
-<?php if (OC_Util::getEditionString() === ''): ?>
+<?php if ($_['edition'] === ''): ?>
<h2><?php p($l->t('Connect your desktop apps to %s', array($theme->getName()))); ?></h2>
<a target="_blank" class="button" href="<?php p(link_to_docs('user-sync-calendars')) ?>">
<img class="appsmall appsmall-calendar svg" alt=""
@@ -53,7 +53,7 @@
<?php endif; ?>
<p class="footnote">
-<?php if (OC_Util::getEditionString() === ''): ?>
+<?php if ($_['edition'] === ''): ?>
<?php print_unescaped($l->t('There’s more information in the <a target="_blank" href="%s">documentation</a> and on our <a target="_blank" href="http://owncloud.org">website</a>.', array(link_to_docs('user_manual')))); ?><br>
<?php print_unescaped($l->t('If you like ownCloud,
<a href="mailto:?subject=ownCloud
diff --git a/wizard.php b/wizard.php
index 0811d373..756265ea 100644
--- a/wizard.php
+++ b/wizard.php
@@ -37,5 +37,6 @@ $clients = array(
$tmpl = new OCP\Template( 'firstrunwizard', 'wizard', '' );
$tmpl->assign('logo', OCP\Util::linkTo('core','img/logo-inverted.svg'));
$tmpl->assign('clients', $clients);
+$tmpl->assign('edition', OCA\FirstRunWizard\Util::getEdition());
$tmpl->printPage();