| @@ 167-171 (lines=5) @@ | ||
| 164 | $context['allow_calendar_event'] = allowedTo('calendar_post'); |
|
| 165 | ||
| 166 | // If you don't allow events not linked to posts and you're not an admin, we have more work to do... |
|
| 167 | if ($context['allow_calendar_event'] && empty($modSettings['cal_allow_unlinked']) && !$user_info['is_admin']) |
|
| 168 | { |
|
| 169 | $boards_can_post = boardsAllowedTo('post_new'); |
|
| 170 | $context['allow_calendar_event'] &= !empty($boards_can_post); |
|
| 171 | } |
|
| 172 | ||
| 173 | $context['can_post'] = $context['allow_calendar_event']; |
|
| 174 | $context['current_day'] = $curPage['day']; |
|
| @@ 3965-3969 (lines=5) @@ | ||
| 3962 | $context['allow_calendar_event'] = $context['allow_calendar'] && allowedTo('calendar_post'); |
|
| 3963 | ||
| 3964 | // If you don't allow events not linked to posts and you're not an admin, we have more work to do... |
|
| 3965 | if ($context['allow_calendar'] && $context['allow_calendar_event'] && empty($modSettings['cal_allow_unlinked']) && !$user_info['is_admin']) |
|
| 3966 | { |
|
| 3967 | $boards_can_post = boardsAllowedTo('post_new'); |
|
| 3968 | $context['allow_calendar_event'] &= !empty($boards_can_post); |
|
| 3969 | } |
|
| 3970 | } |
|
| 3971 | ||
| 3972 | // There is some menu stuff we need to do if we're coming at this from a non-guest perspective. |
|