diff options
author | Björn Schießle <bjoern@schiessle.org> | 2013-06-13 07:32:41 -0700 |
---|---|---|
committer | Björn Schießle <bjoern@schiessle.org> | 2013-06-13 07:32:41 -0700 |
commit | 7889f2ef5c086d050cb88e2943253af84362365f (patch) | |
tree | a955ba46e3581d865d0fef50cf836c5b43b42498 /lib | |
parent | 4bafa4e81acea88c3925a04c392a982c80a1d7c3 (diff) | |
parent | 15eda5321531b7ae44a6dd2ed1d28ae0e2045c2b (diff) | |
download | nextcloud-server-7889f2ef5c086d050cb88e2943253af84362365f.tar.gz nextcloud-server-7889f2ef5c086d050cb88e2943253af84362365f.zip |
Merge pull request #3687 from owncloud/template_updates
Make templates aware of different owncloud editions
Diffstat (limited to 'lib')
-rw-r--r-- | lib/app.php | 3 | ||||
-rw-r--r-- | lib/defaults.php | 74 |
2 files changed, 76 insertions, 1 deletions
diff --git a/lib/app.php b/lib/app.php index 3e6cadfe2c9..f974dd9f594 100644 --- a/lib/app.php +++ b/lib/app.php @@ -349,7 +349,8 @@ class OC_App{ $settings = array(); // by default, settings only contain the help menu - if(OC_Config::getValue('knowledgebaseenabled', true)==true) { + if(OC_Util::getEditionString() === '' && + OC_Config::getValue('knowledgebaseenabled', true)==true) { $settings = array( array( "id" => "help", diff --git a/lib/defaults.php b/lib/defaults.php new file mode 100644 index 00000000000..7dc6fbd0ada --- /dev/null +++ b/lib/defaults.php @@ -0,0 +1,74 @@ +<?php + +/** + * Default strings and values which differ between the enterprise and the + * community edition. Use the get methods to always get the right strings. + */ + +class OC_Defaults { + + private static $communityEntity = "ownCloud"; + private static $communityName = "ownCloud"; + private static $communityBaseUrl = "http://owncloud.org"; + private static $communitySyncClientUrl = " http://owncloud.org/sync-clients/"; + private static $communityDocBaseUrl = "http://doc.owncloud.org"; + private static $communitySlogan = "web services under your control"; + + private static $enterpriseEntity = "ownCloud Inc."; + private static $enterpriseName = "ownCloud Enterprise Edition"; + private static $enterpriseBaseUrl = "https://owncloud.com"; + private static $enterpriseDocBaseUrl = "http://doc.owncloud.com"; + private static $enterpiseSyncClientUrl = "https://owncloud.com/products/desktop-clients"; + private static $enterpriseSlogan = "Your Cloud, Your Data, Your Way!"; + + + public static function getBaseUrl() { + if (OC_Util::getEditionString() === '') { + return self::$communityBaseUrl; + } else { + return self::$enterpriseBaseUrl; + } + } + + public static function getSyncClientUrl() { + if (OC_Util::getEditionString() === '') { + return self::$communitySyncClientUrl; + } else { + return self::$enterpiseSyncClientUrl; + } + } + + public static function getDocBaseUrl() { + if (OC_Util::getEditionString() === '') { + return self::$communityDocBaseUrl; + } else { + return self::$enterpriseDocBaseUrl; + } + } + + public static function getName() { + if (OC_Util::getEditionString() === '') { + return self::$communityName; + } else { + return self::$enterpriseName; + } + } + + public static function getEntity() { + if (OC_Util::getEditionString() === '') { + return self::$communityEntity; + } else { + return self::$enterpriseEntity; + } + } + + public static function getSlogan() { + $l = OC_L10N::get('core'); + if (OC_Util::getEditionString() === '') { + return $l->t(self::$communitySlogan); + } else { + return self::$enterpriseSlogan; + } + } + +}
\ No newline at end of file |