commit 3acd948fa26c14ae8562ac6bf87d2f7219efa44b
Author: Assos Assos <assos+forge@centrale-marseille.fr>
Date:   Wed Aug 16 23:53:37 2017 +0200

    Weekly update of contrib modules

diff --git a/drupal7/sites/all/modules/entityreference/entityreference.info b/drupal7/sites/all/modules/entityreference/entityreference.info
index 2695e465..5b2a0f74 100644
--- a/drupal7/sites/all/modules/entityreference/entityreference.info
+++ b/drupal7/sites/all/modules/entityreference/entityreference.info
@@ -29,9 +29,9 @@ files[] = tests/entityreference.admin.test
 files[] = tests/entityreference.feeds.test
 files[] = tests/entityreference.entity_translation.test
 
-; Information added by Drupal.org packaging script on 2017-05-23
-version = "7.x-1.4"
+; Information added by Drupal.org packaging script on 2017-08-16
+version = "7.x-1.5"
 core = "7.x"
 project = "entityreference"
-datestamp = "1495557187"
+datestamp = "1502895850"
 
diff --git a/drupal7/sites/all/modules/entityreference/entityreference.module b/drupal7/sites/all/modules/entityreference/entityreference.module
index 42af2a30..c0c9f58f 100644
--- a/drupal7/sites/all/modules/entityreference/entityreference.module
+++ b/drupal7/sites/all/modules/entityreference/entityreference.module
@@ -1,5 +1,7 @@
 <?php
 
+define('ENTITYREFERENCE_DENIED', '- Restricted access -');
+
 /**
  * @file
  * Entityreference primary module file.
@@ -1106,10 +1108,14 @@ function entityreference_autocomplete_callback_get_matches($type, $field, $insta
   if (isset($tag_last)) {
     // Get an array of matching entities.
     $entity_labels = $handler->getReferencableEntities($tag_last, $instance['widget']['settings']['match_operator'], 10);
-
+    $denied_label = t(ENTITYREFERENCE_DENIED);
     // Loop through the products and convert them into autocomplete output.
     foreach ($entity_labels as $values) {
       foreach ($values as $entity_id => $label) {
+        // Never autocomplete entities that aren't accessible.
+        if ($label == $denied_label) {
+          continue;
+        }
         $key = "$label ($entity_id)";
         // Strip starting/trailing white spaces, line breaks and tags.
         $key = preg_replace('/\s\s+/', ' ', str_replace("\n", '', trim(decode_entities(strip_tags($key)))));
diff --git a/drupal7/sites/all/modules/entityreference/examples/entityreference_behavior_example/entityreference_behavior_example.info b/drupal7/sites/all/modules/entityreference/examples/entityreference_behavior_example/entityreference_behavior_example.info
index 6f21bac5..70bcc4f2 100644
--- a/drupal7/sites/all/modules/entityreference/examples/entityreference_behavior_example/entityreference_behavior_example.info
+++ b/drupal7/sites/all/modules/entityreference/examples/entityreference_behavior_example/entityreference_behavior_example.info
@@ -4,9 +4,9 @@ core = 7.x
 package = Fields
 dependencies[] = entityreference
 
-; Information added by Drupal.org packaging script on 2017-05-23
-version = "7.x-1.4"
+; Information added by Drupal.org packaging script on 2017-08-16
+version = "7.x-1.5"
 core = "7.x"
 project = "entityreference"
-datestamp = "1495557187"
+datestamp = "1502895850"
 
diff --git a/drupal7/sites/all/modules/entityreference/plugins/selection/EntityReference_SelectionHandler_Generic.class.php b/drupal7/sites/all/modules/entityreference/plugins/selection/EntityReference_SelectionHandler_Generic.class.php
index e0dff00b..6ec28a4b 100644
--- a/drupal7/sites/all/modules/entityreference/plugins/selection/EntityReference_SelectionHandler_Generic.class.php
+++ b/drupal7/sites/all/modules/entityreference/plugins/selection/EntityReference_SelectionHandler_Generic.class.php
@@ -309,7 +309,7 @@ class EntityReference_SelectionHandler_Generic implements EntityReference_Select
    */
   public function getLabel($entity) {
     $target_type = $this->field['settings']['target_type'];
-    return entity_access('view', $target_type, $entity) ? entity_label($target_type, $entity) : t('- Restricted access -');
+    return entity_access('view', $target_type, $entity) ? entity_label($target_type, $entity) : t(ENTITYREFERENCE_DENIED);
   }
 
   /**
diff --git a/drupal7/sites/all/modules/entityreference/tests/entityreference.handlers.test b/drupal7/sites/all/modules/entityreference/tests/entityreference.handlers.test
index 22569324..1367b44a 100644
--- a/drupal7/sites/all/modules/entityreference/tests/entityreference.handlers.test
+++ b/drupal7/sites/all/modules/entityreference/tests/entityreference.handlers.test
@@ -271,7 +271,7 @@ class EntityReferenceHandlersTestCase extends DrupalWebTestCase {
         ),
         'result' => array(
           'user' => array(
-            $users['admin']->uid => '- Restricted access -',
+            $users['admin']->uid => ENTITYREFERENCE_DENIED,
             $users['non_admin']->uid => $user_labels['non_admin'],
           ),
         ),
diff --git a/drupal7/sites/all/modules/entityreference/tests/modules/entityreference_feeds_test/entityreference_feeds_test.info b/drupal7/sites/all/modules/entityreference/tests/modules/entityreference_feeds_test/entityreference_feeds_test.info
index dace68b7..5bbf9b6f 100644
--- a/drupal7/sites/all/modules/entityreference/tests/modules/entityreference_feeds_test/entityreference_feeds_test.info
+++ b/drupal7/sites/all/modules/entityreference/tests/modules/entityreference_feeds_test/entityreference_feeds_test.info
@@ -8,9 +8,9 @@ dependencies[] = feeds
 dependencies[] = feeds_ui
 dependencies[] = entityreference
 
-; Information added by Drupal.org packaging script on 2017-05-23
-version = "7.x-1.4"
+; Information added by Drupal.org packaging script on 2017-08-16
+version = "7.x-1.5"
 core = "7.x"
 project = "entityreference"
-datestamp = "1495557187"
+datestamp = "1502895850"
 
diff --git a/drupal7/sites/all/modules/file_entity/admin_views_default/file.admin-content-file.inc b/drupal7/sites/all/modules/file_entity/admin_views_default/file.admin-content-file.inc
index c108497c..dc2f0de5 100644
--- a/drupal7/sites/all/modules/file_entity/admin_views_default/file.admin-content-file.inc
+++ b/drupal7/sites/all/modules/file_entity/admin_views_default/file.admin-content-file.inc
@@ -33,78 +33,78 @@ $handler->display->display_options['pager']['options']['id'] = '0';
 $handler->display->display_options['pager']['options']['quantity'] = '9';
 $handler->display->display_options['style_plugin'] = 'table';
 $handler->display->display_options['style_options']['columns'] = array(
-    'views_bulk_operations' => 'views_bulk_operations',
-    'filename' => 'filename',
-    'type' => 'type',
-    'name' => 'name',
-    'filesize' => 'filesize',
-    'timestamp' => 'timestamp',
-    'edit' => 'edit',
-    'delete' => 'delete',
+  'views_bulk_operations' => 'views_bulk_operations',
+  'filename' => 'filename',
+  'type' => 'type',
+  'name' => 'name',
+  'filesize' => 'filesize',
+  'timestamp' => 'timestamp',
+  'edit' => 'edit',
+  'delete' => 'delete',
 );
 $handler->display->display_options['style_options']['default'] = 'timestamp';
 $handler->display->display_options['style_options']['info'] = array(
-    'views_bulk_operations' => array(
-        'align' => '',
-        'separator' => '',
-        'empty_column' => 0,
-    ),
-    'filename' => array(
-        'sortable' => 1,
-        'default_sort_order' => 'asc',
-        'align' => '',
-        'separator' => '',
-        'empty_column' => 0,
-    ),
-    'type' => array(
-        'sortable' => 1,
-        'default_sort_order' => 'asc',
-        'align' => '',
-        'separator' => '',
-        'empty_column' => 0,
-    ),
-    'name' => array(
-        'sortable' => 1,
-        'default_sort_order' => 'asc',
-        'align' => '',
-        'separator' => '',
-        'empty_column' => 0,
-    ),
-    'filesize' => array(
-        'sortable' => 1,
-        'default_sort_order' => 'asc',
-        'align' => '',
-        'separator' => '',
-        'empty_column' => 0,
-    ),
-    'timestamp' => array(
-        'sortable' => 1,
-        'default_sort_order' => 'desc',
-        'align' => '',
-        'separator' => '',
-        'empty_column' => 0,
-    ),
-    'edit' => array(
-        'sortable' => 0,
-        'default_sort_order' => 'asc',
-        'align' => '',
-        'separator' => '',
-        'empty_column' => 0,
-    ),
-    'usage' => array(
-        'sortable' => 1,
-        'default_sort_order' => 'asc',
-        'align' => '',
-        'separator' => '',
-        'empty_column' => 0,
-    ),
-    'delete' => array(
-        'sortable' => 0,
-        'default_sort_order' => 'asc',
-        'align' => '',
-        'separator' => '',
-        'empty_column' => 0,
-    ),
+  'views_bulk_operations' => array(
+    'align' => '',
+    'separator' => '',
+    'empty_column' => 0,
+  ),
+  'filename' => array(
+    'sortable' => 1,
+    'default_sort_order' => 'asc',
+    'align' => '',
+    'separator' => '',
+    'empty_column' => 0,
+  ),
+  'type' => array(
+    'sortable' => 1,
+    'default_sort_order' => 'asc',
+    'align' => '',
+    'separator' => '',
+    'empty_column' => 0,
+  ),
+  'name' => array(
+    'sortable' => 1,
+    'default_sort_order' => 'asc',
+    'align' => '',
+    'separator' => '',
+    'empty_column' => 0,
+  ),
+  'filesize' => array(
+    'sortable' => 1,
+    'default_sort_order' => 'asc',
+    'align' => '',
+    'separator' => '',
+    'empty_column' => 0,
+  ),
+  'timestamp' => array(
+    'sortable' => 1,
+    'default_sort_order' => 'desc',
+    'align' => '',
+    'separator' => '',
+    'empty_column' => 0,
+  ),
+  'edit' => array(
+    'sortable' => 0,
+    'default_sort_order' => 'asc',
+    'align' => '',
+    'separator' => '',
+    'empty_column' => 0,
+  ),
+  'usage' => array(
+    'sortable' => 1,
+    'default_sort_order' => 'asc',
+    'align' => '',
+    'separator' => '',
+    'empty_column' => 0,
+  ),
+  'delete' => array(
+    'sortable' => 0,
+    'default_sort_order' => 'asc',
+    'align' => '',
+    'separator' => '',
+    'empty_column' => 0,
+  ),
 );
 $handler->display->display_options['style_options']['sticky'] = TRUE;
 $handler->display->display_options['style_options']['empty_table'] = TRUE;
@@ -130,67 +130,67 @@ $handler->display->display_options['fields']['views_bulk_operations']['vbo_setti
 $handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['force_single'] = 0;
 $handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['entity_load_capacity'] = '10';
 $handler->display->display_options['fields']['views_bulk_operations']['vbo_operations'] = array(
-    'action::views_bulk_operations_archive_action' => array(
-        'selected' => 1,
-        'postpone_processing' => 0,
-        'skip_confirmation' => 0,
-        'override_label' => 1,
-        'label' => 'Archive',
-        'settings' => array(
-            'scheme' => 'public',
-            'temporary' => 1,
-        ),
-    ),
-    'action::views_bulk_operations_delete_item' => array(
-        'selected' => 1,
-        'postpone_processing' => 0,
-        'skip_confirmation' => 0,
-        'override_label' => 1,
-        'label' => 'Delete',
-    ),
-    'action::views_bulk_operations_script_action' => array(
-        'selected' => 0,
-        'postpone_processing' => 0,
-        'skip_confirmation' => 0,
-        'override_label' => 0,
-        'label' => '',
+  'action::views_bulk_operations_archive_action' => array(
+    'selected' => 1,
+    'postpone_processing' => 0,
+    'skip_confirmation' => 0,
+    'override_label' => 1,
+    'label' => 'Archive',
+    'settings' => array(
+      'scheme' => 'public',
+      'temporary' => 1,
     ),
-    'action::views_bulk_operations_modify_action' => array(
-        'selected' => 1,
-        'postpone_processing' => 0,
-        'skip_confirmation' => 1,
-        'override_label' => 1,
-        'label' => 'Change value',
-        'settings' => array(
-            'show_all_tokens' => 1,
-            'display_values' => array(
-                '_all_' => '_all_',
-            ),
+  ),
+  'action::views_bulk_operations_delete_item' => array(
+    'selected' => 1,
+    'postpone_processing' => 0,
+    'skip_confirmation' => 0,
+    'override_label' => 1,
+    'label' => 'Delete',
+  ),
+  'action::views_bulk_operations_script_action' => array(
+    'selected' => 0,
+    'postpone_processing' => 0,
+    'skip_confirmation' => 0,
+    'override_label' => 0,
+    'label' => '',
+  ),
+  'action::views_bulk_operations_modify_action' => array(
+    'selected' => 1,
+    'postpone_processing' => 0,
+    'skip_confirmation' => 1,
+    'override_label' => 1,
+    'label' => 'Change value',
+    'settings' => array(
+        'show_all_tokens' => 1,
+        'display_values' => array(
+            '_all_' => '_all_',
         ),
     ),
-    'action::views_bulk_operations_argument_selector_action' => array(
-        'selected' => 0,
-        'skip_confirmation' => 0,
-        'override_label' => 0,
-        'label' => '',
-        'settings' => array(
-            'url' => '',
-        ),
-    ),
-    'action::system_send_email_action' => array(
-        'selected' => 0,
-        'postpone_processing' => 0,
-        'skip_confirmation' => 0,
-        'override_label' => 0,
-        'label' => '',
-    ),
-    'action::panelizer_set_status_action' => array(
-        'selected' => 0,
-        'postpone_processing' => 0,
-        'skip_confirmation' => 0,
-        'override_label' => 0,
-        'label' => '',
+  ),
+  'action::views_bulk_operations_argument_selector_action' => array(
+    'selected' => 0,
+    'skip_confirmation' => 0,
+    'override_label' => 0,
+    'label' => '',
+    'settings' => array(
+      'url' => '',
     ),
+  ),
+  'action::system_send_email_action' => array(
+    'selected' => 0,
+    'postpone_processing' => 0,
+    'skip_confirmation' => 0,
+    'override_label' => 0,
+    'label' => '',
+  ),
+  'action::panelizer_set_status_action' => array(
+    'selected' => 0,
+    'postpone_processing' => 0,
+    'skip_confirmation' => 0,
+    'override_label' => 0,
+    'label' => '',
+  ),
 );
 /* Field: File: Name */
 $handler->display->display_options['fields']['filename']['id'] = 'filename';
@@ -267,9 +267,9 @@ $handler->display->display_options['filters']['filename']['expose']['operator']
 $handler->display->display_options['filters']['filename']['expose']['identifier'] = 'filename';
 $handler->display->display_options['filters']['filename']['expose']['remember'] = TRUE;
 $handler->display->display_options['filters']['filename']['expose']['remember_roles'] = array(
-    2 => '2',
-    1 => 0,
-    3 => 0,
+  2 => '2',
+  1 => 0,
+  3 => 0,
 );
 /* Filter criterion: File: Type */
 $handler->display->display_options['filters']['type']['id'] = 'type';
@@ -283,9 +283,9 @@ $handler->display->display_options['filters']['type']['expose']['operator'] = 't
 $handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
 $handler->display->display_options['filters']['type']['expose']['remember'] = TRUE;
 $handler->display->display_options['filters']['type']['expose']['remember_roles'] = array(
-    2 => '2',
-    1 => 0,
-    3 => 0,
+  2 => '2',
+  1 => 0,
+  3 => 0,
 );
 /* Filter criterion: User: Name */
 $handler->display->display_options['filters']['uid']['id'] = 'uid';
@@ -301,9 +301,9 @@ $handler->display->display_options['filters']['uid']['expose']['operator'] = 'ui
 $handler->display->display_options['filters']['uid']['expose']['identifier'] = 'uid';
 $handler->display->display_options['filters']['uid']['expose']['remember'] = TRUE;
 $handler->display->display_options['filters']['uid']['expose']['remember_roles'] = array(
-    2 => '2',
-    1 => 0,
-    3 => 0,
+  2 => '2',
+  1 => 0,
+  3 => 0,
 );
 
 /* Display: System */
diff --git a/drupal7/sites/all/modules/file_entity/file_entity.admin.inc b/drupal7/sites/all/modules/file_entity/file_entity.admin.inc
index 3e3097b2..11d3589c 100644
--- a/drupal7/sites/all/modules/file_entity/file_entity.admin.inc
+++ b/drupal7/sites/all/modules/file_entity/file_entity.admin.inc
@@ -1,4 +1,5 @@
 <?php
+
 /**
  * @file
  * File administration and module settings UI.
@@ -178,7 +179,7 @@ function file_entity_filter_form_submit($form, &$form_state) {
  *   Array of key/value pairs with file field names and the
  *   value to update that field to.
  */
-function file_entity_mass_update($files, $updates) {
+function file_entity_mass_update(array $files, array $updates) {
   // We use batch processing to prevent timeout when updating a large number
   // of files.
   if (count($files) > 10) {
@@ -323,17 +324,26 @@ function file_entity_admin_files() {
     'timestamp' => array(
       'data' => t('Updated'),
       'field' => 'fm.timestamp',
-      'sort' => 'desc'),
+      'sort' => 'desc',
+    ),
     'usage' => array('data' => t('Used in'), 'field' => 'total_count'),
     'operations' => array('data' => t('Operations')),
   );
 
+  if (variable_get('file_entity_total_count_optimization', FALSE)) {
+    // If the total_count is being retrieved by subqueries,
+    // the table is not sortable by this column.
+    unset($header['usage']['field']);
+  }
+
   $query = db_select('file_managed', 'fm')->extend('PagerDefault')->extend('TableSort');
-  $query->leftJoin('file_usage', 'fu', 'fm.fid = fu.fid');
-  $query->groupBy('fm.fid');
-  $query->groupBy('fm.uid');
-  $query->groupBy('fm.timestamp');
-  $query->addExpression('SUM(fu.count)', 'total_count');
+  if (!variable_get('file_entity_total_count_optimization', FALSE)) {
+    $query->leftJoin('file_usage', 'fu', 'fm.fid = fu.fid');
+    $query->groupBy('fm.fid');
+    $query->groupBy('fm.uid');
+    $query->groupBy('fm.timestamp');
+    $query->addExpression('SUM(fu.count)', 'total_count');
+  }
   file_entity_build_filter_query($query);
 
   $result = $query
@@ -343,6 +353,24 @@ function file_entity_admin_files() {
     ->addTag('file_access')
     ->execute()
     ->fetchAllAssoc('fid');
+
+  if (variable_get('file_entity_total_count_optimization', FALSE)) {
+    // Get the total_count in separate queries, otherwise the main
+    // query will take too long.
+    // This setting can be configured under /admin/config/development/performance.
+    foreach ($result as &$file_result) {
+      $count_query = db_select('file_usage', 'fu')
+        ->fields('fu', array('fid', 'count'))
+        ->condition('fu.fid', $file_result->fid, '=');
+      $count_query->addExpression('SUM(fu.count)', 'total_count');
+      $count_result = $count_query->execute()->fetchAll();
+
+      if (!empty($count_result[0]->total_count)) {
+        $file_result->total_count = $count_result[0]->total_count;
+      }
+    }
+  }
+
   $files = file_load_multiple(array_keys($result));
 
   $uids = array();
@@ -931,7 +959,6 @@ function file_entity_file_type_form_submit($form, &$form_state) {
   $form_state['redirect'] = 'admin/structure/file-types';
 }
 
-
 /**
  * Menu callback; disable a single file type.
  */
@@ -942,7 +969,6 @@ function file_entity_type_enable_confirm($form, &$form_state, $type) {
   return confirm_form($form, $message, 'admin/structure/file-types', '', t('Enable'));
 }
 
-
 /**
  * Process file type disable confirm submissions.
  */
@@ -952,10 +978,8 @@ function file_entity_type_enable_confirm_submit($form, &$form_state) {
   drupal_set_message(t('The file type %label has been enabled.', $t_args));
   watchdog('file_entity', 'Enabled file type %label.', $t_args, WATCHDOG_NOTICE);
   $form_state['redirect'] = 'admin/structure/file-types';
-  return;
 }
 
-
 /**
  * Menu callback; disable a single file type.
  */
@@ -989,10 +1013,8 @@ function file_entity_type_disable_confirm_submit($form, &$form_state) {
   drupal_set_message(t('The file type %label has been disabled.', $t_args));
   watchdog('file_entity', 'Disabled file type %label.', $t_args, WATCHDOG_NOTICE);
   $form_state['redirect'] = 'admin/structure/file-types';
-  return;
 }
 
-
 /**
  * Menu callback; revert a single file type.
  */
@@ -1003,7 +1025,6 @@ function file_entity_type_revert_confirm($form, &$form_state, $type) {
   return confirm_form($form, $message, 'admin/structure/file-types', '', t('Revert'));
 }
 
-
 /**
  * Process file type delete confirm submissions.
  */
@@ -1014,10 +1035,8 @@ function file_entity_type_revert_confirm_submit($form, &$form_state) {
   drupal_set_message(t('The file type %label has been reverted.', $t_args));
   watchdog('file_entity', 'Reverted file type %label.', $t_args, WATCHDOG_NOTICE);
   $form_state['redirect'] = 'admin/structure/file-types';
-  return;
 }
 
-
 /**
  * Menu callback; delete a single file type.
  */
@@ -1049,7 +1068,6 @@ function file_entity_type_delete_confirm_submit($form, &$form_state) {
   watchdog('file_entity', 'Deleted file type %label.', $t_args, WATCHDOG_NOTICE);
 
   $form_state['redirect'] = 'admin/structure/file-types';
-  return;
 }
 
 /**
diff --git a/drupal7/sites/all/modules/file_entity/file_entity.api.php b/drupal7/sites/all/modules/file_entity/file_entity.api.php
index 3a736812..01c6e881 100644
--- a/drupal7/sites/all/modules/file_entity/file_entity.api.php
+++ b/drupal7/sites/all/modules/file_entity/file_entity.api.php
@@ -78,7 +78,7 @@ function hook_file_formatter_info() {
  *   Array of information on file formatters exposed by
  *   hook_file_formatter_info() implementations.
  */
-function hook_file_formatter_info_alter(&$info) {
+function hook_file_formatter_info_alter(array &$info) {
   // @todo Add example.
 }
 
@@ -170,7 +170,7 @@ function hook_file_operations() {
  *   - "delete"
  *   - "update"
  *   - "view"
- *   - "download"
+ *   - "download".
  * @param object $file
  *   The file on which the operation is to be performed, or, if it does
  *   not yet exist, the type of file to be created.
@@ -178,7 +178,7 @@ function hook_file_operations() {
  *   A user object representing the user for whom the operation is to be
  *   performed.
  *
- * @return string|NULL
+ * @return string|null
  *   FILE_ENTITY_ACCESS_ALLOW if the operation is to be allowed;
  *   FILE_ENTITY_ACCESS_DENY if the operation is to be denied;
  *   FILE_ENTITY_ACCESS_IGNORE to not affect this operation at all.
@@ -377,7 +377,7 @@ function hook_file_type($file) {
  * @param object $file
  *   File object.
  */
-function hook_file_type_alter(&$types, $file) {
+function hook_file_type_alter(array &$types, $file) {
   // Choose a specific, non-first, file type.
   $types = array($types[4]);
 }
diff --git a/drupal7/sites/all/modules/file_entity/file_entity.devel_generate.inc b/drupal7/sites/all/modules/file_entity/file_entity.devel_generate.inc
index 05842c30..7de4483e 100644
--- a/drupal7/sites/all/modules/file_entity/file_entity.devel_generate.inc
+++ b/drupal7/sites/all/modules/file_entity/file_entity.devel_generate.inc
@@ -5,6 +5,11 @@
  * Devel generate integration for the File Entity module.
  */
 
+/**
+ * Devel generate file form.
+ *
+ * Options for Devel generate file integration.
+ */
 function file_entity_generate_file_form() {
   $form['count'] = array(
     '#type' => 'textfield',
@@ -32,12 +37,18 @@ function file_entity_generate_file_form() {
   return $form;
 }
 
+/**
+ * Implements hook_ID_form_submit().
+ */
 function file_entity_generate_file_form_submit(&$form, &$form_state) {
   $file_types = array_values(array_filter($form_state['values']['file_types']));
   $batch = file_entity_generate_file_batch_info($form_state['values']['count'], $file_types, $form_state['values']['delete']);
   batch_set($batch);
 }
 
+/**
+ * Implements hook_batch_info().
+ */
 function file_entity_generate_file_batch_info($count, array $file_types = array(), $delete = FALSE) {
   if (empty($file_types)) {
     $file_types = array_keys(file_entity_type_get_names());
@@ -56,6 +67,9 @@ function file_entity_generate_file_batch_info($count, array $file_types = array(
   );
 }
 
+/**
+ * Implements hook_batch_delete().
+ */
 function file_entity_generate_file_batch_delete(array $file_types, array &$context) {
   if (empty($context['sandbox'])) {
     $context['sandbox'] = array();
@@ -80,6 +94,9 @@ function file_entity_generate_file_batch_delete(array $file_types, array &$conte
   }
 }
 
+/**
+ * Implements hook_generate_file_batch_generate() using Devel generate api.
+ */
 function file_entity_generate_file_batch_generate(array $file_types, $num, array &$context) {
   if (empty($context['sandbox'])) {
     module_load_include('inc', 'devel_generate');
@@ -114,6 +131,9 @@ function file_entity_generate_file_batch_generate(array $file_types, $num, array
   }
 }
 
+/**
+ * When the batch is finished set a status message.
+ */
 function file_entity_generate_file_batch_finished($success, $results, $operations) {
   if ($success) {
     drupal_set_message(format_plural(count($results), 'One file created.', '@count files created.'));
@@ -126,6 +146,9 @@ function file_entity_generate_file_batch_finished($success, $results, $operation
   }
 }
 
+/**
+ * Generate file function for file_entity.
+ */
 function file_entity_generate_file($file_type) {
   $type = file_type_load($file_type);
   $possible_extensions = file_type_get_valid_extensions($type);
diff --git a/drupal7/sites/all/modules/file_entity/file_entity.info b/drupal7/sites/all/modules/file_entity/file_entity.info
index deaaab4b..347861b6 100644
--- a/drupal7/sites/all/modules/file_entity/file_entity.info
+++ b/drupal7/sites/all/modules/file_entity/file_entity.info
@@ -32,9 +32,9 @@ configure = admin/config/media/file-settings
 ; We have to add a fake version so Git checkouts do not fail Media dependencies
 version = 7.x-2.x-dev
 
-; Information added by Drupal.org packaging script on 2017-07-04
-version = "7.x-2.3"
+; Information added by Drupal.org packaging script on 2017-08-10
+version = "7.x-2.4"
 core = "7.x"
 project = "file_entity"
-datestamp = "1499174351"
+datestamp = "1502334549"
 
diff --git a/drupal7/sites/all/modules/file_entity/file_entity.module b/drupal7/sites/all/modules/file_entity/file_entity.module
index 13916ce6..ada703f0 100644
--- a/drupal7/sites/all/modules/file_entity/file_entity.module
+++ b/drupal7/sites/all/modules/file_entity/file_entity.module
@@ -2643,3 +2643,14 @@ function file_entity_features_pipe_file_type_alter(&$pipe, $data, $export) {
   }
 }
 
+/**
+ * Implements hook_FORM_ID_alter().
+ */
+function file_entity_form_system_performance_settings_alter(&$form, &$form_state) {
+  $form['bandwidth_optimization']['file_entity_total_count_optimization'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Optimize the calculation of the total usage count of files in the files overview.'),
+    '#default_value' => variable_get('file_entity_total_count_optimization', FALSE),
+    '#description' => t('Recommended if the files admin page loads too slowly due to a high number of files.'),
+  );
+}
diff --git a/drupal7/sites/all/modules/file_entity/file_entity.pages.inc b/drupal7/sites/all/modules/file_entity/file_entity.pages.inc
index 6c1c1d8f..c4f9005c 100644
--- a/drupal7/sites/all/modules/file_entity/file_entity.pages.inc
+++ b/drupal7/sites/all/modules/file_entity/file_entity.pages.inc
@@ -827,7 +827,10 @@ function file_entity_edit_submit($form, &$form_state) {
     $replacement = $form_state['values']['replace_upload'];
     // Move file from temp to permanent home.
     if (pathinfo($replacement->uri, PATHINFO_EXTENSION) == pathinfo($file->uri, PATHINFO_EXTENSION)) {
-        file_unmanaged_copy($replacement->uri, $file->uri, FILE_EXISTS_REPLACE);
+      if ($new_file_uri = file_unmanaged_copy($replacement->uri, $file->uri, FILE_EXISTS_REPLACE)) {
+        // Remove temporary file.
+        file_delete($replacement);
+      }
     } else {
       $destination_uri = rtrim($file->uri, drupal_basename($file->uri)) . drupal_basename($replacement->uri);
       $replace_mode = $destination_uri == $file->uri ? FILE_EXISTS_REPLACE : FILE_EXISTS_RENAME;
@@ -839,8 +842,8 @@ function file_entity_edit_submit($form, &$form_state) {
 
         // Update if the uri target has changed.
         if ($new_file_uri != $file->uri) {
-         // Store the original file uri to delete if save is successful.
-         $orphaned_uri = $file->uri;
+          // Store the original file uri to delete if save is successful.
+          $orphaned_uri = $file->uri;
 
           // Update file entity uri.
           $file->uri = $new_file_uri;
diff --git a/drupal7/sites/all/modules/file_entity/tests/file_entity_test.info b/drupal7/sites/all/modules/file_entity/tests/file_entity_test.info
index 20830529..24d311fe 100644
--- a/drupal7/sites/all/modules/file_entity/tests/file_entity_test.info
+++ b/drupal7/sites/all/modules/file_entity/tests/file_entity_test.info
@@ -5,9 +5,9 @@ core = 7.x
 dependencies[] = file_entity
 hidden = TRUE
 
-; Information added by Drupal.org packaging script on 2017-07-04
-version = "7.x-2.3"
+; Information added by Drupal.org packaging script on 2017-08-10
+version = "7.x-2.4"
 core = "7.x"
 project = "file_entity"
-datestamp = "1499174351"
+datestamp = "1502334549"
 
diff --git a/drupal7/sites/all/modules/media_youtube/includes/MediaInternetYouTubeHandler.inc b/drupal7/sites/all/modules/media_youtube/includes/MediaInternetYouTubeHandler.inc
index 55f7b1f7..a5809733 100644
--- a/drupal7/sites/all/modules/media_youtube/includes/MediaInternetYouTubeHandler.inc
+++ b/drupal7/sites/all/modules/media_youtube/includes/MediaInternetYouTubeHandler.inc
@@ -14,8 +14,8 @@ class MediaInternetYouTubeHandler extends MediaInternetBaseHandler {
 
   public function parse($embedCode) {
     $list_patterns = array(
-      '@youtube\.com/playlist[#\?].*?list=([^"\& ]+)@i',
-      '@youtube\.com/view_play_list[#\?].*?p=([^"\& ]+)@i',
+      '@youtube\.com/playlist[#\?].*?list=([^"#\& ]+)@i',
+      '@youtube\.com/view_play_list[#\?].*?p=([^"#\& ]+)@i',
     );
 
     foreach ($list_patterns as $pattern) {
@@ -32,15 +32,15 @@ class MediaInternetYouTubeHandler extends MediaInternetBaseHandler {
     // http://youtu.be/*
     // http://gdata.youtube.com/feeds/api/videos/*
     $patterns = array(
-      '@youtube\.com/watch[#\?].*?v=([^"\& ]+).*&list=([^"\& ]+)@i',
-      '@youtu\.be/([^"\&\? ]+)\?list=([^"\& ]+)@i',
-      '@youtube\.com/embed/([^"\&\? ]+)\?list=([^"\& ]+)@i',
-      '@youtube\.com/watch[#\?].*?v=([^"\& ]+)@i',
-      '@youtube\.com/embed/([^"\&\? ]+)@i',
-      '@youtube\.com/v/([^"\&\? ]+)@i',
-      '@youtube\.com/\?v=([^"\& ]+)@i',
-      '@youtu\.be/([^"\&\? ]+)@i',
-      '@gdata\.youtube\.com/feeds/api/videos/([^"\&\? ]+)@i',
+      '@youtube\.com/watch[#\?].*?v=([^"#\& ]+).*&list=([^"#\& ]+)@i',
+      '@youtu\.be/([^"#\&\? ]+)\?list=([^"#\& ]+)@i',
+      '@youtube\.com/embed/([^"#\&\? ]+)\?list=([^"#\& ]+)@i',
+      '@youtube\.com/watch[#\?].*?v=([^"#\& ]+)@i',
+      '@youtube\.com/embed/([^"#\&\? ]+)@i',
+      '@youtube\.com/v/([^"#\&\? ]+)@i',
+      '@youtube\.com/\?v=([^"#\& ]+)@i',
+      '@youtu\.be/([^"#\&\? ]+)@i',
+      '@gdata\.youtube\.com/feeds/api/videos/([^"#\&\? ]+)@i',
     );
 
     foreach ($patterns as $pattern) {
@@ -51,7 +51,7 @@ class MediaInternetYouTubeHandler extends MediaInternetBaseHandler {
         $uri = 'youtube://v/' . $matches[1][0];
         if (isset($matches[2][0]) && $this->validId($matches[2][0], 'l')) {
           $uri .= '/l/' . $matches[2][0];
-         }
+        }
         return file_stream_wrapper_uri_normalize($uri);
       }
     }
diff --git a/drupal7/sites/all/modules/media_youtube/includes/MediaYouTubeStreamWrapper.inc b/drupal7/sites/all/modules/media_youtube/includes/MediaYouTubeStreamWrapper.inc
index d3d40419..46c08b6a 100644
--- a/drupal7/sites/all/modules/media_youtube/includes/MediaYouTubeStreamWrapper.inc
+++ b/drupal7/sites/all/modules/media_youtube/includes/MediaYouTubeStreamWrapper.inc
@@ -10,7 +10,7 @@
  *  $youtube = new MediaYouTubeStreamWrapper('youtube://v/[video-code]');
  */
 class MediaYouTubeStreamWrapper extends MediaReadOnlyStreamWrapper {
-  protected $base_url = 'http://www.youtube.com/watch';
+  protected $base_url = 'https://www.youtube.com/watch';
 
   static function getMimeType($uri, $mapping = NULL) {
     return 'video/youtube';
@@ -18,8 +18,12 @@ class MediaYouTubeStreamWrapper extends MediaReadOnlyStreamWrapper {
 
   function getOriginalThumbnailPath() {
     $parts = $this->get_parameters();
-    $thumbnail_url = 'http://img.youtube.com/vi/' . check_plain($parts['v']) . "/maxresdefault.jpg";
+    $thumbnail_url = 'https://img.youtube.com/vi/' . check_plain($parts['v']) . "/maxresdefault.jpg";
     $response = drupal_http_request($thumbnail_url);
+    if ($response->code == 404) {
+      $thumbnail_url = 'https://img.youtube.com/vi/' . check_plain($parts['v']) . "/hqdefault.jpg";
+      $response = drupal_http_request($thumbnail_url);
+    }
     if (!isset($response->error)) {
       return $thumbnail_url;
     }
@@ -27,7 +31,7 @@ class MediaYouTubeStreamWrapper extends MediaReadOnlyStreamWrapper {
       throw new MediaInternetValidationException("Embedding has been disabled for this video.");
     }
     elseif ($response->code == 404) {
-      return "http://s.ytimg.com/yts/img/image-hh-404-vflvCykRp.png";
+      return "https://s.ytimg.com/yts/img/image-hh-404-vflvCykRp.png";
     }
     elseif ($response->code != 200) {
       throw new MediaInternetValidationException("The YouTube video ID is invalid or the video was deleted.");
@@ -35,7 +39,7 @@ class MediaYouTubeStreamWrapper extends MediaReadOnlyStreamWrapper {
     else {
       $uri = file_stream_wrapper_uri_normalize('youtube://v/' . check_plain($parts['v']));
       $external_url = file_create_url($uri);
-      $oembed_url = url('http://www.youtube.com/oembed', array('query' => array('url' => $external_url, 'format' => 'json')));
+      $oembed_url = url('https://www.youtube.com/oembed', array('query' => array('url' => $external_url, 'format' => 'json')));
       $response = drupal_http_request($oembed_url);
 
       if (!isset($response->error)) {
@@ -65,7 +69,7 @@ class MediaYouTubeStreamWrapper extends MediaReadOnlyStreamWrapper {
           file_unmanaged_save_data($response->data, $local_path, TRUE);
         }
         else {
-          @copy($this->getOriginalThumbnailPath(), $local_path);
+          system_retrieve_file($this->getOriginalThumbnailPath(), $local_path, FALSE, FILE_EXISTS_REPLACE);
         }
       }
       catch (Exception $e) {
@@ -86,7 +90,7 @@ class MediaYouTubeStreamWrapper extends MediaReadOnlyStreamWrapper {
   function setBaseUrl($parameters) {
     if (isset($parameters['l'])) {
       if (!isset($parameters['v'])) {
-        $this->base_url = 'http://youtube.com/playlist';
+        $this->base_url = 'https://youtube.com/playlist';
       }
       $parameters['list'] = $parameters['l'];
       unset($parameters['l']);
diff --git a/drupal7/sites/all/modules/media_youtube/includes/media_youtube.formatters.inc b/drupal7/sites/all/modules/media_youtube/includes/media_youtube.formatters.inc
index 87dc0612..639a3395 100644
--- a/drupal7/sites/all/modules/media_youtube/includes/media_youtube.formatters.inc
+++ b/drupal7/sites/all/modules/media_youtube/includes/media_youtube.formatters.inc
@@ -29,6 +29,7 @@ function media_youtube_file_formatter_info() {
       'showinfo' => TRUE,
       'theme' => 'dark',
       'captions' => FALSE,
+      'controls' => FALSE,
     ),
     'view callback' => 'media_youtube_file_formatter_video_view',
     'settings callback' => 'media_youtube_file_formatter_video_settings',
@@ -66,7 +67,7 @@ function media_youtube_file_formatter_video_view($file, $display, $langcode) {
     // Fake a default for attributes so the ternary doesn't choke.
     $display['settings']['attributes'] = array();
 
-    foreach (array('width', 'height', 'autohide', 'autoplay', 'color', 'enablejsapi', 'loop', 'modestbranding', 'nocookie', 'origin', 'protocol', 'protocol_specify', 'rel', 'showinfo', 'theme', 'attributes', 'captions') as $setting) {
+    foreach (array('width', 'height', 'autohide', 'autoplay', 'color', 'enablejsapi', 'loop', 'modestbranding', 'nocookie', 'origin', 'protocol', 'protocol_specify', 'rel', 'showinfo', 'theme', 'attributes', 'captions','controls') as $setting) {
       $element['#options'][$setting] = isset($file->override[$setting]) ? $file->override[$setting] : $display['settings'][$setting];
     }
 
@@ -146,6 +147,11 @@ function media_youtube_file_formatter_video_settings($form, &$form_state, $setti
     '#type' => 'checkbox',
     '#default_value' => $settings['loop'],
   );
+  $element['controls'] = array(
+    '#title' => t('Show Controls'),
+    '#type' => 'checkbox',
+    '#default_value' => $settings['controls'],
+  );
 
   // Note: make sure the positive/negative language lines up with option
   // processing in media_youtube.theme.inc.
diff --git a/drupal7/sites/all/modules/media_youtube/media_youtube.info b/drupal7/sites/all/modules/media_youtube/media_youtube.info
index ce6e752c..e6d86203 100644
--- a/drupal7/sites/all/modules/media_youtube/media_youtube.info
+++ b/drupal7/sites/all/modules/media_youtube/media_youtube.info
@@ -11,9 +11,9 @@ files[] = media_youtube.test
 files[] = includes/MediaYouTubeStreamWrapper.inc
 files[] = includes/MediaInternetYouTubeHandler.inc
 
-; Information added by Drupal.org packaging script on 2017-06-09
-version = "7.x-3.4"
+; Information added by Drupal.org packaging script on 2017-08-14
+version = "7.x-3.5"
 core = "7.x"
 project = "media_youtube"
-datestamp = "1497020345"
+datestamp = "1502719245"
 
diff --git a/drupal7/sites/all/modules/media_youtube/tests/media_youtube_test.info b/drupal7/sites/all/modules/media_youtube/tests/media_youtube_test.info
index d577d887..a1cc74b9 100644
--- a/drupal7/sites/all/modules/media_youtube/tests/media_youtube_test.info
+++ b/drupal7/sites/all/modules/media_youtube/tests/media_youtube_test.info
@@ -8,9 +8,9 @@ hidden = TRUE
 files[] = includes/MediaYouTubeTestStreamWrapper.inc
 files[] = includes/MediaYouTubeTestHandler.inc
 
-; Information added by Drupal.org packaging script on 2017-06-09
-version = "7.x-3.4"
+; Information added by Drupal.org packaging script on 2017-08-14
+version = "7.x-3.5"
 core = "7.x"
 project = "media_youtube"
-datestamp = "1497020345"
+datestamp = "1502719245"
 
diff --git a/drupal7/sites/all/modules/media_youtube/themes/media_youtube.theme.inc b/drupal7/sites/all/modules/media_youtube/themes/media_youtube.theme.inc
index 86d286b8..85aa6205 100644
--- a/drupal7/sites/all/modules/media_youtube/themes/media_youtube.theme.inc
+++ b/drupal7/sites/all/modules/media_youtube/themes/media_youtube.theme.inc
@@ -12,16 +12,24 @@
 function media_youtube_preprocess_media_youtube_video(&$variables) {
   // Build the URI.
   $wrapper = file_stream_wrapper_get_instance_by_uri($variables['uri']);
-  $parts = $wrapper->get_parameters();
-  if (isset($parts['v'])) {
-    $variables['embed_type'] = 'video';
-    $variables['video_id'] = check_plain($parts['v']);
-    $embed_path = '/embed/' . $variables['video_id'];
+  if ($wrapper instanceof MediaReadOnlyStreamWrapper) {
+    $parts = $wrapper->get_parameters();
+    if (isset($parts['v'])) {
+      $variables['embed_type'] = 'video';
+      $variables['video_id'] = check_plain($parts['v']);
+      $embed_path = '/embed/' . $variables['video_id'];
+    }
+    elseif (isset($parts['l'])) {
+      $variables['embed_type'] = 'playlist';
+      $variables['video_id'] = check_plain($parts['l']);
+      $embed_path = '/embed/videoseries';
+    }
   }
-  elseif (isset($parts['l'])) {
-    $variables['embed_type'] = 'playlist';
-    $variables['video_id'] = check_plain($parts['l']);
-    $embed_path = '/embed/videoseries';
+  else {
+    // This happens when stream wrappers are not yet initialized. This is
+    // normally only encountered when creating content during profile install
+    // using drush make. At that point, video_id is irrelevant anyway.
+    $variables['video_id'] = '';
   }
 
   // Checked existing function.
@@ -42,6 +50,14 @@ function media_youtube_preprocess_media_youtube_video(&$variables) {
   // Make css z-index work with flash object. Must be the first parameter.
   $query['wmode'] = 'opaque';
 
+  //YouTube video controls, on or off.
+  if (isset($variables['options']['controls'])) {
+    //on or off (TRUE/FALSE) depending on what is stored in $variables['options']['controls'].
+    $query['controls'] = $variables['options']['controls'];
+  } else {
+    //on
+    $query['controls'] = TRUE;
+  }
   // These queries default to 0. If the option is true, set value to 1.
   foreach (array('autoplay', 'enablejsapi', 'loop', 'modestbranding') as $option) {
     if ($variables['options'][$option]) {
diff --git a/drupal7/sites/all/modules/views/includes/ajax.inc b/drupal7/sites/all/modules/views/includes/ajax.inc
index 4b8825a6..90e4ca9b 100644
--- a/drupal7/sites/all/modules/views/includes/ajax.inc
+++ b/drupal7/sites/all/modules/views/includes/ajax.inc
@@ -40,7 +40,7 @@ function views_ajax() {
 
     // Load the view.
     $view = views_get_view($name);
-    if ($view && $view->access($display_id)) {
+    if ($view && $view->access($display_id) && $view->set_display($display_id) && $view->display_handler->use_ajax()) {
       // Fix 'q' for paging.
       if (!empty($path)) {
         $_GET['q'] = $path;
diff --git a/drupal7/sites/all/modules/views/tests/views_ajax.test b/drupal7/sites/all/modules/views/tests/views_ajax.test
new file mode 100644
index 00000000..3f553db4
--- /dev/null
+++ b/drupal7/sites/all/modules/views/tests/views_ajax.test
@@ -0,0 +1,109 @@
+<?php
+
+/**
+ * @file
+ * Definition of ViewsAjaxTest.
+ */
+
+/**
+ * Tests views ajax display.
+ */
+class ViewsAjaxTest extends ViewsSqlTest {
+  public static function getInfo() {
+    return array(
+      'name' => 'Ajax',
+      'description' => 'Test views with and without ajax enabled.',
+      'group' => 'Views Handlers',
+    );
+  }
+
+  public function setUp() {
+    parent::setUp('views', 'views_test');
+    // Create a second node.
+    $this->drupalCreateNode(array('type' => 'article', 'status' => NODE_PUBLISHED));
+  }
+
+  /**
+   * Perform a simple AJAX POST HTTP request.
+   *
+   * @param string $path
+   *   Drupal path where the request should be POSTed.
+   * @param string $accept
+   *   The value for the "Accept" header. Usually either 'application/json' or
+   *   'application/vnd.drupal-ajax'.
+   * @param array $post
+   *   The POST data. When making a 'application/vnd.drupal-ajax' request, the
+   *   Ajax page state data should be included. Use getAjaxPageStatePostData()
+   *   for that.
+   *
+   * @return
+   *   The content returned from the call to curl_exec().
+   */
+  public function simpleAjaxPost($path, $accept, $post = array()) {
+    $options['absolute'] = TRUE;
+    foreach ($post as $key => $value) {
+      // Encode according to application/x-www-form-urlencoded
+      // Both names and values needs to be urlencoded, according to
+      // http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1
+      $post[$key] = urlencode($key) . '=' . urlencode($value);
+    }
+    $postfields = implode('&', $post);
+    $headers = array(
+      'Accept: ' . $accept,
+      'Content-Type: application/x-www-form-urlencoded',
+    );
+    return $this->curlExec(array(
+      CURLOPT_URL => url($path, $options),
+      CURLOPT_POST => TRUE,
+      CURLOPT_POSTFIELDS => $postfields,
+      CURLOPT_HTTPHEADER => $headers,
+    ));
+  }
+
+  /**
+   * Tests an ajax and non-ajax view.
+   */
+  public function testAjaxView() {
+    $this->drupalCreateNode();
+    $this->drupalGet('test_ajax_view');
+    $drupal_settings = $this->drupalGetSettings();
+    $this->assertTrue(isset($drupal_settings['views']['ajax_path']), 'The Ajax callback path is set in drupalSettings.');
+    $this->assertEqual(count($drupal_settings['views']['ajaxViews']), 1);
+    $view_entry = current(array_keys($drupal_settings['views']['ajaxViews']));
+    $this->assertEqual($drupal_settings['views']['ajaxViews'][$view_entry]['view_name'], 'test_ajax_view', 'The view\'s ajaxViews array entry has the correct \'view_name\' key.');
+    $this->assertEqual($drupal_settings['views']['ajaxViews'][$view_entry]['view_display_id'], 'page_1', 'The view\'s ajaxViews array entry has the correct \'view_display_id\' key.');
+
+    $post = [
+      'view_name' => 'test_ajax_view',
+      'view_display_id' => 'page_1',
+    ];
+
+    $response = $this->simpleAjaxPost('views/ajax', 'application/json', $post);
+    $data = drupal_json_decode($response);
+
+    $this->assertTrue(isset($data[0]['settings']['views']['ajaxViews']));
+
+    // Ensure that the view insert command is part of the result.
+    $this->assertEqual($data[1]['command'], 'insert');
+    $this->assertTrue(strpos($data[1]['selector'], '.view-dom-id-') === 0);
+
+    $this->drupalSetContent($data[1]['data']);
+    $result = $this->xpath('//div[contains(@class, "views-row")]');
+    $this->assertEqual(count($result), 2, 'Ensure that two items are rendered in the HTML.');
+
+    $post = [
+      'view_name' => 'test_noajax_view',
+      'view_display_id' => 'default',
+    ];
+
+    $response = $this->simpleAjaxPost('views/ajax', 'application/json', $post);
+    $data = drupal_json_decode($response);
+    // In Drupal 7 we get an ajax response with no commands instead of a 403 if
+    // the view cannot be accessed.
+    foreach ($data as $item) {
+      $this->assertIdentical('settings', $item['command']);
+      $this->assertTrue(empty($item['data']));
+    }
+  }
+
+}
diff --git a/drupal7/sites/all/modules/views/tests/views_test.info b/drupal7/sites/all/modules/views/tests/views_test.info
index b7864a8d..592df6f0 100644
--- a/drupal7/sites/all/modules/views/tests/views_test.info
+++ b/drupal7/sites/all/modules/views/tests/views_test.info
@@ -5,9 +5,9 @@ core = 7.x
 dependencies[] = views
 hidden = TRUE
 
-; Information added by Drupal.org packaging script on 2017-04-02
-version = "7.x-3.16"
+; Information added by Drupal.org packaging script on 2017-08-16
+version = "7.x-3.17"
 core = "7.x"
 project = "views"
-datestamp = "1491158591"
+datestamp = "1502903349"
 
diff --git a/drupal7/sites/all/modules/views/tests/views_test.views_default.inc b/drupal7/sites/all/modules/views/tests/views_test.views_default.inc
index 8843b26a..f19f34ad 100644
--- a/drupal7/sites/all/modules/views/tests/views_test.views_default.inc
+++ b/drupal7/sites/all/modules/views/tests/views_test.views_default.inc
@@ -1,3 +1,4 @@
+
 <?php
 
 /**
@@ -274,5 +275,57 @@ function views_test_views_default_views() {
 
   $views[$view->name] = $view;
 
+  $view = new view();
+  $view->name = 'test_ajax_view';
+  $view->description = '';
+  $view->tag = '';
+  $view->base_table = 'node';
+  $view->human_name = '';
+  $view->core = 0;
+  $view->api_version = '3.0';
+  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
+
+  /* Display: Master */
+  $handler = $view->new_display('default', 'Master', 'default');
+  $handler->display->display_options['use_ajax'] = TRUE;
+  $handler->display->display_options['use_more_always'] = FALSE;
+  $handler->display->display_options['access']['type'] = 'none';
+  $handler->display->display_options['cache']['type'] = 'none';
+  $handler->display->display_options['query']['type'] = 'views_query';
+  $handler->display->display_options['exposed_form']['type'] = 'basic';
+  $handler->display->display_options['pager']['type'] = 'none';
+  $handler->display->display_options['style_plugin'] = 'default';
+  $handler->display->display_options['row_plugin'] = 'node';
+
+  /* Display: Page */
+  $handler = $view->new_display('page', 'Page', 'page_1');
+  $handler->display->display_options['path'] = 'test_ajax_view';
+
+  $views[$view->name] = $view;
+
+  $view = new view();
+  $view->name = 'test_noajax_view';
+  $view->description = '';
+  $view->tag = '';
+  $view->base_table = 'node';
+  $view->human_name = '';
+  $view->core = 0;
+  $view->api_version = '3.0';
+  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
+
+  /* Display: Master */
+  $handler = $view->new_display('default', 'Master', 'default');
+  $handler->display->display_options['use_ajax'] = FALSE;
+  $handler->display->display_options['use_more_always'] = FALSE;
+  $handler->display->display_options['access']['type'] = 'none';
+  $handler->display->display_options['cache']['type'] = 'none';
+  $handler->display->display_options['query']['type'] = 'views_query';
+  $handler->display->display_options['exposed_form']['type'] = 'basic';
+  $handler->display->display_options['pager']['type'] = 'none';
+  $handler->display->display_options['style_plugin'] = 'default';
+  $handler->display->display_options['row_plugin'] = 'node';
+
+  $views[$view->name] = $view;
+
   return $views;
 }
diff --git a/drupal7/sites/all/modules/views/views.info b/drupal7/sites/all/modules/views/views.info
index fc903ed3..eabac635 100644
--- a/drupal7/sites/all/modules/views/views.info
+++ b/drupal7/sites/all/modules/views/views.info
@@ -301,6 +301,7 @@ files[] = tests/styles/views_plugin_style_unformatted.test
 files[] = tests/views_access.test
 files[] = tests/views_analyze.test
 files[] = tests/views_basic.test
+files[] = tests/views_ajax.test
 files[] = tests/views_argument_default.test
 files[] = tests/views_argument_validator.test
 files[] = tests/views_exposed_form.test
@@ -327,9 +328,9 @@ files[] = tests/views_cache.test
 files[] = tests/views_view.test
 files[] = tests/views_ui.test
 
-; Information added by Drupal.org packaging script on 2017-04-02
-version = "7.x-3.16"
+; Information added by Drupal.org packaging script on 2017-08-16
+version = "7.x-3.17"
 core = "7.x"
 project = "views"
-datestamp = "1491158591"
+datestamp = "1502903349"
 
diff --git a/drupal7/sites/all/modules/views/views_ui.info b/drupal7/sites/all/modules/views/views_ui.info
index 3bc37d5b..6c99a3e6 100644
--- a/drupal7/sites/all/modules/views/views_ui.info
+++ b/drupal7/sites/all/modules/views/views_ui.info
@@ -7,9 +7,9 @@ dependencies[] = views
 files[] = views_ui.module
 files[] = plugins/views_wizard/views_ui_base_views_wizard.class.php
 
-; Information added by Drupal.org packaging script on 2017-04-02
-version = "7.x-3.16"
+; Information added by Drupal.org packaging script on 2017-08-16
+version = "7.x-3.17"
 core = "7.x"
 project = "views"
-datestamp = "1491158591"
+datestamp = "1502903349"
 
