]> source.dussan.org Git - nextcloud-server.git/commitdiff
introduce link_to_docs() and migrate links
authorThomas Müller <thomas.mueller@tmit.eu>
Mon, 21 Oct 2013 19:29:45 +0000 (21:29 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Mon, 21 Oct 2013 19:29:45 +0000 (21:29 +0200)
apps/user_ldap/templates/settings.php
core/templates/installation.php
lib/base.php
lib/private/config.php
lib/private/setup.php
lib/private/template/functions.php
lib/private/util.php
settings/templates/admin.php
settings/templates/personal.php

index 319dc38a62d937decbd86b0a96be2bd2cf8ad7ef..2530d9c04c72e71826091b8a12b17f6d2ced0ae1 100644 (file)
                <p class="ldapIndent"><?php p($l->t('Usernames are used to store and assign (meta) data. In order to precisely identify and recognize users, each LDAP user will have a internal username. This requires a mapping from username to LDAP user. The created username is mapped to the UUID of the LDAP user. Additionally the DN is cached as well to reduce LDAP interaction, but it is not used for identification. If the DN changes, the changes will be found. The internal username is used all over. Clearing the mappings will have leftovers everywhere. Clearing the mappings is not configuration sensitive, it affects all LDAP configurations! Never clear the mappings in a production environment, only in a testing or experimental stage.'));?></p>
                <p class="ldapIndent"><button id="ldap_action_clear_user_mappings" name="ldap_action_clear_user_mappings"><?php p($l->t('Clear Username-LDAP User Mapping'));?></button><br/><button id="ldap_action_clear_group_mappings" name="ldap_action_clear_group_mappings"><?php p($l->t('Clear Groupname-LDAP Group Mapping'));?></button></p>
        </fieldset>
-       <input id="ldap_submit" type="submit" value="Save" /> <button id="ldap_action_test_connection" name="ldap_action_test_connection"><?php p($l->t('Test Configuration'));?></button> <a href="<?php p($theme->getDocBaseUrl()); ?>/server/5.0/admin_manual/auth_ldap.html" target="_blank"><img src="<?php print_unescaped(OCP\Util::imagePath('', 'actions/info.png')); ?>" style="height:1.75ex" /> <?php p($l->t('Help'));?></a>
+       <input id="ldap_submit" type="submit" value="Save" /> <button id="ldap_action_test_connection" name="ldap_action_test_connection"><?php p($l->t('Test Configuration'));?></button> <a href="<?php print_unescaped(link_to_docs('admin-ldap')); ?>" target="_blank"><img src="<?php print_unescaped(OCP\Util::imagePath('', 'actions/info.png')); ?>" style="height:1.75ex" /> <?php p($l->t('Help'));?></a>
        </div>
 
 </form>
index a6f55cb0e288ec173a7f40bb11f75d3fbe85d407..3457a3c9a992e68c2661db2bbe8e325c34c7a335 100644 (file)
@@ -39,7 +39,7 @@
                <p><?php p($l->t('Your data directory and files are probably accessible from the internet because the .htaccess file does not work.'));?><br>
                <?php print_unescaped($l->t(
                        'For information how to properly configure your server, please see the <a href="%s" target="_blank">documentation</a>.',
-                       $theme->getDocBaseUrl().'/server/5.0/admin_manual/installation.html'
+                       link_to_docs('admin-install')
                )); ?></p>
        </fieldset>
        <?php endif; ?>
index ee925b8f736d53ad2d46d2259a81c848f8dff8ad..ef574b2d89525714ac15c28ebb30b7b884b6c2e8 100644 (file)
@@ -181,7 +181,7 @@ class OC {
                        OC_Template::printErrorPage(
                                "Can't write into config directory!",
                                '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>.'
                        );
                }
        }
index 72423137fa331bbbb834175b7cba58d171fc6fff..c28669f56a3692913e4805a8ea485a99adb0005b 100644 (file)
@@ -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 '
index 6bf3c88370f653d4067b59e833e8938e073d7b19..3cc1d29c6a4056949d225f8a283f22125bfbce42 100644 (file)
@@ -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();
index 0aa2b27b96be5dde13d6663dd4d1b8a26d0e5e4d..94b87d1e507c95f24194809ab57cd69e21652a32 100644 (file)
@@ -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
index 885cce87541b60b9f4becc06bd63ea972c95bee8..04b27ee61ae9938e502a36098c6c0e8497195a48 100755 (executable)
@@ -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)) {
index a2c877340eee516df9ccd1c0a73b789691bea912..a5724bf3b174e43c19923425a7195ddaaf89c0b2 100644 (file)
@@ -30,7 +30,7 @@ if (!$_['isWebDavWorking']) {
 
        <span class="securitywarning">
                <?php p($l->t('Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.')); ?>
-               <?php print_unescaped($l->t('Please double check the <a href="%s">installation guides</a>.', $theme->getDocBaseUrl().'/server/5.0/admin_manual/installation.html')); ?>
+               <?php print_unescaped($l->t('Please double check the <a href="%s">installation guides</a>.', link_to_docs('admin-install'))); ?>
        </span>
 
 </fieldset>
index 60c509b4a1cab2de8beee9ab463c973d3816257e..6c758e659a83b86afedf58829ef840e0d46ebca7 100644 (file)
@@ -132,7 +132,7 @@ if($_['passwordChangeSupported']) {
 <fieldset class="personalblock">
        <h2><?php p($l->t('WebDAV'));?></h2>
        <code><?php print_unescaped(OC_Helper::linkToRemote('webdav')); ?></code><br />
-       <em><?php print_unescaped($l->t('Use this address to <a href="%s/server/5.0/user_manual/files/files.html" target="_blank">access your Files via WebDAV</a>', array($theme->getDocBaseUrl())));?></em>
+       <em><?php print_unescaped($l->t('Use this address to <a href="%s" target="_blank">access your Files via WebDAV</a>', array(link_to_docs('user-webdav'))));?></em>
 </fieldset>
 
 <?php foreach($_['forms'] as $form) {