|
|
@@ -176,8 +176,14 @@ class Api_WfsDataServer extends Api_WfsServerBase {
|
|
|
$searchParams['order_dir'] = 'DESC';
|
|
|
}
|
|
|
if (strlen($args['ogc:filter']) > 0) $searchParams['ogc:Filter'] = $args['ogc:filter'];
|
|
|
- if (!empty($args['filterFields'])) $searchParams['cols'] = $args['filterFields'];// PropertyName
|
|
|
- if (!empty($args['primaryKey'])) $searchParams['primaryKey'] = $args['primaryKey'];// featureID
|
|
|
+ if (!empty($args['filterFields'])) $searchParams['cols'] = $args['filterFields']; // PropertyName
|
|
|
+ if (!empty($args['primaryKey'])) $searchParams['primaryKey'] = $args['primaryKey'];
|
|
|
+ if (!empty($args['xlink'])) {
|
|
|
+ $expectedUrl = Api_WfsNs::getBaseWfsUri() . "/" . $acl->getNamespace() . ".";
|
|
|
+ if ($expectedUrl !== substr($args['xlink'], 0, strlen($expectedUrl))) throw new Exception("Wrong xlink url");
|
|
|
+ $primaryKey = substr($args['xlink'], strlen($expectedUrl));
|
|
|
+ $searchParams['primaryKey'] = $primaryKey;
|
|
|
+ }
|
|
|
if (!empty($args['bbox'])) $searchParams['f_the_geom'] = "BBOX:{$args['bbox']}";
|
|
|
|
|
|
DBG::log($args, 'array', "\$args");
|