Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Load JSON rather than javascript from phpmyadmin.net

Conflicts:
	js/functions.js
	libraries/Header.class.php
  • Loading branch information...
commit 50edafc0884aa15d0a1aa178089ac6a1ad2eb18a 1 parent ceaee44
@nijel nijel authored
Showing with 7 additions and 7 deletions.
  1. +6 −6 js/functions.js
  2. +1 −1  libraries/header_http.inc.php
View
12 js/functions.js
@@ -128,13 +128,13 @@ function parseVersionString (str)
/**
* Indicates current available version on main page.
*/
-function PMA_current_version()
+function PMA_current_version(data)
{
var current = parseVersionString(pmaversion);
- var latest = parseVersionString(PMA_latest_version);
- var version_information_message = PMA_messages['strLatestAvailable'] + ' ' + PMA_latest_version;
+ var latest = parseVersionString(data['version']);
+ var version_information_message = PMA_messages['strLatestAvailable'] + ' ' + data['version'];
if (latest > current) {
- var message = $.sprintf(PMA_messages['strNewerVersion'], PMA_latest_version, PMA_latest_date);
+ var message = $.sprintf(PMA_messages['strNewerVersion'], data['version'], data['date']);
if (Math.floor(latest / 10000) == Math.floor(current / 10000)) {
/* Security update */
klass = 'error';
@@ -1734,7 +1734,7 @@ function PMA_createProfilingChartJqplot(target, data)
seriesDefaults: {
renderer: $.jqplot.PieRenderer,
rendererOptions: {
- showDataLabels: true
+ showDataLabels: true
}
},
legend: {
@@ -3218,7 +3218,7 @@ $(document).ready(function() {
* Load version information asynchronously.
*/
if ($('.jsversioncheck').length > 0) {
- $.getScript('http://www.phpmyadmin.net/home_page/version.js', PMA_current_version);
+ $.getJSON('http://www.phpmyadmin.net/home_page/version.json', {}, PMA_current_version);
}
/**
View
2  libraries/header_http.inc.php
@@ -22,7 +22,7 @@
/* Prevent against ClickJacking by allowing frames only from same origin */
if (!$GLOBALS['cfg']['AllowThirdPartyFraming']) {
header('X-Frame-Options: SAMEORIGIN');
- header("X-Content-Security-Policy: allow 'self'; options inline-script eval-script; frame-ancestors 'self'; img-src 'self' data:; script-src 'self' http://www.phpmyadmin.net");
+ header("X-Content-Security-Policy: allow 'self' http://www.phpmyadmin.net; options inline-script eval-script; frame-ancestors 'self'; img-src 'self' data:");
header("X-WebKit-CSP: allow 'self' http://www.phpmyadmin.net; options inline-script eval-script");
}
PMA_no_cache_header();

1 comment on commit 50edafc

@andiunpamEHCP

Thanks very much nijel

Please sign in to comment.
Something went wrong with that request. Please try again.