cvs: pearweb /public_html release-upload.php
| From: | Thomas V.V.Cox | Date: | Sun, 27 Jan 2002 19:58:52 +0000 |
| Subject: | cvs: pearweb /public_html release-upload.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-2190@lists.php.net to get a copy of this message | ||
cox Sun Jan 27 14:58:52 2002 EDT
Modified files:
/pearweb/public_html release-upload.php
Log:
Added cancel button
Index: pearweb/public_html/release-upload.php
diff -u pearweb/public_html/release-upload.php:1.9 pearweb/public_html/release-upload.php:1.10
--- pearweb/public_html/release-upload.php:1.9 Sun Jan 27 09:56:49 2002
+++ pearweb/public_html/release-upload.php Sun Jan 27 14:58:52 2002
@@ -35,8 +35,8 @@
$display_form = false;
$display_verification = true;
- }
- if (isset($verify)) {
+ } elseif (isset($verify)) {
+
$distfile = PEAR_UPLOAD_TMPDIR . '/' . basename($distfile);
if (!@is_file($distfile)) {
display_error("No verified file found"); break;
@@ -56,7 +56,15 @@
make_link("package-info.php?pacid=$pacid", 'Visit package home')
.
'</center>';
$display_form = $display_verification = false;
- }
+
+ } elseif (isset($cancel)) {
+
+ $distfile = PEAR_UPLOAD_TMPDIR . '/' . basename($distfile);
+ if (@is_file($distfile)) {
+ @unlink($distfile);
+ }
+ header("Location: $PHP_SELF"); exit;
+ }
} while (false);
PEAR::popErrorHandling();
@@ -123,6 +131,7 @@
$form =& new HTML_Form($PHP_SELF, "POST");
$form->addHidden('distfile', $tmpfile);
$form->addSubmit('verify', 'Verify Release');
+ $form->addSubmit('cancel', 'Cancel');
/* XXX Do we really need this? */
foreach ($info as $name => $value) {
if (is_string($value)) {