tweaks to package functions and schema

This commit is contained in:
pjmattal 2004-12-15 01:33:12 +00:00
parent 7549ca2d96
commit 252afad9fc
4 changed files with 57 additions and 17 deletions

View file

@ -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="") {