1) { /** * @todo if there are more than one table name in the Select: * - do not extract the first table name * - do not show a table name in the page header * - do not display the sub-pages links) */ $table = ''; } else { $table = $analyzedSqlResults['select_tables'][0][0]; if (! empty($analyzedSqlResults['select_tables'][0][1])) { $db = $analyzedSqlResults['select_tables'][0][1]; } } // There is no point checking if a reload is required if we already decided // to reload. Also, no reload is required for AJAX requests. $response = ResponseRenderer::getInstance(); if (empty($analyzedSqlResults['reload']) && ! $response->isAjax()) { // NOTE: Database names are case-insensitive. $analyzedSqlResults['reload'] = strcasecmp($db, $previousDb) != 0; } } return [ $analyzedSqlResults, $db, $table, ]; } }