summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorCallan Barrett <wizzomafizzo@gmail.com>2008-06-29 18:12:59 +0200
committerLoui Chang <louipc.ist@gmail.com>2008-07-09 20:26:13 +0200
commit5528501497af781ff9d05e3110aa5e1b78fb71bf (patch)
tree4fee7e7e47876ad2e7a3507d9474c2697bd4224a /web
parent2feee92a75d4fe7042be52d1eef4e6e466af4967 (diff)
downloadaur-5528501497af781ff9d05e3110aa5e1b78fb71bf.tar.gz
aur-5528501497af781ff9d05e3110aa5e1b78fb71bf.tar.xz
Redirect on package submission
On a successful package submit there will be a redirect to the package details page of the packages, no more successful message Also got rid of the $warning stuff, what the hell was that for? Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web')
-rw-r--r--web/html/pkgsubmit.php50
1 files changed, 17 insertions, 33 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 4d15ebe4..0d245b84 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -1,28 +1,15 @@
<?php
-
-include("config.inc");
-
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
require('Archive/Tar.php');
require('File/Find.php');
+include("config.inc");
include("aur.inc"); # access AUR common functions
include("submit_po.inc"); # use some form of this for i18n support
include("pkgfuncs.inc"); # package functions
set_lang(); # this sets up the visitor's language
check_sid(); # see if they're still logged in
-html_header("Submit");
-
-?>
-
-<div class="pgbox">
- <div class="pgboxtitle">
- <span class="f3"><?php print __("Submit"); ?></span>
- </div>
- <div class="pgboxbody">
-
-<?php
if ($_COOKIE["AURSID"]):
@@ -342,6 +329,8 @@ if ($_COOKIE["AURSID"]):
$q .= $pdata["ID"] . ", '" . mysql_real_escape_string($src) . "')";
db_query($q, $dbh);
}
+
+ header('Location: packages.php?ID=' . $pdata['ID']);
} else {
@@ -385,6 +374,8 @@ if ($_COOKIE["AURSID"]):
$q .= $packageID . ", '" . mysql_real_escape_string($src) . "')";
db_query($q, $dbh);
}
+
+ header('Location: packages.php?ID=' . $packageID);
}
}
@@ -392,7 +383,19 @@ if ($_COOKIE["AURSID"]):
chdir($_SERVER['DOCUMENT_ROOT']);
}
+# Logic over, let's do some output
+
+html_header("Submit");
+
+?>
+
+<div class="pgbox">
+ <div class="pgboxtitle">
+ <span class="f3"><?php print __("Submit"); ?></span>
+ </div>
+ <div class="pgboxbody">
+<?php
if (!$_REQUEST["pkgsubmit"] || $error):
# User is not uploading, or there were errors uploading - then
# give the visitor the default upload form
@@ -405,14 +408,6 @@ if ($_COOKIE["AURSID"]):
<?php
endif;
- if ($warning):
-?>
-
-<br><span class='error'><?php print $warning; ?></span><br />
-<br />
-
-<?php
- endif;
$pkg_categories = pkgCategories();
$pkg_locations = pkgLocations();
@@ -461,17 +456,6 @@ if ($_COOKIE["AURSID"]):
<?php
endif;
- else:
- print __("Package upload successful.");
-
- if ($warning):
-?>
-
-<span class='warning'><?php print $warning; ?></span><br />
-<br />
-
-<?php
- endif;
endif;
else:
# Visitor is not logged in