From: hickert Date: Tue, 4 May 2010 14:02:55 +0000 (+0000) Subject: added new kind of object listing X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e1dd0189d58512fe9dcdb04605e7440c9655ad3a;p=gosa.git added new kind of object listing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18045 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/addons/configViewer/class_filterProperties.inc b/gosa-core/plugins/addons/configViewer/class_filterProperties.inc index 85975aeea..d89d15e5d 100644 --- a/gosa-core/plugins/addons/configViewer/class_filterProperties.inc +++ b/gosa-core/plugins/addons/configViewer/class_filterProperties.inc @@ -1,13 +1,46 @@ configRegistry->getAllProperties(); + $ret = array(); + foreach($all as $property){ + $entry = array(); + $entry = filterCONFIGPROPERTIES::fakeLdapResult($entry, 'cn', $property->getName()); + $entry = filterCONFIGPROPERTIES::fakeLdapResult($entry, 'objectClass', $property->getStatus()); + $entry = filterCONFIGPROPERTIES::fakeLdapResult($entry, 'status', $property->getStatus()); + $entry = filterCONFIGPROPERTIES::fakeLdapResult($entry, 'description', $property->getDescription()); + $entry = filterCONFIGPROPERTIES::fakeLdapResult($entry, 'value', $property->getValue()); + $entry = filterCONFIGPROPERTIES::fakeLdapResult($entry, 'default', $property->getDefault()); + $entry = filterCONFIGPROPERTIES::fakeLdapResult($entry, 'check', $property->getCheck()); + $entry = filterCONFIGPROPERTIES::fakeLdapResult($entry, 'type', $property->getType()); + $entry = filterCONFIGPROPERTIES::fakeLdapResult($entry, 'migrate', $property->getMigrate()); + $entry = filterCONFIGPROPERTIES::fakeLdapResult($entry, 'group', $property->getGroup()); + $entry['dn'] = $property->getName(); + $ret[] = $entry; + } + + return($ret); } + static function fakeLdapResult($result,$name, $value){ + if(!is_array($value)){ + $value = array($value); + } + $value['count'] = count($value); + $result[] = $name; + $result[$name] = $value; + if(!isset($result['count'])){ + $result['count'] =0; + } + $result['count'] ++; + return($result); + } + static function unifyResult($result) { $res=array(); diff --git a/gosa-core/plugins/addons/configViewer/main.inc b/gosa-core/plugins/addons/configViewer/main.inc index 1737aa979..fca2fa756 100644 --- a/gosa-core/plugins/addons/configViewer/main.inc +++ b/gosa-core/plugins/addons/configViewer/main.inc @@ -23,8 +23,6 @@ */ if ($remove_lock){ if(session::is_set('configViewer')){ - $configViewer = session::get('configViewer'); - $configViewer->save_object(); } } @@ -33,8 +31,6 @@ if ($remove_lock){ */ if ( $cleanup ){ if (session::is_set('configViewer')){ - $configViewer = session::get('configViewer'); - $configViewer->save_object(); } session::un_set('configViewer'); }else{ @@ -42,7 +38,7 @@ if ( $cleanup ){ /* Create logview object on demand */ if (!session::is_set('configViewer')){ - session::set('configViewer',new configViewer($config)); + session::set('configViewer',new configViewer($config, get_userinfo())); } $configViewer = session::get('configViewer'); diff --git a/gosa-core/plugins/addons/configViewer/property-filter.xml b/gosa-core/plugins/addons/configViewer/property-filter.xml index 16eec7dc2..cf8f5cb8d 100644 --- a/gosa-core/plugins/addons/configViewer/property-filter.xml +++ b/gosa-core/plugins/addons/configViewer/property-filter.xml @@ -7,13 +7,14 @@ true default one + dummy default - PROPERTIES + CONFIGPROPERTIES state=* @@ -27,8 +28,8 @@ default2 - PROPERTIES - state=modified> + CONFIGPROPERTIES + state=modified state diff --git a/gosa-core/plugins/addons/configViewer/property-list.xml b/gosa-core/plugins/addons/configViewer/property-list.xml index b973198d8..891c5a499 100644 --- a/gosa-core/plugins/addons/configViewer/property-list.xml +++ b/gosa-core/plugins/addons/configViewer/property-list.xml @@ -6,33 +6,41 @@ false false true - - sudo - + + all + 1 - - sudoRole - sudo - sudo + + none + all + all plugins/sudo/images/select_sudo.png - |20px;c|120px||170px;r| + |20px;c|120px||||170px;r| %{filter:objectType(dn,objectClass)} + + + group + string + %{group} + true + + cn string - %{filter:link(row,dn,"%s",cn)} + %{cn} true @@ -40,7 +48,7 @@ descriptionstring - %{filter:link(row,dn,"%s",description)} + %{description}true