Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: live627 on November 25th, 2012, 01:00 AM

Title: Moderation filters "function" param wroong
Post by: live627 on November 25th, 2012, 01:00 AM
Index: I:/repos/arantor_wedge/trunk/Themes/default/ManageModeration.template.php
===================================================================
@@ -117,7 +117,7 @@
                   break;
                default:
                   if (!empty($rules['function']))
-                     $print_criteria[] = $rules['function']($criteria);
+                     $print_criteria[] = $criteria['function']($criteria);
                   else
                      $print_criteria[] = $txt['modfilter_cond_unknownrule'] . ' ' . $criteria['name'];
             }

Posted: November 25th, 2012, 12:58 AM

http://wedge.org/pub/plugins/7711/maximum-images-per-post/msg283603/#msg283603
Title: Re: Moderation filters "function" param wroong
Post by: Arantor on November 25th, 2012, 01:25 AM
And that doesn't affect any existing rules? (It's been months since I looked at that code)
Title: Re: Moderation filters "function" param wroong
Post by: live627 on November 25th, 2012, 01:40 AM
No. They are all inside a switch statement, all the built in rules are defined in cases, and none use that specific parameter.

The only occurrence of the param I'm seeing is in the default block.
Title: Re: Moderation filters "function" param wroong
Post by: Arantor on November 25th, 2012, 01:47 AM
Awesome, so in that case we can fix that readily enough. :)
Title: Re: Moderation filters "function" param wroong
Post by: Arantor on November 26th, 2012, 01:00 AM
Any chance you can provide your plugin so I can test this, please?

Thing is, surely the if would have to be updated as well?
Title: Re: Moderation filters "function" param wroong
Post by: live627 on November 26th, 2012, 05:35 AM
It's at http://wedge.org/do/media/?sa=item;in=125
Title: Re: Moderation filters "function" param wroong
Post by: Arantor on November 26th, 2012, 05:59 AM
Awesome, thanks. I'll look at it first thing in the morning.
Title: Re: Moderation filters "function" param wroong
Post by: Arantor on November 26th, 2012, 03:08 PM
Yup, it should definitely be $critieria in both the call and the if before-hand. I'll commit it once I have some other stuff to commit, but need to head out now.
Title: Re: Moderation filters "function" param wroong
Post by: Arantor on November 27th, 2012, 04:25 AM
r1783 fixed this one.