[Rt-commit] r19253 - in rt/3.8/trunk: share/html/Dashboards/Elements/ShowPortlet
sartak at bestpractical.com
sartak at bestpractical.com
Thu Apr 16 21:00:38 EDT 2009
Author: sartak
Date: Thu Apr 16 21:00:38 2009
New Revision: 19253
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/share/html/Dashboards/Elements/ShowPortlet/dashboard
Log:
r82257 at onn: sartak | 2009-04-16 21:00:31 -0400
Load the dashboard from its frozen state
Modified: rt/3.8/trunk/share/html/Dashboards/Elements/ShowPortlet/dashboard
==============================================================================
--- rt/3.8/trunk/share/html/Dashboards/Elements/ShowPortlet/dashboard (original)
+++ rt/3.8/trunk/share/html/Dashboards/Elements/ShowPortlet/dashboard Thu Apr 16 21:00:38 2009
@@ -54,7 +54,17 @@
$Depth => 0
</%args>
<%init>
-my $current_dashboard = $Portlet;
+my $current_dashboard;
+
+use Scalar::Util 'blessed';
+if (blessed($Portlet) && $Portlet->isa('RT::Dashboard')) {
+ $current_dashboard = $Portlet;
+}
+else {
+ $current_dashboard = RT::Dashboard->new($session{CurrentUser});
+ $current_dashboard->LoadById($Portlet->{id});
+}
+
my @panes = @{ $current_dashboard->Panes->{$Pane} || [] };
Abort("Possible recursive dashboard detected.") if $Depth > 8;
More information about the Rt-commit
mailing list