[Rt-commit] r12036 - in rt/branches/3.8-TESTING: . html/Prefs/Dashboards html/Prefs/Dashboards/Elements

sartak at bestpractical.com sartak at bestpractical.com
Fri May 2 20:30:54 EDT 2008


Author: sartak
Date: Fri May  2 20:30:51 2008
New Revision: 12036

Modified:
   rt/branches/3.8-TESTING/   (props changed)
   rt/branches/3.8-TESTING/html/Prefs/Dashboards/Elements/DashboardTabs
   rt/branches/3.8-TESTING/html/Prefs/Dashboards/Modify.html
   rt/branches/3.8-TESTING/lib/RT/Dashboard.pm

Log:
 r54847 at Macintosh:  sartak | 2008-05-02 20:30:28 -0400
 Some minor fixes


Modified: rt/branches/3.8-TESTING/html/Prefs/Dashboards/Elements/DashboardTabs
==============================================================================
--- rt/branches/3.8-TESTING/html/Prefs/Dashboards/Elements/DashboardTabs	(original)
+++ rt/branches/3.8-TESTING/html/Prefs/Dashboards/Elements/DashboardTabs	Fri May  2 20:30:51 2008
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <& /User/Elements/Tabs,
     subtabs => $tabs,
-    current_tab => 'Prefs/Dashboards',
+    current_tab => 'Prefs/Dashboards/index.html',
     current_subtab => $current_subtab,
     Title => $Title &>
 

Modified: rt/branches/3.8-TESTING/html/Prefs/Dashboards/Modify.html
==============================================================================
--- rt/branches/3.8-TESTING/html/Prefs/Dashboards/Modify.html	(original)
+++ rt/branches/3.8-TESTING/html/Prefs/Dashboards/Modify.html	Fri May  2 20:30:51 2008
@@ -82,14 +82,16 @@
 
 use RT::Dashboard;
 
-my @privacies = RT::Dashboard->new($session{'CurrentUser'})->_PrivacyObjects;
-
 my $Dashboard = RT::Dashboard->new($session{'CurrentUser'});
+my @privacies = $Dashboard->_PrivacyObjects;
+
+# user went directly to Modify.html
+$Create = 1 if !$id;
 
 if ($Create) {
     $current_subtab = 'Prefs/Dashboards/Modify.html?Create=1';
     $title = loc("Create a new dashboard");
-} 
+}
 else {
     if ($id eq 'new') {
         my ($val, $msg);
@@ -133,7 +135,7 @@
     my ($ok, $msg);
     if ($session{'CurrentUser'}->HasRight(Right => 'ModifyDashboard', Object => $RT::System)) {
         ($ok, $msg) = $Dashboard->Update(Privacy  => $ARGS{'Privacy'},
-                                      Name     => $ARGS{'Name'});
+                                         Name     => $ARGS{'Name'});
     }
     else {
         $msg = "No permission to update dashboards";

Modified: rt/branches/3.8-TESTING/lib/RT/Dashboard.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Dashboard.pm	(original)
+++ rt/branches/3.8-TESTING/lib/RT/Dashboard.pm	Fri May  2 20:30:51 2008
@@ -204,7 +204,7 @@
     my $self = shift;
     my $privacy = shift;
 
-    my ($obj_type, $obj_id) = split(/\-/, $privacy);
+    my ($obj_type, $obj_id) = split(/\-/, ($privacy || ''));
     if (!defined $obj_id) {
         $RT::Logger->warning("Invalid privacy string \"$privacy\" passed to _GetObject");
         return undef;


More information about the Rt-commit mailing list