cvs: pearweb /public_html/bugs bug.php
| From: | Pierre-Alain Joye | Date: | Wed, 22 Feb 2006 01:15:38 +0000 |
| Subject: | cvs: pearweb /public_html/bugs bug.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-38483@lists.php.net to get a copy of this message | ||
pajoye Wed Feb 22 01:15:38 2006 UTC
Modified files:
/pearweb/public_html/bugs bug.php
Log:
- localredirect url cleanup, no confusion
http://cvs.php.net/viewcvs.cgi/pearweb/public_html/bugs/bug.php?r1=1.102&r2=1.103&diff_format=u
Index: pearweb/public_html/bugs/bug.php
diff -u pearweb/public_html/bugs/bug.php:1.102 pearweb/public_html/bugs/bug.php:1.103
--- pearweb/public_html/bugs/bug.php:1.102 Tue Feb 21 23:14:44 2006
+++ pearweb/public_html/bugs/bug.php Wed Feb 22 01:15:38 2006
@@ -15,7 +15,7 @@
* @package Bugs
* @copyright Copyright (c) 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License
- * @version $Id: bug.php,v 1.102 2006/02/21 23:14:44 pajoye Exp $
+ * @version $Id: bug.php,v 1.103 2006/02/22 01:15:38 pajoye Exp $
*/
/*
@@ -52,12 +52,12 @@
if (isset($_GET['unsubscribe'])) {
$unsubcribe = (int)$_GET['unsubscribe'];
+
$hash = isset($_GET['t']) ? $_GET['t'] : false;
$site == 'pear' ? $redirect = 'pecl' : $redirect = 'pear';
if (!$hash) {
-
- localRedirect('http://' . $redirect .
'.php.net/bugs/bug.php?id='.$id);
+ localRedirect('bug.php?id='.$id);
}
unsubscribe($id, $hash);
@@ -110,14 +110,11 @@
", email='" . escapeSQL($email) . "'";
$dbh->query($query);
- $site == 'pear' ? $redirect = 'pecl' : $redirect = 'pear';
-
- localRedirect('http://' . $redirect .
'.php.net/bugs/bug.php?id='.$id);
+ localRedirect('bug.php?id='.$id);
exit();
}
}
-
$trytoforce = isset($_POST['trytoforce']) ? (int)$_POST['trytoforce'] : false;
// fetch info about the bug into $bug
@@ -148,10 +145,7 @@
} else {
/* Generate the hash */
unsubscribe_hash($id, $email, $bug);
-
- $site == 'pear' ? $redirect = 'pecl' : $redirect = 'pear';
-
- localRedirect('http://' . $redirect .
'.php.net/bugs/bug.php?id='.$id);
+ localRedirect('bug.php?id='.$id);
exit();
}
}
@@ -166,7 +160,7 @@
// Redirect to PECL if it's a PECL bug
if (!empty($bug['package_type']) && $bug['package_type'] != $site) {
$site == 'pear' ? $redirect = 'pecl' : $redirect = 'pear';
- localRedirect('http://'.$redirect.'.php.net/bugs/bug.php?id='.$id);
+ localRedirect('http://' . $redirect .
'.php.net/bugs/bug.php?id='.$id);
exit();
}
@@ -178,8 +172,7 @@
delete_comment($id, $delete_comment);
$addon = '&thanks=1';
}
-
- localRedirect('http://pear.php.net/bugs/bug.php' .
"?id=$id&edit=1$addon");
+ localRedirect('bug.php' . "?id=$id&edit=1$addon");
exit();
}
@@ -201,7 +194,7 @@
// Don't allow comments by the original report submitter
if (rinse($_POST['in']['commentemail']) == $bug['email']) {
- localRedirect(htmlspecialchars($_SERVER['PHP_SELF']) .
"?id=$id&edit=2");
+ localRedirect('bug.php' . "?id=$id&edit=2");
exit();
}
@@ -404,7 +397,7 @@
if ($_POST['in'] && !isset($_POST['preview'])) {
if (!$errors) {
mail_bug_updates($bug, $_POST['in'], $from, $ncomment, $edit, $id);
- localRedirect(htmlspecialchars($_SERVER['PHP_SELF']) .
"?id=$id&thanks=$edit");
+ localRedirect('bug.php' . "?id=$id&thanks=$edit");
exit;
}
}