Download externals from HTTPS
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@940 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
66694506b5
commit
b3fc4c0ea2
|
@ -1,19 +1,12 @@
|
|||
// Adminer specific functions
|
||||
|
||||
function body_load() {
|
||||
var script = document.createElement('script');
|
||||
script.src = '../externals/jush/jush.js';
|
||||
script.onload = function () {
|
||||
jush.style('../externals/jush/jush.css');
|
||||
var jush_root = '../externals/jush/';
|
||||
load_script(jush_root + 'jush.js', function () {
|
||||
jush.style(jush_root + 'jush.css');
|
||||
jush.highlight_tag('pre');
|
||||
jush.highlight_tag('code');
|
||||
}
|
||||
script.onreadystatechange = function () {
|
||||
if (script.readyState == 'loaded' || script.readyState == 'complete') {
|
||||
script.onload();
|
||||
}
|
||||
}
|
||||
document.body.appendChild(script);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6,11 +6,33 @@ function toggle(id) {
|
|||
return true;
|
||||
}
|
||||
|
||||
function load_script(src, onload) {
|
||||
var script = document.createElement('script');
|
||||
script.src = src;
|
||||
script.onload = onload;
|
||||
script.onreadystatechange = function () {
|
||||
if (script.readyState == 'loaded' || script.readyState == 'complete') {
|
||||
onload();
|
||||
}
|
||||
}
|
||||
document.body.appendChild(script);
|
||||
}
|
||||
|
||||
function verify_version(version) {
|
||||
document.cookie = 'adminer_version=0';
|
||||
var script = document.createElement('script');
|
||||
script.src = 'http://www.adminer.org/version.php?version=' + version;
|
||||
document.body.appendChild(script);
|
||||
load_script('https://adminer.svn.sourceforge.net/svnroot/adminer/released.js', function () {
|
||||
document.cookie = 'adminer_version=' + released;
|
||||
var re = /^([0-9]+)\.([0-9]+)\.([0-9]+)(.*)/;
|
||||
var v1 = re.exec(version);
|
||||
var v2 = re.exec(released);
|
||||
if (v1 && v2 && (+v1[1] < +v2[1]
|
||||
|| (v1[1] == v2[1] && (+v1[2] < +v2[2]
|
||||
|| (v1[2] == v2[2] && (+v1[3] < +v2[3]
|
||||
|| (v1[3] == v2[3] && v1[4]
|
||||
))))))) {
|
||||
document.getElementById('version').innerHTML = released;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function form_check(el, name) {
|
||||
|
|
|
@ -15,6 +15,7 @@ Clear history (thanks to paranoiq)
|
|||
Remove Delete button from Edit page - use mass operation for it
|
||||
Faster multiple update, clone and delete
|
||||
Faster table list in navigation
|
||||
Download version checker and syntax highlighting from HTTPS
|
||||
Use HTML Strict instead of XHTML
|
||||
Remove function minification for performance and customization
|
||||
Fix grant ALL PRIVILEGES with GRANT OPTION
|
||||
|
|
|
@ -180,7 +180,7 @@ $file = preg_replace_callback("~compile_file\\('([^']+)', '([^']+)'\\);~", 'comp
|
|||
$replace = 'h(preg_replace("~\\\\\\\\?.*~", "", $_SERVER["REQUEST_URI"])) . "?file=\\1&version=' . $VERSION;
|
||||
$file = preg_replace('~\\.\\./adminer/(default\\.css|functions\\.js|favicon\\.ico)~', '<?php echo ' . $replace . '"; ?>', $file);
|
||||
$file = preg_replace('~\\.\\./adminer/((plus|cross|up|down|arrow)\\.gif)~', '" . ' . $replace, $file);
|
||||
$file = str_replace("../externals/jush/", "http://jush.sourceforge.net/", $file);
|
||||
$file = str_replace("../externals/jush/", "https://jush.svn.sourceforge.net/svnroot/jush/trunk/", $file); // mixed-content warning if Adminer runs on HTTPS and external files on HTTP
|
||||
$file = preg_replace("~<\\?php\\s*\\?>\n?|\\?>\n?<\\?php~", '', $file);
|
||||
$file = php_shrink($file);
|
||||
|
||||
|
|
1
released.js
Normal file
1
released.js
Normal file
|
@ -0,0 +1 @@
|
|||
var released = '1.11.1';
|
1
todo.txt
1
todo.txt
|
@ -13,7 +13,6 @@ Edit default values directly in table creation
|
|||
Offer enum and set items in search - whisperer
|
||||
Use event $intervals + microseconds in relative date functions
|
||||
Table status cache - SHOW TABLE STATUS is slow with big InnoDB tables
|
||||
Download external files (version checker and JUSH) from trusted HTTPS if Adminer runs in HTTPS (mixed-content warning)
|
||||
? Ability to select external style - list downloaded by JavaScript
|
||||
? Column and table names auto-completition in SQL textarea
|
||||
? Save uploaded files after error to session variable instead of hidden field
|
||||
|
|
Loading…
Reference in a new issue