- $res = $GLOBALS['TYPO3_DB']->sql_query($sql_query['qSelect']);
-
- if (!$GLOBALS['TYPO3_DB']->sql_error()) {
- $fullsearch->formW = 48;
- // additional configuration
- $GLOBALS['SOBE']->MOD_SETTINGS['search_result_labels'] = 1;
- $cP = $fullsearch->getQueryResultCode($type, $res, $sql_query['qC']['queryTable']);
- $actionContent = $cP['content'];
-
- // if the result is rendered as csv or xml, show a download link
- if ($type == 'csv' || $type == 'xml' ) {
- $actionContent .= '<br /><br /><a href="' . t3lib_div::getIndpEnv('REQUEST_URI') . '&download_file=1"><strong>' . $GLOBALS['LANG']->getLL('action_download_file') . '</strong></a>';
+ $sqlQuery = $sql_query['qSelect'];
+ $queryIsEmpty = FALSE;
+
+ if ($sqlQuery) {
+ $res = $GLOBALS['TYPO3_DB']->sql_query($sqlQuery);
+
+ if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+ $fullsearch->formW = 48;
+ // additional configuration
+ $GLOBALS['SOBE']->MOD_SETTINGS['search_result_labels'] = 1;
+ $cP = $fullsearch->getQueryResultCode($type, $res, $sql_query['qC']['queryTable']);
+ $actionContent = $cP['content'];
+
+ // if the result is rendered as csv or xml, show a download link
+ if ($type === 'csv' || $type === 'xml') {
+ $actionContent .= '<br /><br /><a href="' . t3lib_div::getIndpEnv('REQUEST_URI') . '&download_file=1"><strong>' . $GLOBALS['LANG']->getLL('action_download_file') . '</strong></a>';
+ }
+ } else {
+ $actionContent .= $GLOBALS['TYPO3_DB']->sql_error();