summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b3f87dd)
raw | patch | inline | side by side (parent: b3f87dd)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 6 May 2010 08:11:39 +0000 (08:11 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 6 May 2010 08:11:39 +0000 (08:11 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18155 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_core.inc | patch | blob | history |
index 421df114a024c7bf7576cb3723b9b71c76a6dfd8..cae46d74fd0968688ce8a89ae1d512c5cbcc2c65 100644 (file)
class core extends plugin {
- static function getPropertyValues()
+ static function getPropertyValues($class,$name,$value,$type)
{
- return(array(1,2,3));
+ $list = array();
+ switch($name){
+ case 'passwordDefaultHash':
+ $tmp = passwordMethod::get_available_methods();
+ foreach($tmp['name'] as $id => $method){
+ $desc = $tmp[$id]['name'];
+ $list[$method] = $desc;
+ }
+ break;
+ case 'accountPrimaryAttribute':
+ $list = array('uid' => 'uid', 'cn' => 'cn');
+ break;
+ case 'loginAttribute':
+ $list = array(
+ 'uid' => 'uid',
+ 'mail' => 'mail',
+ 'both' => 'uid & mail');
+ break;
+ case 'timezone':
+ $tmp = timezone::_get_tz_zones();
+ foreach($tmp['TIMEZONES'] as $name => $offset){
+ if($offset >= 0){
+ $list[$name] = $name." ( + ".sprintf("%0.2f",$offset/(60*60))." "._("hours").")";
+ }else{
+ $offset = $offset * -1;
+ $list[$name] = $name." ( - ".sprintf("%0.2f",($offset/(60*60)))." "._("hours").")";
+ }
+ }
+ break;
+ case 'mailAttribute':
+ $list = array('mail' => 'mail','uid' => 'uid');
+ break;
+ case 'mailMethod':
+ $list = mailMethod::get_methods();
+ break;
+ case 'language':
+ $tmp = get_languages(TRUE);
+ $list[""] = _("Automatic");
+ foreach($tmp as $key => $desc){
+ $list[$key] = $desc;
+ }
+ break;
+ case 'modificationDetectionAttribute':
+ $list = array('entryCSN' => 'entryCSN (OpenLdap)','textCSN'=>'textCSN (Sun DS)');
+ break;
+ default: echo $name." ";$list = array();
+ }
+
+ if(!isset($list[$value])){
+ $list[$value] = $value." ("._("User value").")";
+ }
+
+ return($list);
}
static function plInfo()