From b9e0e9b31490ae4c3959164ccabb73573d91913c Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel Date: Sun, 10 May 2009 22:27:58 +0200 Subject: [PATCH] Allow a customized search result. --- koward/lib/Koward/Form/Search.php | 4 +-- koward/lib/Koward/View/Object/search.html.php | 39 ++++++++++++++++++++------- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/koward/lib/Koward/Form/Search.php b/koward/lib/Koward/Form/Search.php index b7f1c560f..5b7b04928 100644 --- a/koward/lib/Koward/Form/Search.php +++ b/koward/lib/Koward/Form/Search.php @@ -76,7 +76,7 @@ class Koward_Form_Search extends Horde_Form { } } - function &execute() + function &execute($attributes) { $this->getInfo($this->_vars, $info); if (isset($info['object'])) { @@ -93,7 +93,7 @@ class Koward_Form_Search extends Horde_Form { $this->koward->search['criteria'])); $filter = $this->koward->getServer()->searchQuery($criteria); $params = array('scope' => 'sub', - 'attributes' => array('dn')); + 'attributes' => array_merge(array('dn'), $attributes)); return $this->koward->getServer()->search($filter, $params); } } diff --git a/koward/lib/Koward/View/Object/search.html.php b/koward/lib/Koward/View/Object/search.html.php index 3059c8e50..a3e65b33c 100644 --- a/koward/lib/Koward/View/Object/search.html.php +++ b/koward/lib/Koward/View/Object/search.html.php @@ -7,8 +7,12 @@ - - + allowEdit): ?> + + + allowDelete): ?> + + attributes as $attribute => $info): ?> @@ -17,18 +21,33 @@ objectlist as $dn => $info): ?> - - + allowEdit): ?> + + + allowDelete): ?> + + attributes as $attribute => $ainfo): ?> -- 2.11.0
getImageDir('horde')) ?>getImageDir('horde')) ?>getImageDir('horde')) ?>getImageDir('horde')) ?>
- - - - + + + + + - escape($info[$attribute]) . ''; ?> + escape($value) . ''; ?> - escape($info[$attribute]) ?> + escape($value) ?>