Needs review
Project:
Restricted content
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Dec 2010 at 22:24 UTC
Updated:
5 Apr 2011 at 01:29 UTC
Jump to comment: Most recent file
Comments
Comment #1
JuliaKM commentedHere's the patch for your review.
Comment #2
JuliaKM commentedOn second thought, don't apply the patch. The menu function adds the restricted-content class to non-restricted nodes and seems to be rather impossible to easily remove. Working on a fix.
Comment #3
JuliaKM commentedHere's an updated patch with a couple more improvements and a fix for #2:
- added a new type of message so the three types of messages are now: a message when the user has special access to the content, a message when the user is anonymous, a message when the user is authenticated but does not have access to the content
- added tokens for all three messages.
Comment #4
JuliaKM commentedThought I'd try out creating a patch in git. Here's a new version of the patch created with git format-patch.
Comment #5
JuliaKM commentedComment #6
aliciatheduff commentedTried this patch out, when I hit pages I don't have access to I get this warning:
warning: Missing argument 3 for theme_display_restriction() in /Applications/MAMP/htdocs/teachers/sites/all/modules/restricted_content/restricted_content.module on line 382.
Hope that helps.
Comment #7
JuliaKM commentedComment #8
JuliaKM commentedThanks aliciatheduff for testing the patch! Here's a new version. When I ran it locally, the php warning did not appear. The small change I made was to go from:
function theme_display_restriction($message, $status, $content) {to:
function theme_display_restriction($message, $status, $content = NULL) {I should note that this patch also applies the fix for inserting a nid of 0 into the database found in #826350: Inserting "nid = 0" into db during node add
Comment #9
mattcasey commentedtested the patch in #8, git returned some 'trailing whitespace' errors on line 97,105,109,118, and 119, but I was able to use the Views boolean filter.