cvs: phpweb /include site.inc

From: Date: Wed, 13 Aug 2003 12:39:34 +0000
Subject: cvs: phpweb /include site.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-20205@lists.php.net to get a copy of this message
goba Wed Aug 13 08:39:34 2003 EDT Modified files: /phpweb/include site.inc Log: Make the different mirror data returning functions E_NOTICE safe Index: phpweb/include/site.inc diff -u phpweb/include/site.inc:1.250 phpweb/include/site.inc:1.251 --- phpweb/include/site.inc:1.250 Sun Jul 13 16:02:10 2003 +++ phpweb/include/site.inc Wed Aug 13 08:39:33 2003 @@ -1,6 +1,6 @@ <?php // -*- C++ -*- -// $Id: site.inc,v 1.250 2003/07/13 20:02:10 goba Exp $ +// $Id: site.inc,v 1.251 2003/08/13 12:39:33 goba Exp $ // Define $MIRRORS array, and some constants include_once $_SERVER['DOCUMENT_ROOT'] . '/include/mirrors.inc'; @@ -42,7 +42,7 @@ { global $MIRRORS, $MYSITE; if (!$site) { $site = $MYSITE; } - return $MIRRORS[$site][6]; + return (isset($MIRRORS[$site]) ? $MIRRORS[$site][6] : FALSE); } // Returns true if the current (or specified) mirror @@ -51,7 +51,7 @@ { global $MIRRORS, $MYSITE; if (!$site) { $site = $MYSITE; } - return $MIRRORS[$site][5]; + return (isset($MIRRORS[$site]) ? $MIRRORS[$site][5] : FALSE); } // Returns true if the current (or specified) mirror @@ -60,7 +60,7 @@ { global $MIRRORS, $MYSITE; if (!$site) { $site = $MYSITE; } - return $MIRRORS[$site][2]; + return (isset($MIRRORS[$site]) ? $MIRRORS[$site][2] : FALSE); } // Returns the current (or specified) @@ -69,7 +69,7 @@ { global $MIRRORS, $MYSITE; if (!$site) { $site = $MYSITE; } - return $MIRRORS[$site][0]; + return (isset($MIRRORS[$site]) ? $MIRRORS[$site][0] : FALSE); } // Returns the current (or specified) @@ -78,7 +78,7 @@ { global $MIRRORS, $MYSITE; if (!$site) { $site = $MYSITE; } - return $MIRRORS[$site][1]; + return (isset($MIRRORS[$site]) ? $MIRRORS[$site][1] : FALSE); } // Returns the current (or specified) @@ -87,7 +87,7 @@ { global $MIRRORS,$MYSITE; if (!$site) { $site = $MYSITE; } - return $MIRRORS[$site][3]; + return (isset($MIRRORS[$site]) ? $MIRRORS[$site][3] : FALSE); } // Returns the current (or specified) @@ -96,7 +96,7 @@ { global $MIRRORS, $MYSITE; if (!$site) { $site = $MYSITE; } - return $MIRRORS[$site][4]; + return (isset($MIRRORS[$site]) ? $MIRRORS[$site][4] : FALSE); } // Returns the current (or specified) @@ -105,7 +105,7 @@ { global $MIRRORS, $MYSITE; if (!$site) { $site = $MYSITE; } - return $MIRRORS[$site][7]; + return (isset($MIRRORS[$site]) ? $MIRRORS[$site][7] : FALSE); } // Count all mirrors or mirrors in a given country @@ -215,4 +215,4 @@ // shortcut URL accessed pages work without redirection if (isset($_SERVER['BASE_PAGE'])) { $_SERVER['BASE_HREF'] = $MYSITE . $_SERVER['BASE_PAGE']; -} else { unset($_SERVER['BASE_HREF']); } \ No newline at end of file +} else { unset($_SERVER['BASE_HREF']); }

« previous php.mirrors (#20205) next »