updated ctools, panels, date, diff

This commit is contained in:
Bachir Soussi Chiadmi
2017-05-24 19:22:50 +02:00
parent 542ac42fca
commit 9acef9d37e
189 changed files with 2928 additions and 1797 deletions

View File

@@ -12,9 +12,9 @@ files[] = includes/date_views_filter_handler_simple.inc
files[] = includes/date_views.views.inc
files[] = includes/date_views_plugin_pager.inc
; Information added by Drupal.org packaging script on 2015-09-08
version = "7.x-2.9"
; Information added by Drupal.org packaging script on 2017-04-07
version = "7.x-2.10"
core = "7.x"
project = "date"
datestamp = "1441727353"
datestamp = "1491562090"

View File

@@ -42,6 +42,32 @@ class date_views_filter_handler extends date_views_filter_handler_simple {
$this->date_combine_conditions('op_contains');
}
function op_empty($field) {
$this->get_query_fields();
if (empty($this->query_fields)) {
return;
}
// Add each condition to the custom filter group.
foreach ((array) $this->query_fields as $query_field) {
$field = $query_field['field'];
$this->date_handler = $query_field['date_handler'];
// Respect relationships when determining the table alias.
if ($field['table_name'] != $this->table || !empty($this->relationship)) {
$this->related_table_alias = $this->query->ensure_table($field['table_name'], $this->relationship);
}
else {
$this->related_table_alias = NULL;
}
$table_alias = !empty($this->related_table_alias) ? $this->related_table_alias : $field['table_name'];
$field_name = $table_alias . '.' . $field['field_name'];
parent::op_empty($field_name);
}
}
/**
* Combines multiple date WHERE expressions into a single WHERE expression.
*
@@ -67,7 +93,7 @@ class date_views_filter_handler extends date_views_filter_handler_simple {
$this->related_table_alias = $this->query->ensure_table($field['table_name'], $this->relationship);
}
else {
$this->related_table_alias = null;
$this->related_table_alias = NULL;
}
$table_alias = !empty($this->related_table_alias) ? $this->related_table_alias : $field['table_name'];
$field_name = $table_alias . '.' . $field['field_name'];

View File

@@ -281,7 +281,7 @@ class date_views_plugin_pager extends views_plugin_pager {
else {
$this->view->date_info->prev_date = clone($argument->min_date);
date_modify($this->view->date_info->prev_date, '-1 ' . $argument->date_handler->granularity);
$this->view->date_info->next_date = clone($argument->max_date);
$this->view->date_info->next_date = clone($argument->min_date);
date_modify($this->view->date_info->next_date, '+1 ' . $argument->date_handler->granularity);
}
// Write the date_info properties that depend on the current value.

View File

@@ -77,7 +77,7 @@ function template_preprocess_date_views_pager(&$vars) {
switch ($granularity) {
case 'week':
$prev_week = date_week(date_format($prev_date, 'Y-m-d'));
$prev_arg = date_format($prev_date, 'Y-\W') . date_pad($prev_week);
$prev_arg = date_format($prev_date, 'o-\W') . date_pad($prev_week);
break;
default:
$prev_arg = date_format($prev_date, $format[$granularity]);
@@ -90,7 +90,7 @@ function template_preprocess_date_views_pager(&$vars) {
switch ($granularity) {
case 'week':
$next_week = date_week(date_format($next_date, 'Y-m-d'));
$next_arg = date_format($next_date, 'Y-\W') . date_pad($next_week);
$next_arg = date_format($next_date, 'o-\W') . date_pad($next_week);
break;
default:
$next_arg = date_format($next_date, $format[$granularity]);