diff options
Diffstat (limited to 'class/Parser.php')
-rw-r--r-- | class/Parser.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/class/Parser.php b/class/Parser.php index cdb984f..d4f6269 100644 --- a/class/Parser.php +++ b/class/Parser.php @@ -481,11 +481,22 @@ class Parser $tot = 0; foreach($pktable->request(array('ORDER'=>'rpmname')) as $rec) { if ($rep = $pk->getPackage($rec['pkgname'])) { + $v = explode('/', $rec['pkgname']); + switch(count($v)) { + case 3: + $vendor = $v[0] . '/'.$v[1]; + break; + case 2: + $vendor = "packagist/" . $v[0]; + break; + default: + $vendor = "packagist"; + } $id = false; if ($rep['stable']) { $id = $uptable->record( 'composer', - 'packagist', + $vendor, $rec['rpmname'], $rep['stable'], true @@ -494,7 +505,7 @@ class Parser if ($rep['unstable']) { $id = $uptable->record( 'composer', - 'packagist', + $vendor, $rec['rpmname'], $rep['unstable'], false, |