Migrate LJ::get_cap calls to LJ::User->can_do_stuffs methods.
Patch by denise.
diffs (17 lines):
diff -r b9391575ec2f -r c99e78edd140 cgi-bin/DW/Hooks/EntryForm.pm
--- a/cgi-bin/DW/Hooks/EntryForm.pm Tue Nov 10 03:07:33 2009 +0000
+++ b/cgi-bin/DW/Hooks/EntryForm.pm Tue Nov 10 04:18:19 2009 +0000
@@ -29,10 +29,11 @@ LJ::register_hook( 'entryforminfo', sub
};
my $usejournal = $journal ? "?usejournal=$journal" : "";
+ my $ju = LJ::load_user( $journal ) if $journal;
my $can_make_poll = 0;
- $can_make_poll = LJ::get_cap( $remote, "makepoll" ) if $remote;
- $can_make_poll ||= LJ::get_cap( LJ::load_user( $journal ), "makepoll" ) if
$journal;
+ $can_make_poll = $remote->can_create_polls if $remote;
+ $can_make_poll ||= $ju->can_create_polls if $ju;
return $make_list->(
# URL, link text, whether to show or not
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog