Use Git repositories to store packages

* Remove package submission page from the web interface.
* Replace PKGBUILD and tarball links with links to cgit.
* Remove the "URLPath" field from RPC replies.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2014-06-06 10:34:28 +02:00
parent 943b6bc976
commit 74edb6fea9
12 changed files with 12 additions and 3664 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,33 +0,0 @@
<?php
/**
* This is only meant for PHP 5 to get rid of certain strict warning
* that doesn't get hidden since it's in the shutdown function
*/
class PEAR5
{
/**
* If you have a class that's mostly/entirely static, and you need static
* properties, you can use this method to simulate them. Eg. in your method(s)
* do this: $myVar = &PEAR5::getStaticProperty('myclass', 'myVar');
* You MUST use a reference, or they will not persist!
*
* @access public
* @param string $class The calling classname, to prevent clashes
* @param string $var The variable to retrieve.
* @return mixed A reference to the variable. If not set it will be
* auto initialised to NULL.
*/
static function &getStaticProperty($class, $var)
{
static $properties;
if (!isset($properties[$class])) {
$properties[$class] = array();
}
if (!array_key_exists($var, $properties[$class])) {
$properties[$class][$var] = null;
}
return $properties[$class][$var];
}
}

File diff suppressed because it is too large Load diff

View file

@ -227,7 +227,6 @@ class AurJSON {
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$resultcount++;
$pkgbase_name = $row['PackageBase'];
$row['URLPath'] = $package_url . substr($pkgbase_name, 0, 2) . "/" . $pkgbase_name . "/" . $pkgbase_name . ".tar.gz";
/*
* Unfortunately, mysql_fetch_assoc() returns

View file

@ -914,45 +914,6 @@ function pkgbase_change_category($base_id) {
return array(true, __("Package category changed."));
}
/**
* Add package base information to the database
*
* @param string $name Name of the new package base
* @param int $category_id Category for the new package base
* @param int $uid User ID of the package uploader
*
* @return int ID of the new package base
*/
function pkgbase_create($name, $category_id, $uid) {
$dbh = DB::connect();
$q = sprintf("INSERT INTO PackageBases (Name, CategoryID, " .
"SubmittedTS, ModifiedTS, SubmitterUID, MaintainerUID, " .
"PackagerUID) VALUES (%s, %d, UNIX_TIMESTAMP(), " .
"UNIX_TIMESTAMP(), %d, %d, %d)",
$dbh->quote($name), $category_id, $uid, $uid, $uid);
$dbh->exec($q);
return $dbh->lastInsertId();
}
/**
* Update package base information for a specific package base
*
* @param string $name Name of the updated package base
* @param int $base_id The package base ID of the affected package
* @param int $uid User ID of the package uploader
*
* @return void
*/
function pkgbase_update($base_id, $name, $uid) {
$dbh = DB::connect();
$q = sprintf("UPDATE PackageBases SET " .
"Name = %s, ModifiedTS = UNIX_TIMESTAMP(), " .
"MaintainerUID = %d, PackagerUID = %d, OutOfDateTS = NULL " .
"WHERE ID = %d",
$dbh->quote($name), $uid, $uid, $base_id);
$dbh->exec($q);
}
/**
* Change the category a package base belongs to
*

View file

@ -183,36 +183,6 @@ function pkg_relations($pkgid) {
return $rels;
}
/**
* Get the ID of a dependency type given its name
*
* @param string $name The name of the dependency type
*
* @return int The ID of the dependency type
*/
function pkg_dependency_type_id_from_name($name) {
$dbh = DB::connect();
$q = "SELECT ID FROM DependencyTypes WHERE Name = ";
$q.= $dbh->quote($name);
$result = $dbh->query($q);
return $result->fetch(PDO::FETCH_COLUMN, 0);
}
/**
* Get the ID of a relation type given its name
*
* @param string $name The name of the relation type
*
* @return int The ID of the relation type
*/
function pkg_relation_type_id_from_name($name) {
$dbh = DB::connect();
$q = "SELECT ID FROM RelationTypes WHERE Name = ";
$q.= $dbh->quote($name);
$result = $dbh->query($q);
return $result->fetch(PDO::FETCH_COLUMN, 0);
}
/**
* Get the HTML code to display a package dependency link
*
@ -779,6 +749,7 @@ function sanitize_ids($ids) {
}
/**
<<<<<<< HEAD
* Add package information to the database for a specific package
*
* @param int $base_id ID of the package base

View file

@ -16,7 +16,6 @@ $ROUTES = array(
'/passreset' => 'passreset.php',
'/rpc' => 'rpc.php',
'/rss' => 'rss.php',
'/submit' => 'pkgsubmit.php',
'/tu' => 'tu.php',
'/addvote' => 'addvote.php',
);