diff --git a/adminer/include/design.inc.php b/adminer/include/design.inc.php index efdc7a9d..e921c0bd 100644 --- a/adminer/include/design.inc.php +++ b/adminer/include/design.inc.php @@ -7,7 +7,7 @@ * @return null */ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") { - global $LANG, $HTTPS, $adminer, $connection, $drivers; + global $LANG, $adminer, $connection, $drivers; header("Content-Type: text/html; charset=utf-8"); $adminer->headers(); $title_all = $title . ($title2 != "" ? ": " . h($title2) : ""); @@ -15,7 +15,6 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") { if (is_ajax()) { header("X-AJAX-Title: " . rawurlencode($title_page)); } else { - $protocol = ($HTTPS ? "https" : "http"); ?> @@ -29,7 +28,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") { -');" onload="bodyLoad('server_info, 0, 3) : ""); ?>', '');"> +');" onload="bodyLoad('server_info, 0, 3) : ""); ?>');"> diff --git a/adminer/static/editing.js b/adminer/static/editing.js index a676abf7..fcd9d9fd 100644 --- a/adminer/static/editing.js +++ b/adminer/static/editing.js @@ -2,9 +2,8 @@ /** Load syntax highlighting * @param string first three characters of database system version -* @param string 'http' or 'https' - used after compilation */ -function bodyLoad(version, protocol) { +function bodyLoad(version) { var jushRoot = '../externals/jush/'; var script = document.createElement('script'); script.src = jushRoot + 'jush.js'; diff --git a/adminer/static/functions.js b/adminer/static/functions.js index b494155a..680c16bd 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -23,12 +23,11 @@ function cookie(assign, days) { } /** Verify current Adminer version -* @param string 'http' or 'https' */ -function verifyVersion(protocol) { +function verifyVersion() { cookie('adminer_version=0', 1); var script = document.createElement('script'); - script.src = protocol + '://www.adminer.org/version.php'; + script.src = location.protocol + '//www.adminer.org/version.php'; document.body.appendChild(script); } diff --git a/compile.php b/compile.php index 39356558..f1dbbc57 100644 --- a/compile.php +++ b/compile.php @@ -265,7 +265,7 @@ foreach (array("adminer", "editor") as $project) { $file = preg_replace('~\\.\\./adminer/static/(loader\\.gif)~', "'+location.pathname+'?file=\\1&version=$VERSION", $file); $file = preg_replace('~\\.\\./adminer/static/(default\\.css|functions\\.js|favicon\\.ico)~', '', $file); $file = preg_replace('~\\.\\./adminer/static/([^\'"]*)~', '" . ' . $replace, $file); - $file = str_replace("'../externals/jush/'", "protocol + '://www.adminer.org/static/'", $file); + $file = str_replace("'../externals/jush/'", "location.protocol + '//www.adminer.org/static/'", $file); $file = preg_replace("~<\\?php\\s*\\?>\n?|\\?>\n?<\\?php~", '', $file); $file = php_shrink($file); diff --git a/editor/static/editing.js b/editor/static/editing.js index b49666b2..70998ba6 100644 --- a/editor/static/editing.js +++ b/editor/static/editing.js @@ -1,4 +1,4 @@ // Editor specific functions -function bodyLoad(version, protocol) { +function bodyLoad(version) { }