summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt1
-rw-r--r--includes/calendar_plugin_style.inc4
-rw-r--r--theme/theme.inc8
3 files changed, 7 insertions, 6 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index f0b3c44..80081e9 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -5,6 +5,7 @@ Calendar Module 7.x
Version 7.x-3.x-dev
===================
+- Issue #1238568, Add more checks to bail gracefully when a date argument is missing.
- Issue #1254932 by larsdesigns, Invalid CSS Property in calendar_multiday.css
- Issue #1254922 by larsdesigns, calendar_multiday.css is not complient with Drupal Coding Standards
- Issue #1254920 by larsdesigns, calendar.css is not complient with Drupal Coding Standards
diff --git a/includes/calendar_plugin_style.inc b/includes/calendar_plugin_style.inc
index 047a293..fccd1cb 100644
--- a/includes/calendar_plugin_style.inc
+++ b/includes/calendar_plugin_style.inc
@@ -208,11 +208,11 @@ class calendar_plugin_style extends views_plugin_style {
function render() {
if (empty($this->row_plugin) || $this->row_plugin->definition['handler'] != 'calendar_plugin_row_node') {
- debug('calendar_plugin_style: Missing calendar row plugin');
+ debug('calendar_plugin_style: The calendar row plugin is required for a calendar but it is missing.');
return;
}
if (!$argument = $this->date_argument_handler()) {
- debug('calendar_plugin_style: Missing date argument');
+ debug('calendar_plugin_style: A date argument is required for a calendar, but it is missing.');
return;
}
diff --git a/theme/theme.inc b/theme/theme.inc
index 3b59cdf..a7d1d56 100644
--- a/theme/theme.inc
+++ b/theme/theme.inc
@@ -13,7 +13,7 @@ function calendar_preprocess_date_views_pager(&$vars) {
return;
}
$options = $view->style_options;
-
+
// If we're not on a view with a path (a page), no links are needed.
$current_path = !empty($view->display_handler->options['path']) ? $view->display_handler->options['path'] : '';
if (empty($current_path)) {
@@ -43,13 +43,13 @@ function calendar_preprocess_date_views_pager(&$vars) {
// If an 'Add new ... link is provided, add it here.
// the query will bring the user back here after adding the node.
- if (!empty($view->date_info->calendar_date_link)
+ if (!empty($view->date_info->calendar_date_link) && !empty($view->date_info->url)
&& (user_access("administer nodes") || user_access('create '. $view->date_info->calendar_date_link .' content'))) {
$name = node_type_get_name($view->date_info->calendar_date_link);
$href = 'node/add/' . str_replace('_', '-', $view->date_info->calendar_date_link);
- $query = drupal_get_query_parameters(array('destination' => $view->date_info->url));
+ $query = drupal_get_query_parameters(array('destination' => $view->date_info->url));
$calendar_links['calendar calendar-add'] = $base + array(
- 'title' => t('Add+'),
+ 'title' => t('Add+'),
'href' => $href,
'query' => $query,
);