Commit 43857179 authored by Mike Hibler's avatar Mike Hibler

Hopefully the last round of deprecated global var references.

parent 9a9f416c
...@@ -867,9 +867,9 @@ function DBQueryWarn($query, $linkid = NULL) ...@@ -867,9 +867,9 @@ function DBQueryWarn($query, $linkid = NULL)
# #
function DBWarn($message) function DBWarn($message)
{ {
global $PHP_SELF, $DBErrorString; global $DBErrorString;
$text = "$message - In $PHP_SELF\n" . $text = "$message - In " . $_SERVER["PHP_SELF"] . "\n" .
"$DBErrorString\n"; "$DBErrorString\n";
TBERROR($text, 0); TBERROR($text, 0);
...@@ -882,9 +882,9 @@ function DBWarn($message) ...@@ -882,9 +882,9 @@ function DBWarn($message)
# #
function DBFatal($message) function DBFatal($message)
{ {
global $PHP_SELF, $DBErrorString; global $DBErrorString;
$text = "$message - In $PHP_SELF\n" . $text = "$message - In " . $_SERVER["PHP_SELF"] . "\n" .
"$DBErrorString\n"; "$DBErrorString\n";
TBERROR($text, 1); TBERROR($text, 1);
......
<?php <?php
# #
# Copyright (c) 2004, 2007 University of Utah and the Flux Group. # Copyright (c) 2004-2013 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -67,6 +67,7 @@ if ($printable) { ...@@ -67,6 +67,7 @@ if ($printable) {
<body>\n"; <body>\n";
} }
else { else {
$REQUEST_URI = $_SERVER["REQUEST_URI"];
echo "<b><a href=$REQUEST_URI&printable=1> echo "<b><a href=$REQUEST_URI&printable=1>
Printable version of this document</a></b><br>\n"; Printable version of this document</a></b><br>\n";
} }
......
<?php <?php
# #
# Copyright (c) 2004, 2007 University of Utah and the Flux Group. # Copyright (c) 2004-2013 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -41,6 +41,7 @@ if (!$printable) { ...@@ -41,6 +41,7 @@ if (!$printable) {
} }
if (!$printable) { if (!$printable) {
$REQUEST_URI = $_SERVER["REQUEST_URI"];
echo "<b><a href=$REQUEST_URI?printable=1> echo "<b><a href=$REQUEST_URI?printable=1>
Printable version of this document</a></b><br>\n"; Printable version of this document</a></b><br>\n";
} }
......
<?php <?php
# #
# Copyright (c) 2004, 2005, 2007 University of Utah and the Flux Group. # Copyright (c) 2004-2013 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -40,6 +40,7 @@ if (!$printable) { ...@@ -40,6 +40,7 @@ if (!$printable) {
} }
if (!$printable) { if (!$printable) {
$REQUEST_URI = $_SERVER["REQUEST_URI"];
echo "<b><a href=$REQUEST_URI?printable=1> echo "<b><a href=$REQUEST_URI?printable=1>
Printable version of this document</a></b><br>\n"; Printable version of this document</a></b><br>\n";
} }
......
...@@ -142,6 +142,7 @@ PAGEHEADER("Real Time Robot Tracking Applet"); ...@@ -142,6 +142,7 @@ PAGEHEADER("Real Time Robot Tracking Applet");
# #
# Draw the legend and some explanatory text. # Draw the legend and some explanatory text.
# #
$REQUEST_URI = $_SERVER["REQUEST_URI"];
echo "<table cellspacing=5 cellpadding=5 border=0 class=\"stealth\"> echo "<table cellspacing=5 cellpadding=5 border=0 class=\"stealth\">
<tr> <tr>
<td align=\"left\" valign=\"top\" class=\"stealth\"> <td align=\"left\" valign=\"top\" class=\"stealth\">
......
<?php <?php
# #
# Copyright (c) 2005, 2007 University of Utah and the Flux Group. # Copyright (c) 2005-2013 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -77,6 +77,7 @@ if ($printable) { ...@@ -77,6 +77,7 @@ if ($printable) {
<body>\n"; <body>\n";
} }
else { else {
$REQUEST_URI = $_SERVER["REQUEST_URI"];
echo "<b><a href=$REQUEST_URI&printable=1> echo "<b><a href=$REQUEST_URI&printable=1>
Printable version of this document</a></b><br>\n"; Printable version of this document</a></b><br>\n";
} }
......
<?php <?php
# #
# Copyright (c) 2000-2003, 2007 University of Utah and the Flux Group. # Copyright (c) 2000-2013 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -80,6 +80,7 @@ if ($printable) { ...@@ -80,6 +80,7 @@ if ($printable) {
<body>\n"; <body>\n";
} }
else { else {
$REQUEST_URI = $_SERVER["REQUEST_URI"];
echo "<b><a href=$REQUEST_URI&printable=1> echo "<b><a href=$REQUEST_URI&printable=1>
Printable version of this document</a></b><br>\n"; Printable version of this document</a></b><br>\n";
} }
......
<?php <?php
# #
# Copyright (c) 2004-2010 University of Utah and the Flux Group. # Copyright (c) 2004-2013 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -47,6 +47,7 @@ echo " ...@@ -47,6 +47,7 @@ echo "
</head>"; </head>";
if (!$printable) { if (!$printable) {
$REQUEST_URI = $_SERVER["REQUEST_URI"];
echo "<b><a href=$REQUEST_URI?printable=1> echo "<b><a href=$REQUEST_URI?printable=1>
Printable version of this document</a></b><br>\n"; Printable version of this document</a></b><br>\n";
} }
......
...@@ -22,24 +22,24 @@ function quoteForSQL( $l ) { ...@@ -22,24 +22,24 @@ function quoteForSQL( $l ) {
} }
function linkToViewDB( $text, $dbname ) { function linkToViewDB( $text, $dbname ) {
global $PHP_SELF; $PHP_SELF = $_SERVER["PHP_SELF"];
return "<a href=\"$PHP_SELF?dbname=$dbname\">$text</a>"; return "<a href=\"$PHP_SELF?dbname=$dbname\">$text</a>";
} }
function linkToViewServer( $text ) { function linkToViewServer( $text ) {
global $PHP_SELF; $PHP_SELF = $_SERVER["PHP_SELF"];
// use view action so we don't kick them into default database. // use view action so we don't kick them into default database.
return "<a href=\"$PHP_SELF?action=view\">$text</a>"; return "<a href=\"$PHP_SELF?action=view\">$text</a>";
} }
function linkToViewTable( $text, $dbname, $tablename ) { function linkToViewTable( $text, $dbname, $tablename ) {
global $PHP_SELF; $PHP_SELF = $_SERVER["PHP_SELF"];
return "<a href=\"$PHP_SELF?dbname=$dbname&tablename=$tablename\">$text</a>"; return "<a href=\"$PHP_SELF?dbname=$dbname&tablename=$tablename\">$text</a>";
} }
function linkToViewTableExtra( $text, $extra, $dbname, $tablename ) { function linkToViewTableExtra( $text, $extra, $dbname, $tablename ) {
global $PHP_SELF; $PHP_SELF = $_SERVER["PHP_SELF"];
return "<a href=\"$PHP_SELF?dbname=$dbname&tablename=$tablename&$extra\">$text</a>"; return "<a href=\"$PHP_SELF?dbname=$dbname&tablename=$tablename&$extra\">$text</a>";
} }
...@@ -92,7 +92,7 @@ function encap( $c, $tag, $first ) { ...@@ -92,7 +92,7 @@ function encap( $c, $tag, $first ) {
} }
function _form( $c ) { function _form( $c ) {
global $PHP_SELF; $PHP_SELF = $_SERVER["PHP_SELF"];
return "<form action='$PHP_SELF' method=post>\n" . $c . "</form>\n"; return "<form action='$PHP_SELF' method=post>\n" . $c . "</form>\n";
} }
...@@ -117,11 +117,11 @@ function _p( $c ) { return encap( $c, "p", ""); } ...@@ -117,11 +117,11 @@ function _p( $c ) { return encap( $c, "p", ""); }
function _b( $c ) { return encap( $c, "b", ""); } function _b( $c ) { return encap( $c, "b", ""); }
function _i( $c ) { return encap( $c, "i", ""); } function _i( $c ) { return encap( $c, "i", ""); }
function _link( $c, $vars ) { function _link( $c, $vars ) {
global $PHP_SELF; $PHP_SELF = $_SERVER["PHP_SELF"];
return encap( $c, "a", "href=\"$PHP_SELF?$vars\"" ); return encap( $c, "a", "href=\"$PHP_SELF?$vars\"" );
} }
function _link2( $c, $vars, $o ) { function _link2( $c, $vars, $o ) {
global $PHP_SELF; $PHP_SELF = $_SERVER["PHP_SELF"];
return encap( $c, "a", "href=\"$PHP_SELF?$vars\" $o" ); return encap( $c, "a", "href=\"$PHP_SELF?$vars\" $o" );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment