svn: /web/php/trunk/include/ header.inc layout.inc

From: Date: Fri, 07 Jan 2011 11:03:09 +0000
Subject: svn: /web/php/trunk/include/ header.inc layout.inc
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-10288@lists.php.net to get a copy of this message
aharvey Fri, 07 Jan 2011 11:03:09 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=307216 Log: Quiet notices when we don't have $_SERVER['BASE_PAGE'] available. Changed paths: U web/php/trunk/include/header.inc U web/php/trunk/include/layout.inc Modified: web/php/trunk/include/header.inc =================================================================== --- web/php/trunk/include/header.inc 2011-01-07 09:54:00 UTC (rev 307215) +++ web/php/trunk/include/header.inc 2011-01-07 11:03:09 UTC (rev 307216) @@ -8,7 +8,7 @@ // Version information for the mega drop down. include $_SERVER['DOCUMENT_ROOT'] . '/include/version.inc'; -if ($shortname) { +if (isset($shortname) && $shortname) { header("Link: <$shorturl>; rel=shorturl"); } @@ -25,10 +25,14 @@ <link rel="search" type="application/opensearchdescription+xml" href="http://www.php.net/phpnetimprovedsearch.src" title="Add PHP.net search" /> <link rel="alternate" type="application/atom+xml" href="<?php echo $MYSITE ?>releases.atom" title="PHP Release feed" /> <link rel="alternate" type="application/atom+xml" href="<?php echo $MYSITE ?>feed.atom" title="PHP: Hypertext Preprocessor" /> + +<?php if (isset($_SERVER['BASE_PAGE'])): ?> <link rel="canonical" href="http://php.net/<?php echo $_SERVER['BASE_PAGE']?>" /> <?php if ($shortname): ?> <link rel="shorturl" href="<?php echo $shorturl ?>" /> <?php endif ?> +<?php endif ?> + <?php foreach($config["meta-navigation"] as $rel => $page): ?> <link rel="<?php echo $rel ?>" href="<?php echo $MYSITE ?><?php echo $page ?>" /> <?php endforeach ?> Modified: web/php/trunk/include/layout.inc =================================================================== --- web/php/trunk/include/layout.inc 2011-01-07 09:54:00 UTC (rev 307215) +++ web/php/trunk/include/layout.inc 2011-01-07 11:03:09 UTC (rev 307216) @@ -806,7 +806,7 @@ } // shorturl; http://wiki.snaplog.com/short_url - if ($shortname = get_shortname($_SERVER["BASE_PAGE"])) { + if (isset($_SERVER['BASE_PAGE']) && $shortname = get_shortname($_SERVER["BASE_PAGE"])) { $shorturl = "http://php.net/" . $shortname; }

« previous php.webmaster (#10288) next »