summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'class.portage.category.php')
-rw-r--r--class.portage.category.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/class.portage.category.php b/class.portage.category.php
index 7b3ced6..b4f8a96 100644
--- a/class.portage.category.php
+++ b/class.portage.category.php
@@ -1,6 +1,6 @@
<?
- class PortageCategory extends PortageTree {
+ class PortageCategory {
private $name;
protected $dir;
@@ -10,7 +10,8 @@
function __construct($str = null) {
- parent::__construct();
+ global $hits;
+ $hits['category']++;
if($str)
$this->setCategory($str);
@@ -27,9 +28,11 @@
protected function setCategory($str) {
+ $tree =& PortageTree::singleton();
+
$str = basename($str);
- $dir = $this->getTree()."/".$str;
- $this->cache_dir = $this->getTree()."/metadata/cache/".$str;
+ $dir = $tree->getTree()."/".$str;
+ $this->cache_dir = $tree->getTree()."/metadata/cache/".$str;
$this->metadata = $dir."/metadata.xml";
if(is_dir($dir)) {