summaryrefslogtreecommitdiffstats
path: root/class/CommonTable.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2010-06-08 20:25:59 +0200
committerRemi Collet <fedora@famillecollet.com>2010-06-08 20:25:59 +0200
commit825c4679551854f48c6c6b67e5c5b7f7322d24d2 (patch)
treee62a3dce1876ad502fbacf4efeb325a21acca31e /class/CommonTable.php
parent3c22a10c40837b1695ae04d120bbfc68da01059c (diff)
improves previous, add active field to pearrepo table
Diffstat (limited to 'class/CommonTable.php')
-rw-r--r--class/CommonTable.php8
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];