Révision 8be7bf84
Ajouté par Assos Assos il y a plus de 5 ans
drupal7/sites/all/modules/views/includes/ajax.inc | ||
---|---|---|
18 | 18 |
if (isset($_REQUEST['view_name']) && isset($_REQUEST['view_display_id'])) { |
19 | 19 |
$name = $_REQUEST['view_name']; |
20 | 20 |
$display_id = $_REQUEST['view_display_id']; |
21 |
$args = isset($_REQUEST['view_args']) && $_REQUEST['view_args'] !== '' ? explode('/', $_REQUEST['view_args']) : array();
|
|
22 |
$path = isset($_REQUEST['view_path']) ? rawurldecode($_REQUEST['view_path']) : NULL;
|
|
21 |
$args = isset($_REQUEST['view_args']) && $_REQUEST['view_args'] !== '' ? explode('/', htmlspecialchars_decode($_REQUEST['view_args'], ENT_QUOTES)) : array();
|
|
22 |
$path = isset($_REQUEST['view_path']) ? htmlspecialchars_decode($_REQUEST['view_path'], ENT_QUOTES) : NULL;
|
|
23 | 23 |
$dom_id = isset($_REQUEST['view_dom_id']) ? preg_replace('/[^a-zA-Z0-9_-]+/', '-', $_REQUEST['view_dom_id']) : NULL; |
24 | 24 |
$pager_element = isset($_REQUEST['pager_element']) ? intval($_REQUEST['pager_element']) : NULL; |
25 | 25 |
|
... | ... | |
72 | 72 |
// Reuse the same DOM id so it matches that in Drupal.settings. |
73 | 73 |
$view->dom_id = $dom_id; |
74 | 74 |
|
75 |
$commands[] = ajax_command_replace('.view-dom-id-' . $dom_id, $view->preview($display_id, $args)); |
|
75 |
// Always return HTML with the same DOM ID that was sent by the browser. |
|
76 |
$commands[] = ajax_command_replace('.view-dom-id-' . $dom_id, preg_replace('/view-dom-id-[a-zA-Z0-9_-]+/', 'view-dom-id-' . $view->dom_id, $view->preview($display_id, $args), 1)); |
|
76 | 77 |
} |
77 | 78 |
drupal_alter('views_ajax_data', $commands, $view); |
78 | 79 |
return array('#type' => 'ajax', '#commands' => $commands); |
Formats disponibles : Unified diff
Weekly update of contrib modules