cvs: phpweb / my.php /include site.inc

From: Date: Sat, 16 Aug 2003 10:55:08 +0000
Subject: cvs: phpweb / my.php /include site.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-20402@lists.php.net to get a copy of this message
goba Sat Aug 16 06:55:08 2003 EDT Modified files: /phpweb my.php /phpweb/include site.inc Log: Be a bit more kind to those who run non-official mirror sites for some reason (like I do for testing stuff :), and allow setting of My PHP.net settings on these sites too. But do notify users that unofficial mirror site settings are not goint to carried to the official mirror sites. Index: phpweb/my.php diff -u phpweb/my.php:1.25 phpweb/my.php:1.26 --- phpweb/my.php:1.25 Fri Aug 15 10:34:25 2003 +++ phpweb/my.php Sat Aug 16 06:55:07 2003 @@ -1,5 +1,5 @@ <?php -// $Id: my.php,v 1.25 2003/08/15 14:34:25 goba Exp $ +// $Id: my.php,v 1.26 2003/08/16 10:55:07 goba Exp $ $_SERVER['BASE_PAGE'] = 'my.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; @@ -71,15 +71,23 @@ <p> This page allows you to customize the PHP.net site to some degree - to your own liking. Currently you can only set the language you - prefer, thus overriding any other automatic language selection. + to your own liking. </p> +<?php if (!is_official_mirror()) { ?> +<p class="warn"> + This is not an official PHP.net mirror site, and therefore the settings + you set and see here will <strong>not</strong> be effective on any + official PHP.net mirror site. The settings you specify here are only + going to be active for this URL, and only if you have cookies enabled. +</p> +<?php } else { ?> <p> These settings will be active on all official PHP.net mirror sites, and are stored using cookies, so you need to have cookies enabled to let your settings work. </p> +<?php } ?> <h2>Preferred language</h2> Index: phpweb/include/site.inc diff -u phpweb/include/site.inc:1.251 phpweb/include/site.inc:1.252 --- phpweb/include/site.inc:1.251 Wed Aug 13 08:39:33 2003 +++ phpweb/include/site.inc Sat Aug 16 06:55:08 2003 @@ -1,6 +1,6 @@ <?php // -*- C++ -*- -// $Id: site.inc,v 1.251 2003/08/13 12:39:33 goba Exp $ +// $Id: site.inc,v 1.252 2003/08/16 10:55:08 goba Exp $ // Define $MIRRORS array, and some constants include_once $_SERVER['DOCUMENT_ROOT'] . '/include/mirrors.inc'; @@ -153,7 +153,11 @@ function mirror_setcookie($name, $content, $exptime) { if (!headers_sent()) { - return setcookie($name, $content, time() + $exptime, '/', '.php.net'); + if (is_official_mirror()) { + return setcookie($name, $content, time() + $exptime, '/', '.php.net'); + } else { + return setcookie($name, $content, time() + $exptime, '/'); + } } else { return FALSE; }

« previous php.mirrors (#20402) next »