Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix metamod bug

  • Loading branch information...
commit 5120bc7ab0ef5c8ddf5b114de149883805280542 1 parent bbde248
Chris Nandor pudge authored
4 plugins/Metamod/Metamod.pm
View
@@ -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();
@@ -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;
}
4 sql/mysql/upgrades
View
@@ -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
@@ -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  themes/slashcode/htdocs/comments.pl
View
@@ -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 });
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.