Menu

#4075 Wrong error message for Meta-moderation when no comments

open
5
2008-03-31
2008-03-31
No

Slashcode gives a misleading and wrong message when users try to metamod and there is no comments to metamoderate.

The message given is "The moderation system for [sitename] is currently down." while it is not down, it's just there's no comment to metamoderate.

Thanks :-)

- - - -
Here are the details, from an email of my slash admin:
Macintosh-2:Metamod shane$ grep "currently down" * -r
templates/data;metamod;default: <p>The moderation system for [% constants.sitename %] is currently down.</p>
Macintosh-2:Metamod shane$ foo templates/data\;metamod\;default

[% CASE 'no_moderation' %]
[% returnme.data_constant = 1 %]
<p>The moderation system for [% constants.sitename %] is currently down.</p>

Macintosh-2:Metamod shane$ grep 'no_moderation' * -r
Metamod.pm: $mod_hr->{no_moderation} = 1;
metamod.pl: print getData('no_moderation');
templates/data;metamod;default:[% CASE 'no_moderation' %]
Macintosh-2:Metamod shane$ foo metamod.pl Metamod.pm

and the code does this:

if (!$constants->{m1}) {
print getData('no_moderation');

so we check the vars:

mysql> select * from vars where name='m1';
+------+-------+-------------------------------------+
| name | value | description |
+------+-------+-------------------------------------+
| m1 | 1 | allows use of the moderation system |
+------+-------+-------------------------------------+
1 row in set (0.01 sec)

[...]

I don't see any user-moderations, only moderations by sysadmins. Which aren't meta-moderatable I believe.

So, I think your system is working correctly, but instead of saying "sorry, there are no moderations that need to be metamoderated at this time" instead it's giving a rather non-helpful "sorry it's down" message.

Discussion


Log in to post a comment.