diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-04-24 14:00:09 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-04-24 14:00:09 +0200 |
commit | 9ff30614b8500b1079f301365d5f11ff5f42fc0c (patch) | |
tree | dc6e4a4f1eb7c83c0ac4fca0fe4159648c00e8ad /web/html/pkgsubmit.php | |
parent | 897211374f0812d2a852f2e3595541827df44afc (diff) | |
download | aurweb-9ff30614b8500b1079f301365d5f11ff5f42fc0c.tar.xz |
pkgsubmit.php: Remove redundant uid_from_sid() invocations.
uid_from_sid() is called once at the very beginning of the script,
storing the actual user identifier in "$uid". No need to fire up another
query.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html/pkgsubmit.php')
-rw-r--r-- | web/html/pkgsubmit.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 5797626..4ba0b74 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -327,14 +327,12 @@ if ($_COOKIE["AURSID"]): mysql_real_escape_string($new_pkgbuild['license']), mysql_real_escape_string($new_pkgbuild['pkgdesc']), mysql_real_escape_string($new_pkgbuild['url']), - uid_from_sid($_COOKIE["AURSID"]), + $uid, $packageID); db_query($q, $dbh); } else { - $uid = uid_from_sid($_COOKIE["AURSID"]); - # This is a brand new package $q = sprintf("INSERT INTO Packages (Name, License, Version, CategoryID, Description, URL, SubmittedTS, ModifiedTS, SubmitterUID, MaintainerUID) VALUES ('%s', '%s', '%s-%s', %d, '%s', '%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), %d, %d)", mysql_real_escape_string($new_pkgbuild['pkgname']), |