summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-10-21 21:29:45 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-10-21 21:29:45 +0200
commit148d2616e554964b59c5acaebf76333e5ae7f5eb (patch)
tree3cb02bf6096b4767646127eda7bd7d94c63abba6 /lib/private
parenta376407da3dcac86f5a2ab41f23545ff6c4b21d9 (diff)
downloadnextcloud-server-148d2616e554964b59c5acaebf76333e5ae7f5eb.tar.gz
nextcloud-server-148d2616e554964b59c5acaebf76333e5ae7f5eb.zip
introduce link_to_docs() and migrate links
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/config.php2
-rw-r--r--lib/private/setup.php2
-rw-r--r--lib/private/template/functions.php5
-rwxr-xr-xlib/private/util.php16
4 files changed, 15 insertions, 10 deletions
diff --git a/lib/private/config.php b/lib/private/config.php
index 72423137fa3..c28669f56a3 100644
--- a/lib/private/config.php
+++ b/lib/private/config.php
@@ -172,7 +172,7 @@ class Config {
$result = @file_put_contents($this->configFilename, $content);
if (!$result) {
$defaults = new \OC_Defaults;
- $url = $defaults->getDocBaseUrl() . '/server/5.0/admin_manual/installation/installation_source.html#set-the-directory-permissions';
+ $url = link_to_docs('admin-dir-permissions');
throw new HintException(
"Can't write into config directory!",
'This can usually be fixed by '
diff --git a/lib/private/setup.php b/lib/private/setup.php
index 6bf3c88370f..3cc1d29c6a4 100644
--- a/lib/private/setup.php
+++ b/lib/private/setup.php
@@ -183,7 +183,7 @@ class OC_Setup {
$error = $l->t('Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.');
$hint = $l->t('Please double check the <a href=\'%s\'>installation guides</a>.',
- 'http://doc.owncloud.org/server/5.0/admin_manual/installation.html');
+ link_to_docs('admin-install'));
OC_Template::printErrorPage($error, $hint);
exit();
diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php
index 0aa2b27b96b..94b87d1e507 100644
--- a/lib/private/template/functions.php
+++ b/lib/private/template/functions.php
@@ -35,6 +35,11 @@ function link_to( $app, $file, $args = array() ) {
return OC_Helper::linkTo( $app, $file, $args );
}
+function link_to_docs($key) {
+ $theme = new OC_Defaults();
+ return $theme->getDocBaseUrl() . '/server/5.0/go.php?to=' . $key;
+}
+
/**
* @brief make OC_Helper::imagePath available as a simple function
* @param string $app app
diff --git a/lib/private/util.php b/lib/private/util.php
index 885cce87541..04b27ee61ae 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -303,16 +303,16 @@ class OC_Util {
//common hint for all file permissions error messages
$permissionsHint = 'Permissions can usually be fixed by '
- .'<a href="' . $defaults->getDocBaseUrl() . '/server/5.0/admin_manual/installation/installation_source.html'
- .'#set-the-directory-permissions" target="_blank">giving the webserver write access to the root directory</a>.';
+ .'<a href="' . link_to_docs('admin-dir_permissions')
+ .'" target="_blank">giving the webserver write access to the root directory</a>.';
// Check if config folder is writable.
if(!is_writable(OC::$SERVERROOT."/config/") or !is_readable(OC::$SERVERROOT."/config/")) {
$errors[] = array(
'error' => "Can't write into config directory",
'hint' => 'This can usually be fixed by '
- .'<a href="' . $defaults->getDocBaseUrl() . '/server/5.0/admin_manual/installation/installation_source.html'
- .'#set-the-directory-permissions" target="_blank">giving the webserver write access to the config directory</a>.'
+ .'<a href="' . link_to_docs('admin-dir_permissions')
+ .'" target="_blank">giving the webserver write access to the config directory</a>.'
);
}
@@ -324,8 +324,8 @@ class OC_Util {
$errors[] = array(
'error' => "Can't write into apps directory",
'hint' => 'This can usually be fixed by '
- .'<a href="' . $defaults->getDocBaseUrl() . '/server/5.0/admin_manual/installation/installation_source.html'
- .'#set-the-directory-permissions" target="_blank">giving the webserver write access to the apps directory</a> '
+ .'<a href="' . link_to_docs('admin-dir_permissions')
+ .'" target="_blank">giving the webserver write access to the apps directory</a> '
.'or disabling the appstore in the config file.'
);
}
@@ -340,8 +340,8 @@ class OC_Util {
$errors[] = array(
'error' => "Can't create data directory (".$CONFIG_DATADIRECTORY.")",
'hint' => 'This can usually be fixed by '
- .'<a href="' . $defaults->getDocBaseUrl() . '/server/5.0/admin_manual/installation/installation_source.html'
- .'#set-the-directory-permissions" target="_blank">giving the webserver write access to the root directory</a>.'
+ .'<a href="' . link_to_docs('admin-dir_permissions')
+ .'" target="_blank">giving the webserver write access to the root directory</a>.'
);
}
} else if(!is_writable($CONFIG_DATADIRECTORY) or !is_readable($CONFIG_DATADIRECTORY)) {