cvs: phpweb /include prepend.inc
| From: | Gabor Hojtsy | Date: | Tue, 12 Sep 2006 12:05:43 +0000 |
| Subject: | cvs: phpweb /include prepend.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-32530@lists.php.net to get a copy of this message | ||
goba Tue Sep 12 12:05:43 2006 UTC
Modified files:
/phpweb/include prepend.inc
Log:
removed unused functions
http://cvs.php.net/viewvc.cgi/phpweb/include/prepend.inc?r1=1.36&r2=1.37&diff_format=u
Index: phpweb/include/prepend.inc
diff -u phpweb/include/prepend.inc:1.36 phpweb/include/prepend.inc:1.37
--- phpweb/include/prepend.inc:1.36 Tue Feb 28 16:49:54 2006
+++ phpweb/include/prepend.inc Tue Sep 12 12:05:43 2006
@@ -1,6 +1,6 @@
<?php // -*- C++ -*-
-// $Id: prepend.inc,v 1.36 2006/02/28 16:49:54 rasmus Exp $
+// $Id: prepend.inc,v 1.37 2006/09/12 12:05:43 goba Exp $
// See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
// for cache control header descriptions (used in many places on the site).
@@ -18,6 +18,7 @@
unset($COUNTRY);
unset($ONLOAD);
unset($MYPHPNET);
+unset($LAST_UPDATED);
// Load the My PHP.net settings before any includes
myphpnet_load();
@@ -25,6 +26,7 @@
// Put the magic quotes setting to $MQ
$MQ = (boolean) get_magic_quotes_gpc();
+// Check for APC support
$APC = function_exists('apc_store');
// Site details (mirror site information)
@@ -44,48 +46,7 @@
// mirror's last updated time.
include $_SERVER['DOCUMENT_ROOT'] . '/include/last_updated.inc';
-// Function used to import request vars to global scope.
-// Walks through $array, and imports all values associated
-// with elements listed in $keys to the global scope
-function import_vars(&$array, $keys)
-{
- // Wrong parameters passed
- if (!is_array($array) || !is_array($keys)) { return FALSE; }
-
- // Walk through all requested keys
- foreach ($keys as $keyname) {
-
- // If there is a value in the arary for this key,
- // import it to the global scope (without copying)
- if (isset($array[$keyname])) {
- $GLOBALS[$keyname] = &$array[$keyname];
- }
- }
-
- // Sign of success
- return TRUE;
-}
-
-// Unset all variables except common ones we use
-// to access request variables and the globals array
-// If all files are register_globals = off safe, then
-// this function can be called to get rid of all
-// variables, even if register_globals = on
-function unset_variables()
-{
- // Protect some common variables
- $protected = array(
- '_GET', '_POST', '_COOKIE', '_SERVER',
- '_ENV', '_REQUEST', 'GLOBALS',
- );
-
- // Go through all global variables
- foreach ($GLOBALS as $name => $value) {
- if (!in_array($name, $protected)) {
- unset($GLOBALS[$name]);
- }
- }
-}
+// -----------------------------------------------------------------------------
// Load in the user preferences
function myphpnet_load()