Просмотр исходного кода

Remove ajax parameter when modifying the request (#4743)

Before, when clicking on the author name to use as a filter, the displayed page
was a result page from the ajax query. This was due to the use of the ajax
parameter in the query.
Now, the ajax parameter is removed from the query before displaying the filters.

Fix #4726
Alexis Degrugillier 3 лет назад
Родитель
Сommit
0fd608420e
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      lib/Minz/Request.php

+ 1 - 0
lib/Minz/Request.php

@@ -98,6 +98,7 @@ class Minz_Request {
 		return self::$originalRequest;
 		return self::$originalRequest;
 	}
 	}
 	public static function modifiedCurrentRequest(array $extraParams = null) {
 	public static function modifiedCurrentRequest(array $extraParams = null) {
+		unset(self::$params['ajax']);
 		$currentRequest = self::currentRequest();
 		$currentRequest = self::currentRequest();
 		if (null !== $extraParams) {
 		if (null !== $extraParams) {
 			$currentRequest['params'] = array_merge($currentRequest['params'], $extraParams);
 			$currentRequest['params'] = array_merge($currentRequest['params'], $extraParams);