pkgfuncs.inc.php: Remove several unused functions

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2014-04-05 16:02:20 +02:00
parent ee1048b268
commit 434b04e826

View file

@ -648,32 +648,6 @@ function pkg_create($base_id, $pkgname, $license, $pkgver, $pkgdesc, $pkgurl) {
return $dbh->lastInsertId();
}
/**
* Update all database information for a specific package
*
* @param string $pkgname Name of the updated package
* @param string $license License of the updated package
* @param string $pkgver Version of the updated package
* @param string $pkgdesc Description of updated package
* @param string $pkgurl The upstream URL for the package
* @param int $uid The user ID of the updater
* @param int $pkgid The package ID of the updated package
*
* @return void
*/
function pkg_update($pkgname, $license, $pkgver, $pkgdesc, $pkgurl, $pkgid) {
$dbh = DB::connect();
$q = sprintf("UPDATE Packages SET Name = %s, Version = %s, " .
"License = %s, Description = %s, URL = %s WHERE ID = %d",
$dbh->quote($pkgname),
$dbh->quote($pkgver),
$dbh->quote($license),
$dbh->quote($pkgdesc),
$dbh->quote($pkgurl),
$pkgid);
$dbh->exec($q);
}
/**
* Add a dependency for a specific package to the database
*
@ -708,31 +682,3 @@ function pkg_add_src($pkgid, $pkgsrc) {
$dbh->exec($q);
}
/**
* Remove package dependencies from a specific package
*
* @param string $pkgid The package ID to remove package dependencies from
*
* @return void
*/
function pkg_remove_deps($pkgid) {
$dbh = DB::connect();
$q = "DELETE FROM PackageDepends WHERE PackageID = " . $pkgid;
$dbh->exec($q);
}
/**
* Remove package sources from a specific package
*
* @param string $pkgid The package ID to remove package sources from
*
* @return void
*/
function pkg_remove_sources($pkgid) {
$dbh = DB::connect();
$q = "DELETE FROM PackageSources WHERE PackageID = " . $pkgid;
$dbh->exec($q);
}