bobosch / ods_osm

TYPO3 Extension OpenStreetMap
10 stars 22 forks source link

limitation to fe_group leads to a SQL Error #54

Closed mario-seidel closed 4 years ago

mario-seidel commented 4 years ago

In this line the where clause is missing: https://github.com/bobosch/ods_osm/blob/a0897ac970f2ce3f790af2635c59be8e1c07810c/Classes/Controller/PluginController.php#L271

And cause this error if fe_group is selected in plugin: An exception occurred while executing 'SELECT * FROMfe_usersFIND_IN_SET("7",usergroup) AND (fe_users.deleted= 0) AND (fe_users.disable= 0) AND (fe_users.starttime<= 1594136880) AND ((fe_users.endtime= 0) OR (fe_users.endtime> 1594136880)) AND fe_users.pid>=0': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '("7",usergroup) AND (fe_users.deleted= 0) AND (fe_users.disable= 0) AN' at line 1

maybe should be:

$res2 = $connection2->executeQuery('SELECT * FROM ' . $connection2->quoteIdentifier($t) . ' WHERE FIND_IN_SET("' . $item . '",' . $f . ')' . Div::getWhere($t, $this->cObj));
albig commented 4 years ago

Closed by #55