From 124984905e162160fe38d141d238c6102f549e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Mon, 21 Oct 2013 22:01:27 +0200 Subject: [PATCH] introduce OC_Helper::linkToDocs() --- lib/private/helper.php | 9 +++++++++ lib/private/template/functions.php | 7 +++++-- lib/private/util.php | 8 ++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/lib/private/helper.php b/lib/private/helper.php index e9b129db0c..fca08adca8 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -58,6 +58,15 @@ class OC_Helper { return OC::$server->getURLGenerator()->linkTo($app, $file, $args); } + /** + * @param $key + * @return string url to the online documentation + */ + public static function linkToDocs($key) { + $theme = new OC_Defaults(); + return $theme->getDocBaseUrl() . '/server/5.0/go.php?to=' . $key; + } + /** * @brief Creates an absolute url * @param string $app app diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php index 94b87d1e50..ce42633b36 100644 --- a/lib/private/template/functions.php +++ b/lib/private/template/functions.php @@ -35,9 +35,12 @@ function link_to( $app, $file, $args = array() ) { return OC_Helper::linkTo( $app, $file, $args ); } +/** + * @param $key + * @return string url to the online documentation + */ function link_to_docs($key) { - $theme = new OC_Defaults(); - return $theme->getDocBaseUrl() . '/server/5.0/go.php?to=' . $key; + return OC_Helper::linkToDocs($key); } /** diff --git a/lib/private/util.php b/lib/private/util.php index 04b27ee61a..f63884c0f3 100755 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -303,7 +303,7 @@ class OC_Util { //common hint for all file permissions error messages $permissionsHint = 'Permissions can usually be fixed by ' - .'giving the webserver write access to the root directory.'; // Check if config folder is writable. @@ -311,7 +311,7 @@ class OC_Util { $errors[] = array( 'error' => "Can't write into config directory", 'hint' => 'This can usually be fixed by ' - .'giving the webserver write access to the config directory.' ); } @@ -324,7 +324,7 @@ class OC_Util { $errors[] = array( 'error' => "Can't write into apps directory", 'hint' => 'This can usually be fixed by ' - .'giving the webserver write access to the apps directory ' .'or disabling the appstore in the config file.' ); @@ -340,7 +340,7 @@ class OC_Util { $errors[] = array( 'error' => "Can't create data directory (".$CONFIG_DATADIRECTORY.")", 'hint' => 'This can usually be fixed by ' - .'giving the webserver write access to the root directory.' ); }