Fixes for issues introduced by commit bbe87c6e2

This commit is contained in:
Deon George 2009-07-27 17:18:25 +10:00
parent 5938302012
commit 29cb490571
3 changed files with 9 additions and 3 deletions

View File

@ -65,7 +65,7 @@ printf('%s <b>%s</b> %s <b>%s</b>:',
$possible_members = array(); $possible_members = array();
for ($i=0;$i<count($possible_values);$i++) { for ($i=0;$i<count($possible_values);$i++) {
if (preg_match("/^".$request['attr']."$/i",$_SESSION[APPCONFIG]->getValue('modify_member','posixgroupattr'))) if (preg_match("/^".$request['attr']."$/i",$_SESSION[APPCONFIG]->getValue('modify_member','posixgroupattr')))
$possible_members[$i] = $possible_values[$i][$_SESSION[APPCONFIG]->getValue('modify_member','posixattr')]; $possible_members[$i] = $possible_values[$i][$_SESSION[APPCONFIG]->getValue('modify_member','posixattr')][0];
else else
$possible_members[$i] = $possible_values[$i][$_SESSION[APPCONFIG]->getValue('modify_member','attr')]; $possible_members[$i] = $possible_values[$i][$_SESSION[APPCONFIG]->getValue('modify_member','attr')];
} }

View File

@ -271,6 +271,8 @@ class TemplateRender extends PageRender {
* @todo This could probably be merged with PickList * @todo This could probably be merged with PickList
*/ */
case 'MultiList': case 'MultiList':
$args[2] = strtolower($args[2]);
# arg5 overrides our container # arg5 overrides our container
if (empty($args[5])) if (empty($args[5]))
$container = $server->getContainerPath($container,$args[0]); $container = $server->getContainerPath($container,$args[0]);
@ -457,6 +459,8 @@ class TemplateRender extends PageRender {
* - csv list (, separator) of sort attributes (less to more important) * - csv list (, separator) of sort attributes (less to more important)
*/ */
case 'PickList': case 'PickList':
$args[2] = strtolower($args[2]);
# arg5 overrides our container # arg5 overrides our container
if (empty($args[5])) if (empty($args[5]))
$container = $server->getContainerPath($container,$args[0]); $container = $server->getContainerPath($container,$args[0]);

View File

@ -1432,7 +1432,8 @@ function get_next_number($base,$attr,$increment=false,$filter=false,$startmin=nu
foreach ($search as $dn => $values) { foreach ($search as $dn => $values) {
$values = array_change_key_case($values); $values = array_change_key_case($values);
array_push($autonum,$values[$attr]); foreach ($values[$attr] as $value)
array_push($autonum,$value);
} }
$autonum = array_unique($autonum); $autonum = array_unique($autonum);
@ -1507,7 +1508,7 @@ function get_next_number($base,$attr,$increment=false,$filter=false,$startmin=nu
foreach ($search as $dn => $values) { foreach ($search as $dn => $values) {
$values = array_change_key_case($values); $values = array_change_key_case($values);
$autonum = $values[$attr]; $autonum = $values[$attr][0];
$poolDN = $values['dn']; $poolDN = $values['dn'];
} }
@ -2861,6 +2862,7 @@ function return_ldap_hash($base,$filter,$key,$attrs,$sort=true) {
$server->getIndex(),$base,$filter,$key,$attrs,$sort); $server->getIndex(),$base,$filter,$key,$attrs,$sort);
$server = $_SESSION[APPCONFIG]->getServer(get_request('server_id','REQUEST')); $server = $_SESSION[APPCONFIG]->getServer(get_request('server_id','REQUEST'));
$key = strtolower($key);
$query = array(); $query = array();
$query['base'] = $base; $query['base'] = $base;