Browse Source

[up] Views 7.x-3.15

opi 8 years ago
parent
commit
01066e820b

+ 1 - 1
sites/all/modules/views/includes/handlers.inc

@@ -1588,7 +1588,7 @@ class views_join {
             $extras[] = $extra;
           }
           // Otherwise - and if we have a value - use it for a field-to-value condition.
-          elseif (!empty($info['value'])) {
+          elseif (isset($info['value'])) {
             // Convert a single-valued array of values to the single-value case,
             // and transform from IN() notation to = notation
             if (is_array($info['value']) && count($info['value']) == 1) {

+ 5 - 0
sites/all/modules/views/js/base.js

@@ -64,6 +64,11 @@ Drupal.Views.parseQueryString = function (query) {
  * Helper function to return a view's arguments based on a path.
  */
 Drupal.Views.parseViewArgs = function (href, viewPath) {
+
+  // Provide language prefix.
+  if (Drupal.settings.pathPrefix) {
+    var viewPath = Drupal.settings.pathPrefix + viewPath;
+  }
   var returnObj = {};
   var path = Drupal.Views.getPath(href);
   // Ensure we have a correct path.

+ 1 - 0
sites/all/modules/views/modules/taxonomy/views_handler_argument_term_node_tid.inc

@@ -38,6 +38,7 @@ class views_handler_argument_term_node_tid extends views_handler_argument_many_t
   function title_query() {
     $titles = array();
     $result = db_select('taxonomy_term_data', 'td')
+      ->addTag('term_access')
       ->fields('td', array('name'))
       ->condition('td.tid', $this->value)
       ->execute();

+ 5 - 0
sites/all/modules/views/modules/taxonomy/views_handler_field_taxonomy.inc

@@ -22,6 +22,7 @@ class views_handler_field_taxonomy extends views_handler_field {
     parent::construct();
     $this->additional_fields['vid'] = 'vid';
     $this->additional_fields['tid'] = 'tid';
+    $this->additional_fields['name'] = 'name';
     $this->additional_fields['vocabulary_machine_name'] = array(
       'table' => 'taxonomy_vocabulary',
       'field' => 'machine_name',
@@ -65,9 +66,13 @@ class views_handler_field_taxonomy extends views_handler_field {
       $term = new stdClass();
       $term->tid = $tid;
       $term->vid = $this->get_value($values, 'vid');
+      $term->name = $this->get_value($values, 'name');
       $term->vocabulary_machine_name = $values->{$this->aliases['vocabulary_machine_name']};
       $this->options['alter']['make_link'] = TRUE;
       $uri = entity_uri('taxonomy_term', $term);
+      if (isset($uri['options'])) {
+        $this->options['alter'] = array_merge($this->options['alter'], $uri['options']);
+      }
       $this->options['alter']['path'] = $uri['path'];
     }
 

+ 3 - 0
sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc

@@ -139,6 +139,7 @@ class views_plugin_argument_validate_taxonomy_term extends views_plugin_argument
         // if unverified tids left - verify them and cache results
         if (count($test)) {
           $query = db_select('taxonomy_term_data', 'td');
+          $query->addTag('term_access');
           $query->leftJoin('taxonomy_vocabulary', 'tv', 'td.vid = tv.vid');
           $query->fields('td');
           $query->fields('tv', array('machine_name'));
@@ -167,6 +168,7 @@ class views_plugin_argument_validate_taxonomy_term extends views_plugin_argument
       case 'name':
       case 'convert':
         $query = db_select('taxonomy_term_data', 'td');
+        $query->addTag('term_access');
         $query->leftJoin('taxonomy_vocabulary', 'tv', 'td.vid = tv.vid');
         $query->fields('td');
         $query->fields('tv', array('machine_name'));
@@ -202,6 +204,7 @@ class views_plugin_argument_validate_taxonomy_term extends views_plugin_argument
       $arg_keys = array_flip($args);
 
       $query = db_select('taxonomy_term_data', 'td');
+      $query->addTag('term_access');
       $query->condition('tid', $args);
       $query->addField('td', 'tid', 'tid');
       if (!empty($vocabularies)) {

+ 9 - 1
sites/all/modules/views/plugins/views_plugin_cache.inc

@@ -289,7 +289,14 @@ class views_plugin_cache extends views_plugin {
 
   function get_results_key() {
     if (!isset($this->_results_key)) {
-      $this->_results_key = $this->view->name . ':' . $this->display->id . ':results:' . $this->get_cache_key();
+      $key_data = array();
+      foreach (array('exposed_info', 'page', 'sort', 'order', 'items_per_page', 'offset') as $key) {
+        if (isset($_GET[$key])) {
+          $key_data[$key] = $_GET[$key];
+        }
+      }
+
+      $this->_results_key = $this->view->name . ':' . $this->display->id . ':results:' . $this->get_cache_key($key_data);
     }
 
     return $this->_results_key;
@@ -298,6 +305,7 @@ class views_plugin_cache extends views_plugin {
   function get_output_key() {
     if (!isset($this->_output_key)) {
       $key_data = array(
+        'result' => $this->view->result,
         'theme' => $GLOBALS['theme'],
       );
       $this->_output_key = $this->view->name . ':' . $this->display->id . ':output:' . $this->get_cache_key($key_data);

+ 2 - 2
sites/all/modules/views/plugins/views_plugin_cache_time.inc

@@ -41,7 +41,7 @@ class views_plugin_cache_time extends views_plugin_cache {
       '#maxlength' => '30',
       '#description' => t('Length of time in seconds raw query results should be cached.'),
       '#default_value' => $this->options['results_lifespan_custom'],
-      '#process' => array('form_process_select','ctools_dependent_process'),
+      '#process' => array('ctools_dependent_process'),
       '#dependency' => array(
         'edit-cache-options-results-lifespan' => array('custom'),
       ),
@@ -60,7 +60,7 @@ class views_plugin_cache_time extends views_plugin_cache {
       '#maxlength' => '30',
       '#description' => t('Length of time in seconds rendered HTML output should be cached.'),
       '#default_value' => $this->options['output_lifespan_custom'],
-      '#process' => array('form_process_select','ctools_dependent_process'),
+      '#process' => array('ctools_dependent_process'),
       '#dependency' => array(
         'edit-cache-options-output-lifespan' => array('custom'),
       ),

+ 4 - 0
sites/all/modules/views/plugins/views_plugin_display_page.inc

@@ -118,6 +118,8 @@ class views_plugin_display_page extends views_plugin_display {
         'access arguments' => $access_arguments,
         // Identify URL embedded arguments and correlate them to a handler
         'load arguments'  => array($this->view->name, $this->display->id, '%index'),
+        // Make sure the menu router knows where views_page is.
+        'module' => 'views',
       );
       $menu = $this->get_option('menu');
       if (empty($menu)) {
@@ -182,6 +184,8 @@ class views_plugin_display_page extends views_plugin_display {
               'title' => $tab_options['title'],
               'description' => $tab_options['description'],
               'menu_name' => $tab_options['name'],
+              // Make sure the menu router knows where views_page is.
+              'module' => 'views',
             );
             switch ($tab_options['type']) {
               default:

+ 1 - 1
sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc

@@ -146,7 +146,7 @@ class views_plugin_style_jump_menu extends views_plugin_style {
       $lookup_options = array();
       // We need to check if the path is absolute
       // or else language is not taken in account.
-      if ($this->view->display[$this->view->current_display]->display_options['fields'][$this->options['path']]['absolute']) {
+      if (!empty($this->view->display[$this->view->current_display]->display_options['fields'][$this->options['path']]['absolute'])) {
         $lookup_options['absolute'] = TRUE;
       }
       $lookup_url = url($_GET['q'], $lookup_options);

+ 3 - 3
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 2016-06-15
-version = "7.x-3.14"
+; Information added by Drupal.org packaging script on 2017-02-22
+version = "7.x-3.15"
 core = "7.x"
 project = "views"
-datestamp = "1466019588"
+datestamp = "1487784193"
 

+ 3 - 3
sites/all/modules/views/views.info

@@ -328,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 2016-06-15
-version = "7.x-3.14"
+; Information added by Drupal.org packaging script on 2017-02-22
+version = "7.x-3.15"
 core = "7.x"
 project = "views"
-datestamp = "1466019588"
+datestamp = "1487784193"
 

+ 3 - 3
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 2016-06-15
-version = "7.x-3.14"
+; Information added by Drupal.org packaging script on 2017-02-22
+version = "7.x-3.15"
 core = "7.x"
 project = "views"
-datestamp = "1466019588"
+datestamp = "1487784193"