mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
2feee92a75
commit
5528501497
1 changed files with 17 additions and 33 deletions
|
@ -1,28 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include("config.inc");
|
|
||||||
|
|
||||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
|
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
|
||||||
require('Archive/Tar.php');
|
require('Archive/Tar.php');
|
||||||
require('File/Find.php');
|
require('File/Find.php');
|
||||||
|
|
||||||
|
include("config.inc");
|
||||||
include("aur.inc"); # access AUR common functions
|
include("aur.inc"); # access AUR common functions
|
||||||
include("submit_po.inc"); # use some form of this for i18n support
|
include("submit_po.inc"); # use some form of this for i18n support
|
||||||
include("pkgfuncs.inc"); # package functions
|
include("pkgfuncs.inc"); # package functions
|
||||||
|
|
||||||
set_lang(); # this sets up the visitor's language
|
set_lang(); # this sets up the visitor's language
|
||||||
check_sid(); # see if they're still logged in
|
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"]):
|
if ($_COOKIE["AURSID"]):
|
||||||
|
|
||||||
|
@ -343,6 +330,8 @@ if ($_COOKIE["AURSID"]):
|
||||||
db_query($q, $dbh);
|
db_query($q, $dbh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header('Location: packages.php?ID=' . $pdata['ID']);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
# This is a brand new package
|
# This is a brand new package
|
||||||
|
@ -386,13 +375,27 @@ if ($_COOKIE["AURSID"]):
|
||||||
db_query($q, $dbh);
|
db_query($q, $dbh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header('Location: packages.php?ID=' . $packageID);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
chdir($_SERVER['DOCUMENT_ROOT']);
|
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):
|
if (!$_REQUEST["pkgsubmit"] || $error):
|
||||||
# User is not uploading, or there were errors uploading - then
|
# User is not uploading, or there were errors uploading - then
|
||||||
# give the visitor the default upload form
|
# give the visitor the default upload form
|
||||||
|
@ -403,14 +406,6 @@ if ($_COOKIE["AURSID"]):
|
||||||
<span class='error'><?php print $error; ?></span><br />
|
<span class='error'><?php print $error; ?></span><br />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<?php
|
|
||||||
endif;
|
|
||||||
if ($warning):
|
|
||||||
?>
|
|
||||||
|
|
||||||
<br><span class='error'><?php print $warning; ?></span><br />
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
|
@ -461,17 +456,6 @@ if ($_COOKIE["AURSID"]):
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
else:
|
|
||||||
print __("Package upload successful.");
|
|
||||||
|
|
||||||
if ($warning):
|
|
||||||
?>
|
|
||||||
|
|
||||||
<span class='warning'><?php print $warning; ?></span><br />
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<?php
|
|
||||||
endif;
|
|
||||||
endif;
|
endif;
|
||||||
else:
|
else:
|
||||||
# Visitor is not logged in
|
# Visitor is not logged in
|
||||||
|
|
Loading…
Add table
Reference in a new issue