Projet

Général

Profil

Révision 4003efde

Ajouté par Assos Assos il y a environ 4 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/views/includes/ajax.inc
26 26
    $commands = array();
27 27

  
28 28
    // Remove all of this stuff from $_GET so it doesn't end up in pagers and
29
    // tablesort URLs.
29
    // tablesort URLs; do not modify $_POST itself but make a new "clean"
30
    // copy to merge it with $_GET later.
31
    $cleaned_post = $_POST;
30 32
    foreach (array('view_name', 'view_display_id', 'view_args', 'view_path', 'view_dom_id', 'pager_element', 'view_base_path', 'ajax_html_ids', 'ajax_page_state') as $key) {
31 33
      if (isset($_GET[$key])) {
32 34
        unset($_GET[$key]);
......
34 36
      if (isset($_REQUEST[$key])) {
35 37
        unset($_REQUEST[$key]);
36 38
      }
37
      if (isset($_POST[$key])) {
38
        unset($_POST[$key]);
39
      if (isset($cleaned_post[$key])) {
40
        unset($cleaned_post[$key]);
39 41
      }
40 42
    }
41 43

  
......
52 54
      $exclude = isset($_POST['page']) ? array('page') : array();
53 55
      // Add all $_POST data to $_GET as many things, such as tablesorts,
54 56
      // exposed filters and paging assume $_GET.
55
      $_GET = $_POST + drupal_get_query_parameters($_GET, $exclude);
57
      $_GET = $cleaned_post + drupal_get_query_parameters($_GET, $exclude);
56 58

  
57 59
      // Overwrite the destination.
58 60
      // @see drupal_get_destination()

Formats disponibles : Unified diff