mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
pkgsubmit: store the previous path with getcwd()
This solves the problem of include files not being found after an error. $_SERVER['DOCUMENT_ROOT'] is not reliable because the AUR might be installed in a subdirectory. This closes http://bugs.archlinux.org/task/16887 Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
parent
b18fb08ddc
commit
3f47ee740d
1 changed files with 3 additions and 1 deletions
|
@ -12,6 +12,8 @@ include_once("pkgfuncs.inc"); # package functions
|
|||
set_lang(); # this sets up the visitor's language
|
||||
check_sid(); # see if they're still logged in
|
||||
|
||||
$cwd = getcwd();
|
||||
|
||||
if ($_COOKIE["AURSID"]):
|
||||
|
||||
# Track upload errors
|
||||
|
@ -421,7 +423,7 @@ if ($_COOKIE["AURSID"]):
|
|||
}
|
||||
}
|
||||
|
||||
chdir($_SERVER['DOCUMENT_ROOT']);
|
||||
chdir($cwd);
|
||||
}
|
||||
|
||||
# Logic over, let's do some output
|
||||
|
|
Loading…
Add table
Reference in a new issue