ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: gevv on November 20, 2015, 11:32:08 am

Title: Warning level setting bug
Post by: gevv on November 20, 2015, 11:32:08 am
Hi,

My forum I was a little confused  User Issue a Warning   level unknown  110 vaule

Go  Administration Center Core Features enable Post Moderation  and  set  Security and Moderation /  set moderation   vule

(http://s18.postimg.org/fbkq58bb9/admin.jpg) (http://postimg.org/image/fbkq58bb9/)   (http://s11.postimg.org/s5aey8g33/user.jpg) (http://postimg.org/image/s5aey8g33/)



test


new installed elkarte


Core Features enable Warning System


go ""user    Issue a Warning ""  page

Level >= 35: All users posts will be moderated  (Post Moderation is not enable ?)

Core Features enable Post Moderation

""user    Issue a Warning ""  page

Level >= 110: All users posts will be moderated


Security and Moderation / Moderation

Warning level for post moderation  value: 0
Title: Re: Warning level setting bug
Post by: emanuele on November 29, 2015, 07:57:03 am
Darn, I left this one open on the "other" computer and missed that as well!
/me is mad at himself >:(
Sorry for the late reply! :-[

Anyway, the issue is "just" that 110 is used when the option is not enabled (in that case post-moderation) to be sure it's not caught up by the warning system.

A possible fix is to replace in ProfileAccount.controller.php the block:
		// Work our the various levels.
$context['level_effects'] = array(
0 => $txt['profile_warning_effect_none'],
$modSettings['warning_watch'] => $txt['profile_warning_effect_watch'],
$modSettings['warning_moderate'] => $txt['profile_warning_effect_moderation'],
$modSettings['warning_mute'] => $txt['profile_warning_effect_mute'],
);
with:
Code: [Select]
		// Work our the various levels.
$context['level_effects'] = array(
0 => $txt['profile_warning_effect_none'],
);

foreach (array('watch', 'moderate', 'mute') as $status)
{
if ($modSettings['warning_' . $status] != 110)
{
$context['level_effects'][$modSettings['warning_' . $status]] = $txt['profile_warning_effect_' . $status];
}
}

Being a bug I'll move it to the appropriate board. ;)
Title: Re: Warning level setting bug
Post by: emanuele on December 09, 2015, 04:19:41 pm
https://github.com/emanuele45/Dialogo/commit/bdfb3c6f9f44d5207411117ad3dfe18aa615da87
Title: Re: Warning level setting bug
Post by: Flavio93Zena on December 18, 2015, 01:59:33 am
Ugh, being there couldn't you fix the typo in the comment, too? "Work our" doesn't exist in English, "work out" can actually work out, lol.