Re: 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: | Hannes Magnusson | Date: | Mon, 03 Dec 2012 17:11:05 +0000 |
| Subject: | Re: 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 |
||
| References: | 1 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-15022@lists.php.net to get a copy of this message | ||
On Mon, Dec 3, 2012 at 8:18 AM, Daniel P. Brown <danbrown@php.net> wrote:
> 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'] . '" />';
The rel="canonical" is what search engines (i.e. google) uses to link to.
This was mostly done to uniform our links and not have mirror specific
search results (i.e. 100 links to xxx.php.net/strpos).
Plus, that //php.net/ looks very wrong.
> }
>
> // 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; }
//ajax.googleapis.com?
> 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);
Is // some new trick I am unaware of and my browser doesn't understand?
All these links look very broken to me.
-Hannes