back to the welcome page $uri = $cfg['PmaAbsoluteUri'] . 'index.php?' . PMA_generate_common_url('', '', '&') . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1'; if (! strlen($db) || ! $is_db) { $response = PMA_Response::getInstance(); if ($response->isAjax()) { $response->isSuccess(false); $response->addJSON( 'message', PMA_Message::error(__('No databases selected.')) ); } else { PMA_sendHeaderLocation($uri); } exit; } } // end if (ensures db exists) /** * Changes database charset if requested by the user */ if (isset($_REQUEST['submitcollation']) && isset($_REQUEST['db_collation']) && ! empty($_REQUEST['db_collation']) ) { list($db_charset) = explode('_', $_REQUEST['db_collation']); $sql_query = 'ALTER DATABASE ' . PMA_Util::backquote($db) . ' DEFAULT' . PMA_generateCharsetQueryPart($_REQUEST['db_collation']); $result = PMA_DBI_query($sql_query); $message = PMA_Message::success(); unset($db_charset); /** * If we are in an Ajax request, let us stop the execution here. Necessary for * db charset change action on db_operations.php. If this causes a bug on * other pages, we might have to move this to a different location. */ if ( $GLOBALS['is_ajax_request'] == true) { $response = PMA_Response::getInstance(); $response->isSuccess($message->isSuccess()); $response->addJSON('message', $message); exit; } } /** * Set parameters for links */ $url_query = PMA_generate_common_url($db); ?>