diff options
-rw-r--r-- | class/TablePackagist.php | 2 | ||||
-rw-r--r-- | get.php | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/class/TablePackagist.php b/class/TablePackagist.php index 74cc9ea..4dd25bf 100644 --- a/class/TablePackagist.php +++ b/class/TablePackagist.php @@ -49,7 +49,7 @@ class TablePackagist extends CommonTable `pkgname` varchar(100) NOT NULL, `rpmname` varchar(200) NOT NULL, PRIMARY KEY (`id`), - UNIQUE KEY `pkgname` (`pkgname`), + KEY `pkgname` (`pkgname`), UNIQUE KEY `rpmname` (`rpmname`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;"; $this->exec($sql); @@ -54,6 +54,12 @@ try { $result[$rec['pkgname']] = $rec['rpmname']; } break; + case 'packagist2': + $pkgist = new TablePackagist($db); + foreach($pkgist->request(array('ORDER'=>'rpmname')) as $rec) { + $result[$rec['rpmname']] = $rec['pkgname']; + } + break; default: die("Invalid arg"); } |