mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 09:43:03 +00:00
everything except package contents done
This commit is contained in:
parent
bcf1c50b77
commit
c8a9702620
3 changed files with 100 additions and 26 deletions
|
@ -127,7 +127,7 @@ function create_dummy($pname="", $sid="") {
|
|||
$q = "SELECT ID FROM Packages WHERE Name = '";
|
||||
$q.= mysql_escape_string($pname)."'";
|
||||
$result = db_query($q, $dbh);
|
||||
if (!$result) {
|
||||
if (!mysql_num_rows($result)) {
|
||||
# Insert the dummy
|
||||
#
|
||||
$q = "INSERT INTO Packages (Name, Description, URL, SubmittedTS, ";
|
||||
|
@ -138,10 +138,10 @@ function create_dummy($pname="", $sid="") {
|
|||
if (!$result) {
|
||||
return NULL;
|
||||
}
|
||||
return mysql_insert_id($result);
|
||||
return mysql_insert_id($dbh);
|
||||
} else {
|
||||
$data = mysql_fetch_row($result);
|
||||
return $data['ID'];
|
||||
return $data[0];
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue