Merge remote-tracking branch 'origin/QA_4_0' into QA_4_0

This commit is contained in:
Weblate 2013-05-23 20:26:38 +02:00
commit cb8df55449
2 changed files with 16 additions and 14 deletions

View File

@ -1030,12 +1030,27 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// the checkbox was unchecked
unset($_SESSION['profiling']);
}
/**
* Inclusion of profiling scripts is needed on various
* pages like sql, tbl_sql, db_sql, tbl_select
*/
$response = PMA_Response::getInstance();
if (isset($_SESSION['profiling'])) {
$header = $response->getHeader();
$scripts = $header->getScripts();
/* < IE 9 doesn't support canvas natively */
if (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER < 9) {
$scripts->addFile('canvg/flashcanvas.js');
}
$scripts->addFile('jqplot/jquery.jqplot.js');
$scripts->addFile('jqplot/plugins/jqplot.pieRenderer.js');
$scripts->addFile('canvg/canvg.js');
}
/*
* There is no point in even attempting to process
* an ajax request if there is a token mismatch
*/
$response = PMA_Response::getInstance();
if ($response->isAjax() && $token_mismatch) {
$response->isSuccess(false);
$response->addJSON(

13
sql.php
View File

@ -67,19 +67,6 @@ if (isset($_REQUEST['printview'])) {
$GLOBALS['printview'] = $_REQUEST['printview'];
}
if (isset($_SESSION['profiling'])) {
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
/* < IE 9 doesn't support canvas natively */
if (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER < 9) {
$scripts->addFile('canvg/flashcanvas.js');
}
$scripts->addFile('jqplot/jquery.jqplot.js');
$scripts->addFile('jqplot/plugins/jqplot.pieRenderer.js');
$scripts->addFile('canvg/canvg.js');
}
if (!isset($_SESSION['is_multi_query'])) {
$_SESSION['is_multi_query'] = false;
}