Posted by mikestefff on May 19, 2011 at 6:58pm
3 followers
| Project: | Organic Group Statistics |
| Version: | 6.x-1.0-rc5 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
I'm having a very hard time understanding the logic behind determining an unapproved member in hook_og().
// If not a moderated group, update the membership count,
// or if it is a moderated group and unapproved users are to be counted,
// then update the statistics.
if ($node->og_selective != 1 || ($node->og_selective == 1 && variable_get('og_statistics_include_unapproved_members', TRUE))) {Well first, the constant OG_MODERATED should be used instead of the value 1.
And the group selective setting is irrelevant when it comes to determining if a user is approved or not. In order to do that, you check the $args for $args['is_active'] == 1.
Patch coming
Comments
#1
Patch
#2
The last submitted patch, og_statistics-proper-determination-of-unapproved-1162928.patch, failed testing.
#3
Repatched against what's in git right now.. should work..
#4
#5
The last submitted patch, og_statistics-proper-determination-of-unapproved-1162928.patch, failed testing.
#6
Jeez..what am I missing?
#7
13:03:07] Command [git apply -p1 --check /var/lib/drupaltestbot/sites/default/files/review/og_statistics-proper-determination-of-unapproved-1162928_0.patch 2>&1] failedDuration 0 seconds
Directory [/var/lib/drupaltestbot/sites/default/files/checkout/sites/default/modules/og_statistics]
Status [1]
Output: [error: patch failed: og_statistics.module:168
error: og_statistics.module: patch does not apply].
[13:03:07] Command [git apply -p0 --check /var/lib/drupaltestbot/sites/default/files/review/og_statistics-proper-determination-of-unapproved-1162928_0.patch 2>&1] failed
Duration 0 seconds
Directory [/var/lib/drupaltestbot/sites/default/files/checkout/sites/default/modules/og_statistics]
Status [1]
Output: [error: a/og_statistics.module: No such file or directory].
[13:03:07] Encountered error on [apply], details:
array (
Both command's does not work.
Are you sure that the patch applies against the dev version?