diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-12-04 16:48:07 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-12-08 22:42:37 +0100 |
commit | 0d4f0ab87182cf2cb588bd3285fe41b46f26ee4d (patch) | |
tree | 68ee815c2f06e4f6ef049d56f65fdbf2cf8c4d18 /settings/personal.php | |
parent | 2d5fc9c1a6beec15f04277ccf1408b17f04631e9 (diff) | |
download | nextcloud-server-0d4f0ab87182cf2cb588bd3285fe41b46f26ee4d.tar.gz nextcloud-server-0d4f0ab87182cf2cb588bd3285fe41b46f26ee4d.zip |
reduce OC_Preferences, OC_Config and \OCP\Config usage
* files_encryption
* files_versions
* files_trashbin
* tests
* status.php
* core
* server container
Diffstat (limited to 'settings/personal.php')
-rw-r--r-- | settings/personal.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/settings/personal.php b/settings/personal.php index bef800ae7f1..f181c9cb2c1 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -9,6 +9,7 @@ OC_Util::checkLoggedIn(); $defaults = new OC_Defaults(); // initialize themable default strings and urls $certificateManager = \OC::$server->getCertificateManager(); +$config = \OC::$server->getConfig(); // Highlight navigation entry OC_Util::addScript( 'settings', 'personal' ); @@ -16,7 +17,7 @@ OC_Util::addStyle( 'settings', 'settings' ); \OC_Util::addVendorScript('strengthify/jquery.strengthify'); \OC_Util::addVendorStyle('strengthify/strengthify'); \OC_Util::addScript('files', 'jquery.fileupload'); -if (\OC_Config::getValue('enable_avatars', true) === true) { +if ($config->getSystemValue('enable_avatars', true) === true) { \OC_Util::addVendorScript('jcrop/js/jquery.Jcrop'); \OC_Util::addVendorStyle('jcrop/css/jquery.Jcrop'); } @@ -26,9 +27,9 @@ OC_App::setActiveNavigationEntry( 'personal' ); $storageInfo=OC_Helper::getStorageInfo('/'); -$email=OC_Preferences::getValue(OC_User::getUser(), 'settings', 'email', ''); +$email=$config->getUserValue(OC_User::getUser(), 'settings', 'email', ''); -$userLang=OC_Preferences::getValue( OC_User::getUser(), 'core', 'lang', OC_L10N::findLanguage() ); +$userLang=$config->getUserValue( OC_User::getUser(), 'core', 'lang', OC_L10N::findLanguage() ); $languageCodes=OC_L10N::findAvailableLanguages(); //check if encryption was enabled in the past @@ -74,9 +75,9 @@ usort( $languages, function ($a, $b) { //links to clients $clients = array( - 'desktop' => OC_Config::getValue('customclient_desktop', $defaults->getSyncClientUrl()), - 'android' => OC_Config::getValue('customclient_android', $defaults->getAndroidClientUrl()), - 'ios' => OC_Config::getValue('customclient_ios', $defaults->getiOSClientUrl()) + 'desktop' => $config->getSystemValue('customclient_desktop', $defaults->getSyncClientUrl()), + 'android' => $config->getSystemValue('customclient_android', $defaults->getAndroidClientUrl()), + 'ios' => $config->getSystemValue('customclient_ios', $defaults->getiOSClientUrl()) ); // Return template @@ -95,7 +96,7 @@ $tmpl->assign('displayName', OC_User::getDisplayName()); $tmpl->assign('enableDecryptAll' , $enableDecryptAll); $tmpl->assign('backupKeysExists' , $backupKeysExists); $tmpl->assign('filesStillEncrypted' , $filesStillEncrypted); -$tmpl->assign('enableAvatars', \OC_Config::getValue('enable_avatars', true)); +$tmpl->assign('enableAvatars', $config->getSystemValue('enable_avatars', true)); $tmpl->assign('avatarChangeSupported', OC_User::canUserChangeAvatar(OC_User::getUser())); $tmpl->assign('certs', $certificateManager->listCertificates()); |