Skip to content

Commit 5bfceae

Browse files
committed
Remove unnecessary stuff
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
1 parent 548edd4 commit 5bfceae

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

src/Controllers/Import/ImportController.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -187,27 +187,16 @@ public function __invoke(ServerRequest $request): void
187187
$this->response->addJSON('console_message_id', $consoleMessageId);
188188
}
189189

190-
/**
191-
* Sets globals from $_POST patterns, for import plugins
192-
* We only need to load the selected plugin
193-
*/
194-
195190
if (! in_array($format, ['csv', 'ldi', 'mediawiki', 'ods', 'shp', 'sql', 'xml'], true)) {
196-
// this should not happen for a normal user
197-
// but only during an attack
198191
$this->response->setRequestStatus(false);
199192
$this->response->addHTML(Message::error(__('Incorrect format parameter'))->getDisplay());
200193

201194
return;
202195
}
203196

204197
$postPatterns = ['/^' . $format . '_/'];
205-
206198
Core::setPostAsGlobal($postPatterns);
207199

208-
// We don't want anything special in format
209-
$format = Core::securePath($format);
210-
211200
if (Current::$table !== '' && Current::$database !== '') {
212201
$GLOBALS['urlParams'] = ['db' => Current::$database, 'table' => Current::$table];
213202
} elseif (Current::$database !== '') {

0 commit comments

Comments
 (0)