[Gnucash-changes] r12889 - htdocs/trunk/en/menu - using a single variable instead of calling GLOBALS each time

Neil Williams codehelp at cvs.gnucash.org
Thu Jan 19 12:08:03 EST 2006


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

Modified:
   htdocs/trunk/en/menu/menu-main-developer.phtml
   htdocs/trunk/en/menu/menu-main-documentation.phtml
   htdocs/trunk/en/menu/menu-main-general.phtml
   htdocs/trunk/en/menu/menu-main-other.phtml
   htdocs/trunk/en/menu/menu-main-search.phtml
   htdocs/trunk/en/menu/menu-main.phtml
Log:
using a single variable instead of calling GLOBALS each time

Modified: htdocs/trunk/en/menu/menu-main-developer.phtml
===================================================================
--- htdocs/trunk/en/menu/menu-main-developer.phtml	2006-01-19 17:07:27 UTC (rev 12888)
+++ htdocs/trunk/en/menu/menu-main-developer.phtml	2006-01-19 17:08:03 UTC (rev 12889)
@@ -1,7 +1,5 @@
 <!-- MENU:START -->
-<?php if (!ini_get('register_globals')) {
- include("../emulate_globals_on.php");
-}
+<?php
 $self = $_SERVER["HTTP_HOST"];
 if(ereg("lists.gnucash.org",$self)) {
 	$home = "http://www.gnucash.org";
@@ -12,20 +10,20 @@
 
 echo "<div id=\"news\">";
 echo "<div id=\"othernews\">";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-general.phtml");
+include($toppath."/externals/en/menu-general.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-documentation.phtml");
+include($toppath."/externals/en/menu-documentation.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-help.phtml");
+include($toppath."/externals/en/menu-help.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-downloads.phtml");
+include($toppath."/externals/en/menu-downloads.phtml");
 # highlighted menu entry:
 echo "</div>\n<div class=\"highlight\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-developer.phtml");
+include($toppath."/externals/en/menu-developer.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-other.phtml");
+include($toppath."/externals/en/menu-other.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-search.phtml");
+include($toppath."/externals/en/menu-search.phtml");
 echo "</div>\n";
 echo "</div>\n";
 ?>

Modified: htdocs/trunk/en/menu/menu-main-documentation.phtml
===================================================================
--- htdocs/trunk/en/menu/menu-main-documentation.phtml	2006-01-19 17:07:27 UTC (rev 12888)
+++ htdocs/trunk/en/menu/menu-main-documentation.phtml	2006-01-19 17:08:03 UTC (rev 12889)
@@ -1,8 +1,6 @@
 <!-- MENU:START -->
 
-<?php if (!ini_get('register_globals')) {
- include("../emulate_globals_on.php");
-}
+<?php
 $self = $_SERVER["HTTP_HOST"];
 if(ereg("lists.gnucash.org",$self)) {
 	$home = "http://www.gnucash.org";
@@ -12,20 +10,20 @@
 }
 
 echo "<div id=\"news\"><div class=\"othernews\">";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-general.phtml");
+include($toppath."/externals/en/menu-general.phtml");
 # highlighted menu entry:
 echo "</div>\n<div class=\"highlight\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-documentation.phtml");
+include($toppath."/externals/en/menu-documentation.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-help.phtml");
+include($toppath."/externals/en/menu-help.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-downloads.phtml");
+include($toppath."/externals/en/menu-downloads.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-developer.phtml");
+include($toppath."/externals/en/menu-developer.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-other.phtml");
+include($toppath."/externals/en/menu-other.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-search.phtml");
+include($toppath."/externals/en/menu-search.phtml");
 echo "</div>\n";
 echo "</div>\n";
 ?>

Modified: htdocs/trunk/en/menu/menu-main-general.phtml
===================================================================
--- htdocs/trunk/en/menu/menu-main-general.phtml	2006-01-19 17:07:27 UTC (rev 12888)
+++ htdocs/trunk/en/menu/menu-main-general.phtml	2006-01-19 17:08:03 UTC (rev 12889)
@@ -1,7 +1,5 @@
 <!-- MENU:START -->
-<?php if (!ini_get('register_globals')) {
- include("../emulate_globals_on.php");
-}
+<?php
 $self = $_SERVER["HTTP_HOST"];
 if(ereg("lists.gnucash.org",$self)) {
 	$home = "http://www.gnucash.org";
@@ -13,19 +11,19 @@
 echo "<div id=\"news\">";
 # highlighted menu entry:
 echo "<div class=\"highlight\">";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-general.phtml");
+include($toppath."/externals/en/menu-general.phtml");
 echo "</div>\n\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-documentation.phtml");
+include($toppath."/externals/en/menu-documentation.phtml");
 echo "</div>\n\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-help.phtml");
+include($toppath."/externals/en/menu-help.phtml");
 echo "</div>\n\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-downloads.phtml");
+include($toppath."/externals/en/menu-downloads.phtml");
 echo "</div>\n\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-developer.phtml");
+include($toppath."/externals/en/menu-developer.phtml");
 echo "</div>\n\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-other.phtml");
+include($toppath."/externals/en/menu-other.phtml");
 echo "</div>\n\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-search.phtml");
+include($toppath."/externals/en/menu-search.phtml");
 echo "</div>\n";
 echo "</div>\n";
 ?>

Modified: htdocs/trunk/en/menu/menu-main-other.phtml
===================================================================
--- htdocs/trunk/en/menu/menu-main-other.phtml	2006-01-19 17:07:27 UTC (rev 12888)
+++ htdocs/trunk/en/menu/menu-main-other.phtml	2006-01-19 17:08:03 UTC (rev 12889)
@@ -1,7 +1,5 @@
 <!-- MENU:START -->
-<?php if (!ini_get('register_globals')) {
- include("../emulate_globals_on.php");
-}
+<?php
 $self = $_SERVER["HTTP_HOST"];
 if(ereg("lists.gnucash.org",$self)) {
 	$home = "http://www.gnucash.org";
@@ -11,20 +9,20 @@
 }
 
 echo "<div id=\"news\"><div class=\"othernews\">";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-general.phtml");
+include($toppath."/externals/en/menu-general.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-documentation.phtml");
+include($toppath."/externals/en/menu-documentation.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-help.phtml");
+include($toppath."/externals/en/menu-help.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-downloads.phtml");
+include($toppath."/externals/en/menu-downloads.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-developer.phtml");
+include($toppath."/externals/en/menu-developer.phtml");
 # highlighted menu entry:
 echo "</div>\n<div class=\"highlight\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-other.phtml");
+include($toppath."/externals/en/menu-other.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-search.phtml");
+include($toppath."/externals/en/menu-search.phtml");
 echo "</div>\n";
 echo "</div>\n";
 ?>

Modified: htdocs/trunk/en/menu/menu-main-search.phtml
===================================================================
--- htdocs/trunk/en/menu/menu-main-search.phtml	2006-01-19 17:07:27 UTC (rev 12888)
+++ htdocs/trunk/en/menu/menu-main-search.phtml	2006-01-19 17:08:03 UTC (rev 12889)
@@ -1,7 +1,5 @@
 <!-- MENU:START -->
-<?php if (!ini_get('register_globals')) {
- include("../emulate_globals_on.php");
-}
+<?php
 $self = $_SERVER["HTTP_HOST"];
 if(ereg("lists.gnucash.org",$self)) {
 	$home = "http://www.gnucash.org";
@@ -11,20 +9,20 @@
 }
 
 echo "<div id=\"news\"><div class=\"othernews\">";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-general.phtml");
+include($toppath."/externals/en/menu-general.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-documentation.phtml");
+include($toppath."/externals/en/menu-documentation.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-help.phtml");
+include($toppath."/externals/en/menu-help.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-downloads.phtml");
+include($toppath."/externals/en/menu-downloads.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-developer.phtml");
+include($toppath."/externals/en/menu-developer.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-other.phtml");
+include($toppath."/externals/en/menu-other.phtml");
 # highlighted menu entry:
 echo "</div>\n<div class=\"highlight\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-search.phtml");
+include($toppath."/externals/en/menu-search.phtml");
 echo "</div>\n";
 echo "</div>\n";
 ?>

Modified: htdocs/trunk/en/menu/menu-main.phtml
===================================================================
--- htdocs/trunk/en/menu/menu-main.phtml	2006-01-19 17:07:27 UTC (rev 12888)
+++ htdocs/trunk/en/menu/menu-main.phtml	2006-01-19 17:08:03 UTC (rev 12889)
@@ -1,7 +1,5 @@
 <!-- MENU:START -->
-<?php if (!ini_get('register_globals')) {
- include("../emulate_globals_on.php");
-}
+<?php
 $self = $_SERVER["HTTP_HOST"];
 if(ereg("lists.gnucash.org",$self)) {
 	$home = "http://www.gnucash.org";
@@ -13,19 +11,19 @@
 echo "<div id=\"news\">\n";
 # highlighted menu entry:
 echo "<div class=\"highlight\">";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-general.phtml");
+include($toppath."/externals/en/menu-general.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-documentation.phtml");
+include($toppath."/externals/en/menu-documentation.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-help.phtml");
+include($toppath."/externals/en/menu-help.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-downloads.phtml");
+include($toppath."/externals/en/menu-downloads.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-developer.phtml");
+include($toppath."/externals/en/menu-developer.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-other.phtml");
+include($toppath."/externals/en/menu-other.phtml");
 echo "</div>\n<div class=\"othernews\">\n";
-include($GLOBALS['DOCUMENT_ROOT']."/externals/en/menu-search.phtml");
+include($toppath."/externals/en/menu-search.phtml");
 echo "</div>\n";
 echo "</div>\n";
 ?>



More information about the gnucash-changes mailing list