Browse Source

fixed advanced search first rquest bug (bois+translucide) fix #31

Bachir Soussi Chiadmi 6 years ago
parent
commit
243f5b689c

+ 2 - 1
sites/all/modules/gui/materiobasemod/materio_search_api_ajax.pages.inc

@@ -23,6 +23,7 @@ function materio_search_api_ajax_search($page = 0){
   $keys_encoded = rawurlencode($keys);
 
   $path = $search_path . '/' . $keys;//. ($page ? '?page='.$page : '');
+  $encoded_path = $search_path . '/' . $keys_encoded;
 
   // check if request is ajax, if not rediret to search_api_page page with right keys
   if (!$debug && (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) != 'xmlhttprequest')) {
@@ -70,7 +71,7 @@ function materio_search_api_ajax_search($page = 0){
     // dsm($matches, '$matches');
     if($cur_is_search_path === false){
       $rep = array(
-        "redirect" => $base_url.base_path().$prefix.$path,
+        "redirect" => $base_url.base_path().$prefix.$encoded_path,
       );
       drupal_json_output($rep);
       exit;