[Gnucash-changes] r12898 - mail-search/trunk/mail-search - removing need for GLOBALS

Neil Williams codehelp at cvs.gnucash.org
Thu Jan 19 12:37:05 EST 2006


Author: codehelp
Date: 2006-01-19 12:37:04 -0500 (Thu, 19 Jan 2006)
New Revision: 12898
Trac: http://svn.gnucash.org/trac/changeset/12898

Removed:
   mail-search/trunk/mail-search/emulate_globals_on.php
Modified:
   mail-search/trunk/mail-search/search.php
Log:
removing need for GLOBALS

Deleted: mail-search/trunk/mail-search/emulate_globals_on.php
===================================================================
--- mail-search/trunk/mail-search/emulate_globals_on.php	2006-01-19 17:35:14 UTC (rev 12897)
+++ mail-search/trunk/mail-search/emulate_globals_on.php	2006-01-19 17:37:04 UTC (rev 12898)
@@ -1,28 +0,0 @@
-<?php
- // Emulate register_globals on
- if (!ini_get('register_globals')) {
-    $superglobals = array($_SERVER, $_ENV,
-        $_FILES, $_COOKIE, $_POST, $_GET);
-    if (isset($_SESSION)) {
-        array_unshift($superglobals, $_SESSION);
-    }
-    foreach ($superglobals as $superglobal) {
-        extract($superglobal, EXTR_SKIP);
-    }
- }
-$fullname = $_SERVER["PHP_SELF"];
-$topdir= dirname($fullname)."/";
-$toppath= getcwd();
-unset($fullname);
-# the search script needs the list archives on the
-# same machine. The rest of the site can be mirrored
-# but the search page only operates properly on 
-# lists.gnucash.org
-$self = $_SERVER["HTTP_HOST"];
-if(ereg("lists.gnucash.org",$self)) {
-	$home = "http://www.gnucash.org";
-}
-else {
-$home = "";
-}
-?>

Modified: mail-search/trunk/mail-search/search.php
===================================================================
--- mail-search/trunk/mail-search/search.php	2006-01-19 17:35:14 UTC (rev 12897)
+++ mail-search/trunk/mail-search/search.php	2006-01-19 17:37:04 UTC (rev 12898)
@@ -1,10 +1,24 @@
-<?php $title="Mailing List Archive Search"; ?>
-<?php if (!ini_get('register_globals')) {
- include("emulate_globals_on.php");
+<?php 
+$title="Mailing List Archive Search"; 
+# search does not use GLOBALS.
+$fullname = $_SERVER["PHP_SELF"];
+$topdir= dirname($fullname)."/";
+$toppath= getcwd();
+unset($fullname);
+# the search script needs the list archives on the
+# same machine. The rest of the site can be mirrored
+# but the search page only operates properly on 
+# lists.gnucash.org
+$self = $_SERVER["HTTP_HOST"];
+if(ereg("lists.gnucash.org",$self)) {
+	$home = "http://www.gnucash.org";
 }
+else {
+$home = "";
+}
+include($toppath."/externals/en/header.phtml");
+include($toppath."/externals/en/menu-main-help.phtml");
 ?>
-<?php include($GLOBALS['DOCUMENT_ROOT']."/search/externals/en/header.phtml"); ?>
-<?php include($GLOBALS['DOCUMENT_ROOT']."/search/externals/en/menu-main-help.phtml"); ?>
 
 <div id="content">
 <?php
@@ -260,7 +274,7 @@
 </div></form>
 </div>
 <?php
-	include($GLOBALS['DOCUMENT_ROOT']."/search/externals/en/footer.phtml");
+	include($toppath."/externals/en/footer.phtml");
 exit;
 }
 
@@ -386,7 +400,7 @@
 </div>
 <?php 
 
-	include($GLOBALS['DOCUMENT_ROOT']."/externals/en/footer.phtml");
+	include($toppath."/externals/en/footer.phtml");
 
 		closedir($dp);
 		exit;
@@ -544,5 +558,5 @@
 ?>
 </div>
 
-<?php include($GLOBALS['DOCUMENT_ROOT']."/search/externals/en/footer.phtml"); ?>
+<?php include($toppath."/externals/en/footer.phtml"); ?>
 



More information about the gnucash-changes mailing list