Needs review
Project:
OG User Roles
Version:
6.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Dec 2011 at 19:45 UTC
Updated:
30 Dec 2011 at 22:53 UTC
Jump to comment: Most recent file
Comments
Comment #1
greg.1.anderson commentedWhoops, wrong patch above. Correct one attached.
Comment #2
greg.1.anderson commentedHere is a new patch with one correction and one improvement to the previous one.
Correction: It is necessary to transliterate dashes to underscores in the content type -- "project-project" must become "project_project" before being passed to og_is_group_type or og_is_group_post_type.
Improvement: Somehow I thought that arg(n) would not be available yet, but it is; this patch removes the preg_replace in favor of the old strpos test, and uses arg(2) to pull the content type from the path.