summaryrefslogtreecommitdiffstats
path: root/class
diff options
context:
space:
mode:
Diffstat (limited to 'class')
-rw-r--r--class/FedoraClient.php2
-rw-r--r--class/FedoraPkgdb.php10
2 files changed, 10 insertions, 2 deletions
diff --git a/class/FedoraClient.php b/class/FedoraClient.php
index ed29f54..c1a10c5 100644
--- a/class/FedoraClient.php
+++ b/class/FedoraClient.php
@@ -44,7 +44,7 @@ require_once 'Cache/Lite.php';
abstract class FedoraClient
{
- private $url;
+ protected $url;
private $agent;
private $debug = 0;
protected $cache;
diff --git a/class/FedoraPkgdb.php b/class/FedoraPkgdb.php
index ee54119..9f2a094 100644
--- a/class/FedoraPkgdb.php
+++ b/class/FedoraPkgdb.php
@@ -37,10 +37,13 @@
class FedoraPkgdb extends FedoraClient
{
+ private $suburl;
function __construct (array $options=array())
{
parent::__construct('https://admin.fedoraproject.org/pkgdb/', $options);
+ $this->suburl = 'acls/name/';
+
$this->logDebug(
3,
__CLASS__."::".__FUNCTION__
@@ -75,9 +78,14 @@ class FedoraPkgdb extends FedoraClient
return $branches;
}
+ function getPackageURL($name)
+ {
+ return $this->url.$this->suburl.urlencode($name);
+ }
+
function getPackageInfo($name, $refresh=false)
{
- $url="acls/name/".urlencode($name);
+ $url=$this->suburl.urlencode($name);
$rep = ($refresh ? false : $this->cache->get($url, __CLASS__));
if ($rep) {
$this->logDebug(