[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.8-34-g75f9482

? sunnavy sunnavy at bestpractical.com
Wed May 12 02:07:05 EDT 2010


The branch, 3.8-trunk has been updated
       via  75f94825d6a798c6d1f0df4055479540ec02dac5 (commit)
       via  58fd241a90b8abb5bd055af7f53f1b93491aabc9 (commit)
      from  6412ba2fd026d5efe568a65cf641b84b7ff3b040 (commit)

Summary of changes:
 share/html/Elements/PageLayout  |    2 ++
 share/html/Elements/SelectOwner |   10 ++++------
 2 files changed, 6 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit 58fd241a90b8abb5bd055af7f53f1b93491aabc9
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed May 12 12:43:11 2010 +0800

    a bit comment to make code clear

diff --git a/share/html/Elements/PageLayout b/share/html/Elements/PageLayout
index 981e58a..27214fb 100755
--- a/share/html/Elements/PageLayout
+++ b/share/html/Elements/PageLayout
@@ -185,6 +185,8 @@ if ( defined $current_toptab ) {
 
 my ($menu_depth, $almost_last, $page_tabs);
 
+# don't pull out the last submenu for 3.5-compat theme
+# see #14853 for details.
 if (RT->Config->Get( 'WebDefaultStylesheet', $session{'CurrentUser'} ) ne '3.4-compat') {
     ($menu_depth, $almost_last) = @{ $m->comp('.menu_recurse', data => $toptabs, current => $current_toptab ) };
 

commit 75f94825d6a798c6d1f0df4055479540ec02dac5
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed May 12 13:58:53 2010 +0800

    make nobody ahead of the sorted list, see #14295

diff --git a/share/html/Elements/SelectOwner b/share/html/Elements/SelectOwner
index 6bdb240..36368b8 100755
--- a/share/html/Elements/SelectOwner
+++ b/share/html/Elements/SelectOwner
@@ -50,7 +50,9 @@
 <option value=""<% !$Default ? qq[ selected="selected"] : '' |n %>><%$DefaultLabel%></option>
 %}
 % $Default = 0 unless defined $Default && $Default =~ /^\d+$/;
-% my @formatednames = sort {lc $a->[1] cmp lc $b->[1]} map {[$_, $m->scomp('/Elements/ShowUser', User => $_)]} @users;
+% my @formatednames = sort {lc $a->[1] cmp lc $b->[1]} map {[$_, $m->scomp('/Elements/ShowUser', User => $_)]} grep { $_->id != $RT::Nobody->id } @users;
+% my $nobody = [$RT::Nobody, $m->scomp('/Elements/ShowUser', User => $RT::Nobody)];
+% unshift @formatednames, $nobody;
 %foreach my $UserRef ( @formatednames)  {
 %my $User = $UserRef->[0];
 <option <% ( $User->Id == $Default) ? qq[ selected="selected"] : '' |n %>
@@ -97,9 +99,6 @@ foreach my $object (@objects) {
         IncludeSuperusers   => $isSU
     );
     while ( my $User = $Users->Next() ) {
-        next
-            if ( $User->id == $RT::Nobody->id )
-            ;    # skip nobody here, so we can make them first later
         $user_uniq_hash{ $User->Id() } = $User;
     }
 }
@@ -108,8 +107,7 @@ if ($Default && $Default != $RT::Nobody->id && !$user_uniq_hash{$Default}) {
     $user_uniq_hash{$Default}->Load($Default);
 }
 
-my @users = sort { uc( $a->Name ) cmp uc( $b->Name ) } values %user_uniq_hash;
-unshift( @users, $RT::Nobody );
+my @users = values %user_uniq_hash;
 
 $m->callback(
     %ARGS,

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


More information about the Rt-commit mailing list