Closed (fixed)
Project:
Conference Organizing Distribution Support Modules
Version:
7.x-1.x-dev
Component:
cod_session
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
5 Jul 2012 at 20:51 UTC
Updated:
1 May 2013 at 10:56 UTC
Jump to comment: Most recent file
Comments
Comment #1
primerg commentedPlease check the patch for this. Removed old hook function cod_session_link_alter() and used the cod_session_node_view_alter for d7
Comment #2
ezra-g commentedThanks for the patch! On a quick visual inspection of the patch:
We should be using user_is_anonymous() rather than working with the global $user object.
Also, please make sure that you follow general coding standards conventions such as FALSE instead of false.
Comment #3
primerg commentedthanks for the quick review! resubmitting patch
Comment #4
saltednutPatch applied cleanly. Was able to assign a session to user and noted that only THAT user was able to use the flag. Looks RTBC to me.
Comment #5
twardnw commentedSame here, patch applied clean, only speaker was able to set that flag.
Comment #6
primerg commentedPlease try again. while using this patch, noticed error "Undefined index: field_accepted in cod_session_node_view_alter()" error in the homepage. Also used unset instead of just leaving the title blank. This make sures there is no html printed if the flag is not present.
Comment #7
dsdeiz commentedWorks here as well.
It created a conflict on my end after applying the patch from #1668908: Replace User reference, Nodereference with References, Vertical session schedule view though.Heh, my bad. Didn't know references module has node_reference and user_reference modules.field_speakersbecamefield_session_speakersand I changed$speaker['uid]to$speaker['target_id'].Comment #8
mjonesdinero commentedpatch also looks clean and it works for me.. also follow what on comment #7 said...
Comment #9
sheldonkreger commentedTagging.
Comment #10
ezra-g commentedFollowing #1585752: Clearly indicate when a session has been declined, this causes a fatal error because we have 2 definitions of cod_session_node_view_alter().
As a general rule, it's also good to avoid working with the global $user object and to instead set an $account variable, to avoid changing the currently logged in user.
Comment #11
primerg commentedchanges applied. also used the $account instead of the $user (not sure if that was the ideal way)
Comment #12
primerg commentedchanging status
Comment #13
twardnw commentedpatch applies clean, functions as advertised
Comment #14
dsdeiz commentedWorks on my end as well.
Comment #15
mjonesdinero commentedWork on my end also.. patch applies cleanly
Comment #16
ezra-g commentedIn a functional test, this doesn't enforce that the session is actually scheduled - only accepted.
Also:
if ($speaker['uid'] == $account->uid) $presenter = TRUE;Please follow the Drupal coding standards conventions for control statements (referenced above).
Comment #17
ezra-g commentedI'm working to re-roll this.
Comment #18
ezra-g commentedThis patch:
- Corrects the functional & coding standards issues noted above
- Adds code comments to cod_session_node_view_alter().
- Defines new helper functions to determine whether a session is accepted, declined, whether a user is a speaker on a session.
Comment #19
ezra-g commentedNow with 100% less dpm ;).
Comment #20
japerryLooks good, added the node:title token to the confirmation message because 'title' only doesn't work in d7 anymore.
Comment #21
ezra-g commentedCommitted - Thanks!
http://drupalcode.org/project/cod_support.git/commit/3a1dab4