Skip to content

Commit f2695f5

Browse files
committed
Fix phpStan errors
1 parent 079c1a3 commit f2695f5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lizmap/modules/lizmap/controllers/datatables.classic.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ class datatablesCtrl extends jController
1717
{
1818
public function index()
1919
{
20-
$rep = $this->getResponse('binary');
21-
$rep->outputFileName = 'datatables.json';
22-
$rep->mimeType = 'application/json';
20+
/** @var jResponseJson $rep */
21+
$rep = $this->getResponse('json');
2322

2423
// Lizmap parameters
2524
$repository = $this->param('repository');
@@ -58,6 +57,8 @@ public function index()
5857
}
5958

6059
$lproj = lizmap::getProject($repository.'~'.$project);
60+
61+
/** @var qgisVectorLayer $layer */
6162
$layer = $lproj->getLayer($layerId);
6263
$typeName = $layer->getWfsTypeName();
6364

@@ -128,6 +129,8 @@ public function index()
128129
$value2 = isset($criteria['value2']) ? addslashes($criteria['value2']) : '';
129130

130131
// Map DataTables operators to QGIS Server operators
132+
$qgisOperator = '';
133+
131134
switch ($condition) {
132135
case '=':
133136
case '!=':
@@ -271,7 +274,7 @@ public function index()
271274
'editableFeatures' => $editableFeaturesRep,
272275
);
273276

274-
$rep->content = json_encode($returnedData);
277+
$rep->data = json_encode($returnedData);
275278

276279
return $rep;
277280
}

0 commit comments

Comments
 (0)