cvs: phpweb /include site.inc
| From: | Gabor Hojtsy | Date: | Sun, 19 Jan 2003 17:50:34 +0000 |
| Subject: | cvs: phpweb /include site.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-15188@lists.php.net to get a copy of this message | ||
goba Sun Jan 19 12:50:34 2003 EDT
Modified files:
/phpweb/include site.inc
Log:
Override central stats setting if local vhost setting is specified
Add new is_official_mirror function to query if this is a registered
mirror site
Index: phpweb/include/site.inc
diff -u phpweb/include/site.inc:1.239 phpweb/include/site.inc:1.240
--- phpweb/include/site.inc:1.239 Sat Jan 18 10:13:59 2003
+++ phpweb/include/site.inc Sun Jan 19 12:50:34 2003
@@ -1,6 +1,6 @@
<?php // -*- C++ -*-
-// $Id: site.inc,v 1.239 2003/01/18 15:13:59 goba Exp $
+// $Id: site.inc,v 1.240 2003/01/19 17:50:34 goba Exp $
// Define $MIRRORS array, and some constants
include_once 'mirrors.inc';
@@ -29,6 +29,13 @@
return $site == "http://download.php.net/";
}
+// Returns true if the current (or specified)
+// mirror site is an official mirror site
+function is_official_mirror($site = FALSE)
+{
+ return (mirror_type($site) != MIRROR_VIRTUAL);
+}
+
// Returns the current (or specified)
// mirror site's default language
function default_language($site = FALSE)
@@ -173,6 +180,11 @@
if (isset($LANGUAGES[$_SERVER['MIRROR_LANGUAGE']])) {
$MIRRORS[$MYSITE][6] = $_SERVER['MIRROR_LANGUAGE'];
}
+}
+
+// Override central stats information if specified in vhost
+if (isset($_SERVER['MIRROR_STATS'])) {
+ $MIRRORS[$MYSITE][2] = TRUE;
}
?>