Skip to content

Commit

Permalink
fix metamod bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pudge committed Sep 22, 2006
1 parent bbde248 commit 5120bc7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions plugins/Metamod/Metamod.pm
Expand Up @@ -42,7 +42,7 @@ sub new {
# no real other way to do it, I'm putting it here anyway.

sub metaModerate {
my($self) = @_;
my($self, $is_admin) = @_;
my $constants = getCurrentStatic();
my $user = getCurrentUser();
my $form = getCurrentForm();
Expand All @@ -61,7 +61,7 @@ sub metaModerate {
next unless $key =~ /^mm(\d+)$/;
my $mmid = $1;
# Only the user's given mods can be used.
next unless $m2_mods_saved{$mmid};
next unless $m2_mods_saved{$mmid} || $is_admin;
# This one's valid. Store its data in %m2s.
$m2s{$mmid}{is_fair} = ($form->{$key} eq '+') ? 1 : 0;
}
Expand Down
4 changes: 2 additions & 2 deletions sql/mysql/upgrades
Expand Up @@ -4075,8 +4075,6 @@ INSERT INTO ajax_ops VALUES (NULL, 'firehose_get_updates', 'Slash::FireHose', 'a
# 2006-09-12
UPDATE vars SET value = 'T_2_5_0_126' WHERE name = 'cvs_tag_currentcode';

# SLASHCODE/USEPERL LAST UPDATED HERE

# SLASHDOT LAST UPDATED HERE

# Updates for plugins/Tags
Expand All @@ -4085,3 +4083,5 @@ ALTER TABLE tags ADD COLUMN private enum('yes', 'no') NOT NULL DEFAULT 'no';
# 2006-09-19
UPDATE vars SET value = 'T_2_5_0_127' WHERE name = 'cvs_tag_currentcode';

# SLASHCODE/USEPERL LAST UPDATED HERE

2 changes: 1 addition & 1 deletion themes/slashcode/htdocs/comments.pl
Expand Up @@ -1448,7 +1448,7 @@ sub metamod_if_necessary {
if ($constants->{m2} && $user->{is_admin}) {
my $metamod_db = getObject('Slash::Metamod');
my $n_perf = 0;
if ($n_perf = $metamod_db->metaModerate()) {
if ($n_perf = $metamod_db->metaModerate($user->{is_admin})) {
$retstr = getData('metamods_performed', { num => $n_perf });
}
}
Expand Down

0 comments on commit 5120bc7

Please sign in to comment.