cvs: pearweb /public_html account-edit.php accounts.php admin.php login.php logout.php package-edit.php package-new.php
| From: | Martin Jansen | Date: | Mon, 08 Apr 2002 13:40:55 +0000 |
| Subject: | cvs: pearweb /public_html account-edit.php accounts.php admin.php login.php logout.php package-edit.php package-new.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-3140@lists.php.net to get a copy of this message | ||
mj Mon Apr 8 09:40:55 2002 EDT
Modified files:
/pearweb/public_html account-edit.php accounts.php admin.php
login.php logout.php package-edit.php
package-new.php
Log:
* register_globals=off fixes.
Index: pearweb/public_html/account-edit.php
diff -u pearweb/public_html/account-edit.php:1.10 pearweb/public_html/account-edit.php:1.11
--- pearweb/public_html/account-edit.php:1.10 Mon Jan 28 14:56:04 2002
+++ pearweb/public_html/account-edit.php Mon Apr 8 09:40:55 2002
@@ -14,8 +14,8 @@
response_header("Edit Account: $handle");
-$admin = user::isAdmin($PHP_AUTH_USER);
-$user = ($PHP_AUTH_USER === $handle);
+$admin = user::isAdmin($_SERVER['PHP_AUTH_USER']);
+$user = ($_SERVER['PHP_AUTH_USER'] === $handle);
if (!$admin && !$user) {
PEAR::raiseError("Only the user himself or PEAR administrators can edit the account
information.");
Index: pearweb/public_html/accounts.php
diff -u pearweb/public_html/accounts.php:1.4 pearweb/public_html/accounts.php:1.5
--- pearweb/public_html/accounts.php:1.4 Tue Jan 29 07:08:25 2002
+++ pearweb/public_html/accounts.php Mon Apr 8 09:40:55 2002
@@ -40,9 +40,9 @@
$firstletters = array_unique($all_firstletters);
$last = $offset - $page_size;
-$lastlink = "$PHP_SELF?offset=$last";
+$lastlink = $_SERVER['PHP_SELF'] . "?offset=$last";
$next = $offset + $page_size;
-$nextlink = "$PHP_SELF?offset=$next";
+$nextlink = $_SERVER['PHP_SELF'] . "?offset=$next";
print "<table border=\"0\" cellspacing=\"1\"
cellpadding=\"5\">\n";
print " <tr bgcolor=\"#cccccc\">\n";
print " <th>";
@@ -61,7 +61,7 @@
printf('<b>%s</b> ', strtoupper($fl));
} else {
printf('<a href="%s?letter=%s">%s</a> ',
- $PHP_SELF, $fl, strtoupper($fl));
+ $_SERVER['PHP_SELF'], $fl, strtoupper($fl));
}
}
print '</td><td rowspan="2">';
Index: pearweb/public_html/admin.php
diff -u pearweb/public_html/admin.php:1.13 pearweb/public_html/admin.php:1.14
--- pearweb/public_html/admin.php:1.13 Tue Apr 2 04:47:50 2002
+++ pearweb/public_html/admin.php Mon Apr 8 09:40:55 2002
@@ -143,8 +143,8 @@
print "$i <tr>\n";
print "$i <td>\n";
print "$i <b>$nby $ntime:</b>";
- if ($nby == $PHP_AUTH_USER) {
- $url = "$PHP_SELF?acreq=$acreq&cmd=Delete+note&id=$nid";
+ if ($nby == $_SERVER['PHP_AUTH_USER']) {
+ $url = $_SERVER['PHP_SELF'] .
"?acreq=$acreq&cmd=Delete+note&id=$nid";
$msg = "Are you sure you want to delete this note?";
print "[<a href=\"javascript:confirmed_goto('$url',
'$msg')\">delete your note</a>]";
}
@@ -158,7 +158,7 @@
} else {
print "No notes.";
}
- print "$i<form action=\"$PHP_SELF\" method=\"POST\">\n";
+ print "$i<form action=\"" . $_SERVER['PHP_SELF'] . "\"
method=\"POST\">\n";
print "$i<table cellpadding=\"2\" cellspacing=\"0\"
border=\"0\">\n";
print "$i <tr>\n";
print "$i <td>\n";
@@ -176,7 +176,7 @@
$bb->end();
?>
-<form action="<?= $PHP_SELF ?>" method="POST">
+<form action="<?php echo $_SERVER['PHP_SELF']; ?>"
method="POST">
<input type="hidden" name="cmd" value="" />
<input type="hidden" name="uid" value="<?= $requser->handle
?>" />
<table cellpadding="3" cellspacing="0" border="0"
width="90%">
@@ -205,7 +205,7 @@
if (is_array($requests) && sizeof($requests) > 0) {
foreach ($requests as $handle => $data) {
list($name, $email) = $data;
- print "<a href=\"$PHP_SELF?acreq=$handle\">$name
($handle)</a><br />\n";
+ print "<a href=\"" . $_SERVER['PHP_SELF'] .
"?acreq=$handle\">$name ($handle)</a><br />\n";
}
} else {
print "No account requests.";
Index: pearweb/public_html/login.php
diff -u pearweb/public_html/login.php:1.7 pearweb/public_html/login.php:1.8
--- pearweb/public_html/login.php:1.7 Thu Oct 25 10:02:19 2001
+++ pearweb/public_html/login.php Mon Apr 8 09:40:55 2002
@@ -8,7 +8,7 @@
if ($SERVER_PORT != 80) {
$url .= ":$SERVER_PORT";
}
-$bn = str_replace('.', '\.', basename($PHP_SELF));
+$bn = str_replace('.', '\.', basename($_SERVER['PHP_SELF']));
$url .= preg_replace(":/$bn\$:", "/", $REQUEST_URI);
header("Location: $url");
exit;
Index: pearweb/public_html/logout.php
diff -u pearweb/public_html/logout.php:1.4 pearweb/public_html/logout.php:1.5
--- pearweb/public_html/logout.php:1.4 Mon Oct 22 03:35:50 2001
+++ pearweb/public_html/logout.php Mon Apr 8 09:40:55 2002
@@ -2,7 +2,7 @@
if (isset($showmsg)) {
$delay = 3;
- Header("Refresh: $delay; url=\"$PHP_SELF\"");
+ Header("Refresh: $delay; url=\"" . $_SERVER['PHP_SELF'] .
"\"");
response_header("Logging Out...");
// $ua = $HTTP_USER_AGENT;
$logoutmsg = "Authorization failed. Retry?";
Index: pearweb/public_html/package-edit.php
diff -u pearweb/public_html/package-edit.php:1.6 pearweb/public_html/package-edit.php:1.7
--- pearweb/public_html/package-edit.php:1.6 Tue Feb 19 12:55:31 2002
+++ pearweb/public_html/package-edit.php Mon Apr 8 09:40:55 2002
@@ -2,7 +2,7 @@
/**
* Interface to update package information.
*
- * $Id: package-edit.php,v 1.6 2002/02/19 17:55:31 mj Exp $
+ * $Id: package-edit.php,v 1.7 2002/04/08 13:40:55 mj Exp $
*/
auth_require();
@@ -37,8 +37,8 @@
* The user has to be either a lead developer of the package or
* a PEAR administrator.
*/
-$lead = in_array($PHP_AUTH_USER, maintainer::get($_GET['id'], true));
-$admin = user::isAdmin($PHP_AUTH_USER);
+$lead = in_array($_SERVER['PHP_AUTH_USER'], maintainer::get($_GET['id'],
true));
+$admin = user::isAdmin($_SERVER['PHP_AUTH_USER']);
if (!$lead && !$admin) {
PEAR::raiseError("Only the lead maintainer of the package or PEAR
Index: pearweb/public_html/package-new.php
diff -u pearweb/public_html/package-new.php:1.6 pearweb/public_html/package-new.php:1.7
--- pearweb/public_html/package-new.php:1.6 Mon Apr 1 12:39:21 2002
+++ pearweb/public_html/package-new.php Mon Apr 8 09:40:55 2002
@@ -87,7 +87,7 @@
}
$categories = $dbh->getAssoc("SELECT id,name FROM categories ORDER BY name");
- $form =& new HTML_Form($PHP_SELF, "POST");
+ $form =& new HTML_Form($_SERVER['PHP_SELF'], "POST");
$form->addText("name", "Package Name", null, 20);
$form->addText("license", "License", null, 20);
$form->addSelect("category", "Category", $categories, '', 1,