mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 09:43:03 +00:00
tweaks to package functions and schema
This commit is contained in:
parent
7549ca2d96
commit
252afad9fc
4 changed files with 57 additions and 17 deletions
|
@ -444,19 +444,6 @@ function dbug($msg) {
|
|||
return;
|
||||
}
|
||||
|
||||
# check to see if the package name exists
|
||||
#
|
||||
function package_exists($name="") {
|
||||
if (!$name) {return 0;}
|
||||
$dbh = db_connect();
|
||||
$q = "SELECT COUNT(*) FROM Packages ";
|
||||
$q.= "WHERE Name = '".mysql_escape_string($name)."'";
|
||||
$result = db_query($q, $dbh);
|
||||
if (!$result) {return 0;}
|
||||
$row = mysql_fetch_row($result);
|
||||
return $row[0];
|
||||
}
|
||||
|
||||
# check to see if the user can overwrite an existing package
|
||||
#
|
||||
function can_overwrite_pkg($name="", $sid="") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue