]> source.dussan.org Git - nextcloud-server.git/commitdiff
introduce OC_Helper::linkToDocs()
authorThomas Müller <thomas.mueller@tmit.eu>
Mon, 21 Oct 2013 20:01:27 +0000 (22:01 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Mon, 21 Oct 2013 20:01:27 +0000 (22:01 +0200)
lib/private/helper.php
lib/private/template/functions.php
lib/private/util.php

index e9b129db0ca9dd40dc5043dcfef5ed1f6a08154a..fca08adca8bcc33faf04a853731b26ab54eb20e1 100644 (file)
@@ -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
index 94b87d1e507c95f24194809ab57cd69e21652a32..ce42633b364e55d44b6bc4efbb44612805db37a4 100644 (file)
@@ -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);
 }
 
 /**
index 04b27ee61ae9938e502a36098c6c0e8497195a48..f63884c0f320b63106639a939b8b88c0d80662aa 100755 (executable)
@@ -303,7 +303,7 @@ class OC_Util {
 
                //common hint for all file permissions error messages
                $permissionsHint = 'Permissions can usually be fixed by '
-                       .'<a href="' . link_to_docs('admin-dir_permissions')
+                       .'<a href="' . OC_Helper::linkToDocs('admin-dir_permissions')
                        .'" target="_blank">giving the webserver write access to the root directory</a>.';
 
                // 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 '
-                                       .'<a href="' . link_to_docs('admin-dir_permissions')
+                                       .'<a href="' . OC_Helper::linkToDocs('admin-dir_permissions')
                                        .'" target="_blank">giving the webserver write access to the config directory</a>.'
                                );
                }
@@ -324,7 +324,7 @@ class OC_Util {
                                $errors[] = array(
                                        'error' => "Can't write into apps directory",
                                        'hint' => 'This can usually be fixed by '
-                                               .'<a href="' . link_to_docs('admin-dir_permissions')
+                                               .'<a href="' . OC_Helper::linkToDocs('admin-dir_permissions')
                                                .'" target="_blank">giving the webserver write access to the apps directory</a> '
                                                .'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 '
-                                       .'<a href="' . link_to_docs('admin-dir_permissions')
+                                       .'<a href="' . OC_Helper::linkToDocs('admin-dir_permissions')
                                        .'" target="_blank">giving the webserver write access to the root directory</a>.'
                                );
                        }