Hi,
when no events exist for a given group, loading up the group calendar results in the following message being displayed:
No (visible) events for Patrick Donohue were found!
Where Patrick Donohue is the name of the group author/manager.
I believe the desired functionality would be
No (visible) events for the General group were found!
Where General is the title of the group.
This can be changed in function og_calendar_page by calling $group->title instead of $group->name
Original
if (count($nodes)) {
og_set_group_context($group);
return event_get_calendar('month', $nodes, 'og_calendar', t('%name calenda
r', array('%name' => $group->title)));
}
else {
return t('No (visible) events for %name were found!', array('%name' => $gr
oup->name));
}
Updated
if (count($nodes)) {
og_set_group_context($group);
return event_get_calendar('month', $nodes, 'og_calendar', t('%name calenda
r', array('%name' => $group->title)));
}
else {
return t('No (visible) events for the %name group were found!', array('%na
me' => $group->title));
}
A bit of a nitpick I admit, but I found it when I used your code as the basis for another module (an og_fileshare module that adds a link to a group fileshare in the group details menu) and thought I would share.
Thanks for providing easy to understand code that does a lot!
Patrick
p.s. I've attached a patch file, but as I don't use CVS I don't know if it conforms to drupal standards.
| Comment | File | Size | Author |
|---|---|---|---|
| og_calendar.module.patch | 582 bytes | pcdonohue |
Comments
Comment #1
webchickOops! Nice catch. And I agree that saying "the X group" makes that a little clearer.
Fixed in 4.7 and HEAD. :)
Comment #2
(not verified) commented