[vhffs-dev] [1527] Fixed "On object" column in "Tag Requests" list |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 1527
Author: xavier
Date: 2009-12-12 00:43:13 +0100 (Sat, 12 Dec 2009)
Log Message:
-----------
Fixed "On object" column in "Tag Requests" list
Fixed "Requester" and "Tagged object" fields in "Tag request details" page
Modified Paths:
--------------
trunk/vhffs-panel/admin/tag/request/details.pl
trunk/vhffs-panel/admin/tag/request/list.pl
Modified: trunk/vhffs-panel/admin/tag/request/details.pl
===================================================================
--- trunk/vhffs-panel/admin/tag/request/details.pl 2009-11-22 13:49:36 UTC (rev 1526)
+++ trunk/vhffs-panel/admin/tag/request/details.pl 2009-12-11 23:43:13 UTC (rev 1527)
@@ -103,9 +103,15 @@
my $dt = DateTime->from_epoch( epoch => $request->{created}, locale => $user->get_lang);
+my $tag_requester = $request->get_requester;
+my $requester_param = defined($tag_requester) ? $tag_requester->get_username : gettext('DELETED');
+
+my $tagged_object = $request->get_tagged;
+my $tagged_param = defined($tagged_object) ? $tagged_object->get_label : gettext('DELETED');
+
$template->param('REQUEST_ID' => $request->{request_id});
-$template->param('REQUESTER' => $request->get_requester->get_username);
-$template->param('TAGGED' => $request->get_tagged->get_label);
+$template->param('REQUESTER' => $requester_param);
+$template->param('TAGGED' => $tagged_param);
$template->param('CREATED' => $dt->strftime($loc->medium_date_format().' '.$loc->long_time_format()));
$template->param('CATEGORIES' => Vhffs::Tag::Category::get_all($vhffs));
Modified: trunk/vhffs-panel/admin/tag/request/list.pl
===================================================================
--- trunk/vhffs-panel/admin/tag/request/list.pl 2009-11-22 13:49:36 UTC (rev 1526)
+++ trunk/vhffs-panel/admin/tag/request/list.pl 2009-12-11 23:43:13 UTC (rev 1527)
@@ -70,7 +70,7 @@
$r->{user} = gettext('DELETED');
}
- if(defined $r->{object}) {
+ if(defined $r->get_tagged) {
$r->{object} = $r->get_tagged->get_label;
} else {
$r->{object} = gettext('DELETED');