Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentTorregrosa committed Sep 30, 2015
2 parents 28c3bf1 + 3214095 commit 805c40e
Show file tree
Hide file tree
Showing 195 changed files with 10,296 additions and 1,607 deletions.
23 changes: 23 additions & 0 deletions patches/2460643_incompatble_with_views_cache_2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/leaflet.module b/leaflet.module
index e72a3e9..aa9ba3c 100644
--- a/leaflet.module
+++ b/leaflet.module
@@ -121,14 +121,16 @@ function leaflet_build_map($map, $features = array(), $height = '400px') {
);

// Load the leaflet library, which includes integration files.
- libraries_load('leaflet');
+ $build['#attached']['libraries_load'][] = array(
+ 'leaflet'
+ );

return $build;
}

/**
* DEPRECATED. Use leaflet_build_map() instead.
- *
+ *
* Load all Leaflet required client files and return markup for a map.
*
* @param array $map
4 changes: 4 additions & 0 deletions www7/sites/all/modules/contrib/date/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.patch
*.diff
.idea/
.idea/*
12 changes: 10 additions & 2 deletions www7/sites/all/modules/contrib/date/date.devel_generate.inc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ function date_devel_generate($entity, $field, $instance, $bundle) {
$entity_field = array();
if (isset($instance['widget']['settings']['year_range'])) {
$split = explode(':', $instance['widget']['settings']['year_range']);
$back = str_replace('-', '', $split[0]);
$forward = str_replace('+', '', $split[1]);
// Determine how much to go back and forward depending on whether a relative
// number of years (with - or + sign) or an absolute year is given.
$back = strpos($split[0], '-') === 0
? str_replace('-', '', $split[0])
: date_format(date_now(), 'Y') - $split[0];
$forward = strpos($split[1], '+') === 0
? str_replace('+', '', $split[1])
: $split[1] - date_format(date_now(), 'Y');
}
else {
$back = 2;
Expand Down Expand Up @@ -61,9 +67,11 @@ function date_devel_generate($entity, $field, $instance, $bundle) {
case 'date':
$format = DATE_FORMAT_ISO;
break;

case 'datestamp':
$format = DATE_FORMAT_UNIX;
break;

case 'datetime':
$format = DATE_FORMAT_DATETIME;
break;
Expand Down
35 changes: 23 additions & 12 deletions www7/sites/all/modules/contrib/date/date.field.inc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function date_field_formatter_info() {
'multiple_from' => '',
'multiple_to' => '',
'fromto' => 'both',
'show_remaining_days' => FALSE,
),
),
'format_interval' => array(
Expand Down Expand Up @@ -48,6 +49,7 @@ function date_field_formatter_settings_form($field, $instance, $view_mode, $form
case 'format_interval':
$form = date_interval_formatter_settings_form($field, $instance, $view_mode, $form, $form_state);
break;

default:
$form = date_default_formatter_settings_form($field, $instance, $view_mode, $form, $form_state);
break;
Expand All @@ -72,6 +74,7 @@ function date_field_formatter_settings_summary($field, $instance, $view_mode) {
case 'format_interval':
$summary = date_interval_formatter_settings_summary($field, $instance, $view_mode);
break;

default:
$summary = date_default_formatter_settings_summary($field, $instance, $view_mode);
break;
Expand Down Expand Up @@ -169,11 +172,16 @@ function date_field_formatter_view($entity_type, $entity, $field, $instance, $la
$element[$delta] = array('#markup' => $item['value']);
}
else {
$element[$delta] = array('#markup' => t('!start-date to !end-date', array('!start-date' => $item['value'], '!end-date' => $item['value2'])));
$element[$delta] = array(
'#markup' => t('!start-date to !end-date', array(
'!start-date' => $item['value'],
'!end-date' => $item['value2']
)));
}
}
}
break;

case 'format_interval':
foreach ($items as $delta => $item) {
if (!empty($entity->date_id) && !in_array($delta, $selected_deltas)) {
Expand All @@ -188,6 +196,7 @@ function date_field_formatter_view($entity_type, $entity, $field, $instance, $la
}
}
break;

default:
foreach ($items as $delta => $item) {
if (!empty($entity->date_id) && !in_array($delta, $selected_deltas)) {
Expand All @@ -198,6 +207,7 @@ function date_field_formatter_view($entity_type, $entity, $field, $instance, $la
$variables['item'] = $item;
$variables['dates'] = date_formatter_process($formatter, $entity_type, $entity, $field, $instance, $langcode, $item, $display);
$variables['attributes'] = !empty($rdf_mapping) ? rdf_rdfa_attributes($rdf_mapping, $item['value']) : array();
$variables['show_remaining_days'] = $display['settings']['show_remaining_days'];
$output = theme('date_display_combination', $variables);
if (!empty($output)) {
$element[$delta] = array('#markup' => $output);
Expand Down Expand Up @@ -231,10 +241,11 @@ function date_field_is_empty($item, $field) {
* Implements hook_field_info().
*/
function date_field_info() {
$granularity = array('year', 'month', 'day', 'hour', 'minute');
$settings = array(
'settings' => array(
'todate' => '',
'granularity' => drupal_map_assoc(array('year', 'month', 'day', 'hour', 'minute')),
'granularity' => drupal_map_assoc($granularity),
'tz_handling' => 'site',
'timezone_db' => 'UTC',
),
Expand All @@ -250,26 +261,26 @@ function date_field_info() {
);
return array(
'datetime' => array(
'label' => 'Date',
'label' => t('Date'),
'description' => t('Store a date in the database as a datetime field, recommended for complete dates and times that may need timezone conversion.'),
'default_widget' => 'date_select',
'default_formatter' => 'date_default',
'default_token_formatter' => 'date_plain',
) + $settings,
) + $settings,
'date' => array(
'label' => 'Date (ISO format)',
'label' => t('Date (ISO format)'),
'description' => t('Store a date in the database as an ISO date, recommended for historical or partial dates.'),
'default_widget' => 'date_select',
'default_formatter' => 'date_default',
'default_token_formatter' => 'date_plain',
) + $settings,
) + $settings,
'datestamp' => array(
'label' => 'Date (Unix timestamp)',
'label' => t('Date (Unix timestamp)'),
'description' => t('Store a date in the database as a timestamp, deprecated format to support legacy data.'),
'default_widget' => 'date_select',
'default_formatter' => 'date_default',
'default_token_formatter' => 'date_plain',
) + $settings,
) + $settings,
);
}

Expand All @@ -294,18 +305,18 @@ function date_field_widget_info() {

$info = array(
'date_select' => array(
'label' => t('Select list'),
'label' => t('Select list'),
'field types' => array('date', 'datestamp', 'datetime'),
) + $settings,
'date_text' => array(
'label' => t('Text field'),
'label' => t('Text field'),
'field types' => array('date', 'datestamp', 'datetime'),
) + $settings,
) + $settings,
);

if (module_exists('date_popup')) {
$info['date_popup'] = array(
'label' => t('Pop-up calendar'),
'label' => t('Pop-up calendar'),
'field types' => array('date', 'datestamp', 'datetime'),
) + $settings;
}
Expand Down
8 changes: 5 additions & 3 deletions www7/sites/all/modules/contrib/date/date.info
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ files[] = tests/date_field.test
files[] = tests/date_migrate.test
files[] = tests/date_validation.test
files[] = tests/date_timezone.test
files[] = tests/date_views_pager.test
files[] = tests/date_views_popup.test

; Information added by Drupal.org packaging script on 2014-07-29
version = "7.x-2.8"
; Information added by Drupal.org packaging script on 2015-09-08
version = "7.x-2.9"
core = "7.x"
project = "date"
datestamp = "1406653438"
datestamp = "1441727353"

26 changes: 19 additions & 7 deletions www7/sites/all/modules/contrib/date/date.install
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function date_field_schema($field) {
'views' => TRUE,
);
break;

case 'datetime':
$db_columns['value'] = array(
'type' => 'datetime',
Expand All @@ -31,6 +32,7 @@ function date_field_schema($field) {
'views' => TRUE,
);
break;

default:
$db_columns['value'] = array(
'type' => 'varchar',
Expand Down Expand Up @@ -66,7 +68,12 @@ function date_field_schema($field) {
'views' => FALSE,
);
if (!empty($field['settings']['todate'])) {
$db_columns['offset2'] = array('type' => 'int', 'not null' => FALSE, 'sortable' => TRUE, 'views' => FALSE);
$db_columns['offset2'] = array(
'type' => 'int',
'not null' => FALSE,
'sortable' => TRUE,
'views' => FALSE
);
}
}
if (isset($field['settings']['repeat']) && $field['settings']['repeat'] == 1) {
Expand All @@ -88,8 +95,9 @@ function date_update_last_removed() {
}

/**
* Get rid of the individual formatters for each format type,
* these are now settings in the default formatter.
* Get rid of the individual formatters for each format type.
*
* These are now settings in the default formatter.
*/
function date_update_7000() {
$instances = field_info_instances();
Expand All @@ -115,8 +123,9 @@ function date_update_7000() {
}

/**
* Get rid of the separate widgets for repeating dates. The code now handles
* repeating dates correctly using the regular widgets.
* Get rid of the separate widgets for repeating dates.
*
* The code now handles repeating dates correctly using the regular widgets.
*/
function date_update_7001() {
$query = db_select('field_config_instance', 'fci', array('fetch' => PDO::FETCH_ASSOC));
Expand All @@ -127,7 +136,11 @@ function date_update_7001() {

foreach ($results as $record) {
$instance = unserialize($record['data']);
if (in_array($instance['widget']['type'], array('date_popup_repeat', 'date_text_repeat', 'date_select_repeat'))) {
if (in_array($instance['widget']['type'], array(
'date_popup_repeat',
'date_text_repeat',
'date_select_repeat'
))) {
$instance['widget']['type'] = str_replace('_repeat', '', $instance['widget']['type']);
db_update('field_config_instance')
->fields(array(
Expand Down Expand Up @@ -191,4 +204,3 @@ function date_update_7004() {
field_cache_clear();
drupal_set_message(t('Date text widgets have been updated to use an increment of 1.'));
}

4 changes: 2 additions & 2 deletions www7/sites/all/modules/contrib/date/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Drupal.date.EndDateHandler = function (widget) {
this.$widget = $(widget);
this.$start = this.$widget.find('.form-type-date-select[class$=value]');
this.$end = this.$widget.find('.form-type-date-select[class$=value2]');
if (this.$end.length == 0) {
if (this.$end.length === 0) {
return;
}
this.initializeSelects();
Expand Down Expand Up @@ -68,7 +68,7 @@ Drupal.date.EndDateHandler.prototype.endDateIsBlank = function () {
var id;
for (id in this.selects) {
if (this.selects.hasOwnProperty(id)) {
if (this.selects[id].end.val() != '') {
if (this.selects[id].end.val() !== '') {
return false;
}
}
Expand Down
16 changes: 14 additions & 2 deletions www7/sites/all/modules/contrib/date/date.migrate.inc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class DateMigrateFieldHandler extends MigrateFieldHandler {
* @return array
* An array of the defined variables in this scope.
*/
static function arguments($timezone = 'UTC', $timezone_db = 'UTC', $rrule = NULL, $language = NULL) {
public static function arguments($timezone = 'UTC', $timezone_db = 'UTC', $rrule = NULL, $language = NULL) {
return get_defined_vars();
}

Expand Down Expand Up @@ -129,6 +129,7 @@ class DateMigrateFieldHandler extends MigrateFieldHandler {
// timestamp for 'now'.
if (empty($from)) {
$return[$language][$delta]['value'] = NULL;
$return[$language][$delta]['timezone'] = NULL;
if (!empty($field_info['settings']['todate'])) {
$return[$language][$delta]['value2'] = NULL;
}
Expand All @@ -151,20 +152,23 @@ class DateMigrateFieldHandler extends MigrateFieldHandler {
case 'datestamp':
// Already done.
break;

case 'datetime':
// YYYY-MM-DD HH:MM:SS.
$from = format_date($from, 'custom', 'Y-m-d H:i:s', $timezone);
if ($to) {
$to = format_date($to, 'custom', 'Y-m-d H:i:s', $timezone);
}
break;

case 'date':
// ISO date: YYYY-MM-DDTHH:MM:SS.
$from = format_date($from, 'custom', 'Y-m-d\TH:i:s', $timezone);
if ($to) {
$to = format_date($to, 'custom', 'Y-m-d\TH:i:s', $timezone);
}
break;

default:
break;
}
Expand All @@ -173,12 +177,17 @@ class DateMigrateFieldHandler extends MigrateFieldHandler {
// created.
if (function_exists('date_repeat_build_dates') && !empty($field_info['settings']['repeat']) && $rrule) {
include_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'date_api') . '/date_api_ical.inc';
$item = array('value' => $from, 'value2' => $to, 'timezone' => $timezone);
$item = array(
'value' => $from,
'value2' => $to,
'timezone' => $timezone,
);
// Can be de-uglified when http://drupal.org/node/1159404 is committed.
$return[$language] = date_repeat_build_dates(NULL, date_ical_parse_rrule($field_info, $rrule), $field_info, $item);
}
else {
$return[$language][$delta]['value'] = $from;
$return[$language][$delta]['timezone'] = $timezone;
if (!empty($to)) {
$return[$language][$delta]['value2'] = $to;
}
Expand All @@ -190,6 +199,9 @@ class DateMigrateFieldHandler extends MigrateFieldHandler {
return $return;
}

/**
* {@inheritdoc}
*/
public function fields($migration = NULL) {
return array(
'timezone' => t('Timezone'),
Expand Down
Loading

0 comments on commit 805c40e

Please sign in to comment.