1
0
Fork 0

Simplify code

pull/299/merge
Jordi Boggiano 2012-02-14 16:06:09 +01:00
parent 08de99f2be
commit e92e3ba355
1 changed files with 1 additions and 4 deletions

View File

@ -51,10 +51,7 @@ class PearRepository extends ArrayRepository
$categories = $categoryXML->getElementsByTagName("c");
foreach ($categories as $category) {
$link = $category->getAttribute("xlink:href");
if (0 !== strpos($link, '/')) {
$link = '/' . $link;
}
$link = '/' . ltrim($category->getAttribute("xlink:href"), '/');
try {
$packagesLink = str_replace("info.xml", "packagesinfo.xml", $link);
$this->fetchPear2Packages($this->url . $packagesLink);