From: hickert Date: Fri, 30 Nov 2007 14:15:59 +0000 (+0000) Subject: Made conference languages selectable X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a6ef751e608b008ab4faa2a1e2183742186e6c7b;p=gosa.git Made conference languages selectable git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7965 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc index bae719aae..c79ce83f8 100644 --- a/plugins/gofon/conference/class_phoneConferenceGeneric.inc +++ b/plugins/gofon/conference/class_phoneConferenceGeneric.inc @@ -61,6 +61,9 @@ class conference extends plugin "goFonConferenceOption_M","goFonConferenceOption_s","goFonConferenceOption_i","goFonConferenceOption_c","goFonHomeServer", "goFonConferenceOption_D","goFonConferenceOptionFormat","goFonConferenceOptionLifetime","telephoneNumber","goFonConferenceOwner"); + var $language = "de"; + var $languages = array(); + var $objectclasses= array("top", "goFonConference"); function conference (&$config, $dn, $plugin= NULL) @@ -70,7 +73,9 @@ class conference extends plugin $this->ui = get_userinfo(); $this->orig_dn = $dn; - + $this->languages= get_languages(TRUE,TRUE); + + /* Check server configurations * Load all server configuration in $this->goFonHomeServers if available * and use first server as default if necessary. @@ -137,6 +142,10 @@ class conference extends plugin } $this->goFonConferenceOptionLifetime = $tmp1[1]; + if(isset($tmp1[2]) && isset($this->languages[$tmp1[2]])){ + $this->language = $tmp1[2]; + } + $this->old_tele_number = $this->telephoneNumber; } $this->old_dn = $this->dn; @@ -204,6 +213,8 @@ class conference extends plugin $tmp[$dn] = $val['SERVER']; } } + $smarty->assign("language",$this->language); + $smarty->assign("languages",$this->languages); $smarty->assign("goFonHomeServers",$tmp); $smarty->assign("goFonConferenceOptions", array("D"=>"Conference ","d"=>"Conference without PIN")); $smarty->assign("goFonConferenceOptionFormats", array("WAV"=>"Wave","GSM"=>"GSM","WAV49"=>"Wave49")); @@ -270,6 +281,11 @@ class conference extends plugin { if(isset($_POST['phoneConferenceGeneric'])){ + /* Get selected language */ + if(isset($_POST['language']) && isset($this->languages[get_post('language')])){ + $this->language = get_post('language'); + } + /* Create a base backup and reset the base directly after calling plugin::save_object(); Base will be set seperatly a few lines below */ @@ -480,7 +496,7 @@ class conference extends plugin $EXT[$i]['context'] = $context; $EXT[$i]['priority']= $i; $EXT[$i]['app'] ="SetLanguage"; - $EXT[$i]['appdata'] ="de"; + $EXT[$i]['appdata'] =$this->language; $i++; if($this->goFonConferenceOption_r == "r"){ @@ -659,6 +675,7 @@ class conference extends plugin } $this->attrs['goFonConferenceOption'].="|".$this->goFonConferenceOptionLifetime; + $this->attrs['goFonConferenceOption'].="|".$this->language; unset($this->attrs['goFonConferenceOptionLifetime']); /* Write back to ldap */ diff --git a/plugins/gofon/conference/generic.tpl b/plugins/gofon/conference/generic.tpl index d35ea4624..63938a43c 100644 --- a/plugins/gofon/conference/generic.tpl +++ b/plugins/gofon/conference/generic.tpl @@ -74,6 +74,15 @@ {/render} + + {t}Language{/t} + + + + +