diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-11-26 10:48:08 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-11-26 13:58:43 +0100 |
commit | 675417a75c3c0d93838397b4670e2d26d53eb2fe (patch) | |
tree | d14e4cbeb4aaca161b970c4f54f95e8b75a472d9 /lib/private/util.php | |
parent | 3882cc8ef37a28972a8fca35ca1cc26cc060e7bc (diff) | |
download | nextcloud-server-675417a75c3c0d93838397b4670e2d26d53eb2fe.tar.gz nextcloud-server-675417a75c3c0d93838397b4670e2d26d53eb2fe.zip |
Untangle the linkToDocs method in OC_Helper
* now uses the proper URLGenerator interface
* add comment about DI problems
Diffstat (limited to 'lib/private/util.php')
-rw-r--r-- | lib/private/util.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/private/util.php b/lib/private/util.php index 69f01c22be9..84a8c49c383 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -621,6 +621,9 @@ class OC_Util { $webServerRestart = false; $setup = new \OC\Setup($config, \OC::$server->getIniWrapper(), \OC::$server->getL10N('lib'), new \OC_Defaults(), \OC::$server->getLogger(), \OC::$server->getSecureRandom()); + + $urlGenerator = \OC::$server->getURLGenerator(); + $availableDatabases = $setup->getSupportedDatabases(); if (empty($availableDatabases)) { $errors[] = array( @@ -649,7 +652,7 @@ class OC_Util { 'error' => $l->t('Cannot write into "config" directory'), 'hint' => $l->t('This can usually be fixed by ' . '%sgiving the webserver write access to the config directory%s.', - array('<a href="' . \OC_Helper::linkToDocs('admin-dir_permissions') . '" target="_blank">', '</a>')) + array('<a href="' . $urlGenerator->linkToDocs('admin-dir_permissions') . '" target="_blank">', '</a>')) ); } @@ -664,7 +667,7 @@ class OC_Util { 'hint' => $l->t('This can usually be fixed by ' . '%sgiving the webserver write access to the apps directory%s' . ' or disabling the appstore in the config file.', - array('<a href="' . \OC_Helper::linkToDocs('admin-dir_permissions') . '" target="_blank">', '</a>')) + array('<a href="' . $urlGenerator->linkToDocs('admin-dir_permissions') . '" target="_blank">', '</a>')) ); } } @@ -679,14 +682,14 @@ class OC_Util { 'error' => $l->t('Cannot create "data" directory (%s)', array($CONFIG_DATADIRECTORY)), 'hint' => $l->t('This can usually be fixed by ' . '<a href="%s" target="_blank">giving the webserver write access to the root directory</a>.', - array(OC_Helper::linkToDocs('admin-dir_permissions'))) + array($urlGenerator->linkToDocs('admin-dir_permissions'))) ); } } else if (!is_writable($CONFIG_DATADIRECTORY) or !is_readable($CONFIG_DATADIRECTORY)) { //common hint for all file permissions error messages $permissionsHint = $l->t('Permissions can usually be fixed by ' . '%sgiving the webserver write access to the root directory%s.', - array('<a href="' . \OC_Helper::linkToDocs('admin-dir_permissions') . '" target="_blank">', '</a>')); + array('<a href="' . $urlGenerator->linkToDocs('admin-dir_permissions') . '" target="_blank">', '</a>')); $errors[] = array( 'error' => 'Data directory (' . $CONFIG_DATADIRECTORY . ') not writable by ownCloud', 'hint' => $permissionsHint |