From 62e4c0959bf03c2e97cbb5bd61c1edb668a00859 Mon Sep 17 00:00:00 2001 From: mjollnir_ Date: Mon, 29 Aug 2005 02:34:17 +0000 Subject: [PATCH] New config setting for /my redirect and breadcrumb replacement rather than always doing it --- admin/configvars.php | 3 ++- lang/en/admin.php | 1 + lib/weblib.php | 2 +- login/index.php | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/admin/configvars.php b/admin/configvars.php index b41ad3ea699..1de287beaf6 100644 --- a/admin/configvars.php +++ b/admin/configvars.php @@ -85,7 +85,8 @@ class configvarrss extends configvar { choose_from_menu ($noyesoptions, 'enablerssfeeds', $config->enablerssfeeds, '', '', '', true), ' You need to add XML support to your PHP installation.' ); - + $misc['mymoodleredirect'] = new configvar (get_string('configmymoodleredirect','admin'), + choose_from_menu($noyesoptions,'mymoodleredirect',$config->mymoodleredirect,'','','',true)); //////////////////////////////////////////////////////////////////// diff --git a/lang/en/admin.php b/lang/en/admin.php index 3301705932d..917a83b733e 100755 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -64,6 +64,7 @@ $string['configlongtimenosee'] = 'If students haven\'t logged in for a very long $string['configmaxbytes'] = 'This specifies a maximum size that uploaded files can be throughout the whole site. This setting is limited by the PHP setting upload_max_filesize and the Apache setting LimitRequestBody. In turn, maxbytes limits the range of sizes that can be chosen at course level or module level.'; $string['configmaxeditingtime'] = 'This specifies the amount of time people have to re-edit forum postings, glossary comments etc. Usually 30 minutes is a good value.'; $string['configmessaging'] = 'Should the messaging system between site users be enabled?'; +$string['configmymoodleredirect'] = 'This setting forces redirects to /my on login for non-admins and replaces the top level site breadcrumb with /my'; $string['confignoreplyaddress'] = 'Emails are sometimes sent out on behalf of a user (eg forum posts). The email address you specify here will be used as the \"From\" address in those cases when the recipients should not be able to reply directly to the user (eg when a user chooses to keep their address private).'; $string['confignotifyloginfailures'] = 'If login failures have been recorded, email notifications can be sent out. Who should see these notifications?'; $string['confignotifyloginthreshold'] = 'If notifications about failed logins are active, how many failed login attempts by one user or one IP address is it worth notifying about?'; diff --git a/lib/weblib.php b/lib/weblib.php index 4347383955e..e268baa82df 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2253,7 +2253,7 @@ function print_navigation ($navigation) { $site->shortname = get_string('home'); } $navigation = str_replace('->', '»', $navigation); - echo ''. $site->shortname .' » '. $navigation; + echo ''. $site->shortname .' » '. $navigation; } } diff --git a/login/index.php b/login/index.php index c36a0a0d37b..1adfedbcd1c 100644 --- a/login/index.php +++ b/login/index.php @@ -149,8 +149,8 @@ } else { $urltogo = $CFG->wwwroot.'/my'; /// Go to the standard home page - if (isadmin()) { - $urltogo = $CFG->wwwroot; /// not needed by admins. + if (isadmin() || empty($CFG->mymoodleredirect)) { + $urltogo = $CFG->wwwroot; /// not needed by admins or when it's turned off } unset($SESSION->wantsurl); /// Just in case }