[Rt-commit] rt branch, 4.4/move-user-prefs-page-to-prefs-aboutme, created. rt-4.2.0-31-g037d02c

? sunnavy sunnavy at bestpractical.com
Thu Dec 5 09:58:23 EST 2013


The branch, 4.4/move-user-prefs-page-to-prefs-aboutme has been created
        at  037d02cbe258581d067672d35a4c961065ecdd16 (commit)

- Log -----------------------------------------------------------------
commit a7aba60f9103f9d46bddfce5876cfe2f3b35b061
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sun May 5 12:58:25 2013 +0800

    move /User/Prefs.html to /Prefs/AboutMe.html for consistency, see also #14200

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 555edd2..467231f 100644
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -551,7 +551,7 @@ my $build_main_nav = sub {
          && $session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => RT->System )) {
         my $settings = $about_me->child( settings => title => loc('Settings'), path => '/Prefs/Other.html' );
         $settings->child( options        => title => loc('Preferences'),        path => '/Prefs/Other.html' );
-        $settings->child( about_me       => title => loc('About me'),       path => '/User/Prefs.html' );
+        $settings->child( about_me       => title => loc('About me'),       path => '/Prefs/AboutMe.html' );
         $settings->child( search_options => title => loc('Search options'), path => '/Prefs/SearchOptions.html' );
         $settings->child( myrt           => title => loc('RT at a glance'), path => '/Prefs/MyRT.html' );
         $settings->child( dashboards_in_menu =>
diff --git a/share/html/User/Prefs.html b/share/html/Prefs/AboutMe.html
similarity index 99%
rename from share/html/User/Prefs.html
rename to share/html/Prefs/AboutMe.html
index e7b3c9a..15a805d 100644
--- a/share/html/User/Prefs.html
+++ b/share/html/Prefs/AboutMe.html
@@ -50,7 +50,7 @@
 
 <& /Elements/ListActions, actions => \@results &>
 
-<form action="<%RT->Config->Get('WebPath')%>/User/Prefs.html" method="post">
+<form action="<%RT->Config->Get('WebPath')%>/Prefs/AboutMe.html" method="post">
 <input type="hidden" class="hidden" name="id" value="<%$UserObj->Id%>" />
 
 <table width="100%" border="0">

commit 037d02cbe258581d067672d35a4c961065ecdd16
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sun May 5 13:26:37 2013 +0800

    redirect old /User/Prefs.html and deprecate it

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 2d5b5d4..421697e 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -659,6 +659,15 @@ sub ShowRequestedPage {
     # precache all system level rights for the current user
     $HTML::Mason::Commands::session{CurrentUser}->PrincipalObj->HasRights( Object => RT->System );
 
+    if ( $HTML::Mason::Commands::r->path_info =~ m{^(/+)User/Prefs.html} ) {
+        RT->Deprecated(
+            Message => '/User/Prefs.html is deprecated',
+            Instead => "/Prefs/AboutMe.html",
+            Stack   => 0,
+        );
+        RT::Interface::Web::Redirect( RT->Config->Get('WebURL') . 'Prefs/AboutMe.html' );
+    }
+
     # If the user isn't privileged, they can only see SelfService
     unless ( $HTML::Mason::Commands::session{'CurrentUser'}->Privileged ) {
 

-----------------------------------------------------------------------


More information about the rt-commit mailing list