com web/php: Let the client decide which protocol to use rather than defining it statically in the code (except where applicable).: include/layout.inc
styles/phpnet.css
| From: | Daniel P. Brown | Date: | Mon, 03 Dec 2012 16:18:01 +0000 |
| Subject: | com web/php: Let the client decide which protocol to use rather than defining it statically in the code (except where applicable).: include/layout.inc styles/phpnet.css |
||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-15021@lists.php.net to get a copy of this message | ||
Commit: b7a814641c325ad928378dfab16a7a251e491de4
Author: Daniel P. Brown <danbrown@php.net> Mon, 3 Dec 2012 11:18:01 -0500
Parents: 3585ddb659942f343debcf91c19c2efd6ef78be7
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=b7a814641c325ad928378dfab16a7a251e491de4
Log:
Let the client decide which protocol to use rather than defining it statically in the code (except
where applicable).
Changed paths:
M include/layout.inc
M styles/phpnet.css
Diff:
diff --git a/include/layout.inc b/include/layout.inc
index 06ddb43..a54d22e 100644
--- a/include/layout.inc
+++ b/include/layout.inc
@@ -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/"
}
diff --git a/styles/phpnet.css b/styles/phpnet.css
index e0bfdea..0f8a454 100644
--- a/styles/phpnet.css
+++ b/styles/phpnet..css
@@ -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);
}