diff options
author | Remi Collet <fedora@famillecollet.com> | 2010-06-08 20:25:59 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2010-06-08 20:25:59 +0200 |
commit | 825c4679551854f48c6c6b67e5c5b7f7322d24d2 (patch) | |
tree | e62a3dce1876ad502fbacf4efeb325a21acca31e /class/CommonTable.php | |
parent | 3c22a10c40837b1695ae04d120bbfc68da01059c (diff) |
improves previous, add active field to pearrepo table
Diffstat (limited to 'class/CommonTable.php')
-rw-r--r-- | class/CommonTable.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/class/CommonTable.php b/class/CommonTable.php index e049188..8fd0471 100644 --- a/class/CommonTable.php +++ b/class/CommonTable.php @@ -194,13 +194,15 @@ abstract class CommonTable * * @param string $fieldkey name of the field to use as index * @param string $fieldvalue name of the field to use as value + * @param array $crit for request * * @return hashtable */ - public function getHashtable($fieldkey, $fieldvalue) + public function getHashtable($fieldkey, $fieldvalue, array $crit=array()) { - $crit = array('FIELDS' => array($fieldkey, $fieldvalue), - 'ORDER' => $fieldkey); + $crit['FIELDS'] = array($fieldkey, $fieldvalue); + $crit['ORDER'] = $fieldkey; + $tab = array(); foreach ($this->request($crit) as $data) { $tab[$data[$fieldkey]] = $data[$fieldvalue]; |