Permalink
Browse files

Let the client decide which protocol to use rather than defining it s…

…tatically in the code (except where applicable).
  • Loading branch information...
1 parent 3585ddb commit b7a814641c325ad928378dfab16a7a251e491de4 @db- db- committed Dec 3, 2012
Showing with 12 additions and 10 deletions.
  1. +4 −2 include/layout.inc
  2. +8 −8 styles/phpnet.css
View
@@ -4,6 +4,8 @@
// Set the static content root differently on php.net
if ($MYSITE == "http://www.php.net/") {
$_SERVER['STATIC_ROOT'] = 'http://static.php.net/www.php.net';
+} elseif ($MYSITE == 'https://www.php.net/') {
+ $_SERVER['STATIC_ROOT'] = 'https://static.php.net/www.php.net';
} elseif (!isset($_SERVER['STATIC_ROOT'])) {
$_SERVER['STATIC_ROOT'] = "";
}
@@ -142,7 +144,7 @@ function site_header($title = '', $config = array())
// Base href setting for URL shortcuts to work
if (!empty($_SERVER['BASE_HREF'])) {
$base = "\n <base href=\"{$_SERVER['BASE_HREF']}\" />";
- $canonical = '<link rel="canonical" href="http://php.net/' . $_SERVER['BASE_PAGE'] . '" />';
+ $canonical = '<link rel="canonical" href="//php.net/' . $_SERVER['BASE_PAGE'] . '" />';
}
// Define layout helper in case we need it
@@ -353,7 +355,7 @@ function site_footer($config = array())
</div>
<!--[if IE 6]>
<script type="text/javascript">
- /*Load jQuery if not already loaded*/ if(typeof jQuery == 'undefined'){ document.write("<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js\"></"+"script>"); var __noconflict = true; }
+ /*Load jQuery if not already loaded*/ if(typeof jQuery == 'undefined'){ document.write("<script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js\"></"+"script>"); var __noconflict = true; }
var IE6UPDATE_OPTIONS = {
icons_path: "/ie6update/images/"
}
View
@@ -1,29 +1,29 @@
/* TOC elements on manual pages ------------------------------------------- */
ul.toc li {
- background-image: url(http://static.php.net/www.php.net/images/box-0.gif);
+ background-image: url(//static.php.net/www.php.net/images/box-0.gif);
}
ul.toc li.up {
- background-image: url(http://static.php.net/www.php.net/images/caret-u.gif);
+ background-image: url(//static.php.net/www.php.net/images/caret-u.gif);
}
ul.toc li.home {
- background-image: url(http://static.php.net/www.php.net/images/caret-t.gif);
+ background-image: url(//static.php.net/www.php.net/images/caret-t.gif);
}
ul.toc li.active {
- background-image: url(http://static.php.net/www.php.net/images/box-1.gif);
+ background-image: url(//static.php.net/www.php.net/images/box-1.gif);
}
/* Sidebar backgrounds ---------------------------------------------------- */
#layout_2, #layout_3 {
- background-image: url(http://static.php.net/www.php.net/images/leftbar.png);
+ background-image: url(//static.php.net/www.php.net/images/leftbar.png);
}
#layout_3_helper {
- background-image: url(http://static.php.net/www.php.net/images/rightbar.png);
+ background-image: url(//static.php.net/www.php.net/images/rightbar.png);
}
/* Tips and warning icons, mainly used in the manual */
div.tip {
- background-image: url(http://static.php.net/www.php.net/images/dialog-information.png);
+ background-image: url(//static.php.net/www.php.net/images/dialog-information.png);
}
div.warning {
- background-image: url(http://static.php.net/www.php.net/images/dialog-warning.png);
+ background-image: url(//static.php.net/www.php.net/images/dialog-warning.png);
}

0 comments on commit b7a8146

Please sign in to comment.