Always pass the actual request to the data controller.

This commit is contained in:
David Molineus
2015-01-12 23:22:19 +01:00
parent 037c6c907d
commit 0b36b45e61
2 changed files with 27 additions and 1 deletions

View File

@@ -53,8 +53,25 @@ class RequestUrl
->setPath($path)
->setQueryParameter('type', $type ?: 'layer')
->setQueryParameter('format', $format ?: 'geojson')
->setQueryParameter('id', $dataId);
->setQueryParameter('id', $dataId)
->setQueryParameter('page', rawurlencode(base64_encode(self::getRequestUri())));
return $builder;
}
/**
* Get the request uri without leading slash.
*
* @return mixed
*/
protected static function getRequestUri()
{
$uri = \Environment::get('requestUri');
if (strpos($uri, '/') === 0) {
return substr($uri, 1);
}
return $uri;
}
}