summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ba3eb3c)
raw | patch | inline | side by side (parent: ba3eb3c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 Aug 2005 06:18:13 +0000 (06:18 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 Aug 2005 06:18:13 +0000 (06:18 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1267 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/gofon/phoneaccount/class_phoneAccount.inc | patch | blob | history | |
plugins/personal/environment/class_environment.inc | patch | blob | history |
diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc
index 813ed41881b689bb2603f12774175cdaf8e5b85b..dde34df58f5d077ba39a2da6e836dd36c39cfcec 100644 (file)
$this->goFonPINVoice = $this->goFonPIN;
}
+ if((!isset($this->cn))||(empty($this->cn))){
+ $CNname= $this->uid;
+ }else{
+ $CNname= $this->cn;
+ }
+
$SQL[]= "INSERT INTO ".$a_SETUP['VOICE_TABLE']."
(`customer_id`,`context`,`mailbox`,`password`,`fullname`,`email`,`pager`)
VALUES
- ('".$this->phoneNumbers[$i_new_key]."','default','".$this->phoneNumbers[$i_new_key]."','".$this->goFonPINVoice."','".$this->cn."','".$s_mail."','');";
+ ('".$this->phoneNumbers[$i_new_key]."','default','".$this->phoneNumbers[$i_new_key]."','".$this->goFonPINVoice."','".$CNname."','".$s_mail."','');";
$i_is_accounted=false;
$EXT[$i]['exten'] = $s_telenums;
$EXT[$i]['priority']= 1;
$EXT[$i]['app'] = "SetCIDName";
- $EXT[$i]['appdata'] = $this->cn;
+ $EXT[$i]['appdata'] = $CNname;
$i ++;
// If no macro is selected use Dial
/* Transfer ACL's */
foreach($this->attributes as $val){
$smarty->assign($val."ACL", chkacl($this->acl, "$val"));
- $smarty->assign($val,$this->$val);
+ if(isset($this->$val)){
+ $smarty->assign($val,$this->$val);
+ }else{
+ $smarty->assign($val,"");
+ }
}
/* Fill arrays */
$this->attrs['goFonMacro']=array();
}
+ unset($this->attrs['cn']);
+
/* Write back to ldap */
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index e4556f53dcfc0ad4c359fc203d264ef51ed367f6..8dac38155451c77815df349b87826e2395a7863e 100644 (file)
{
plugin::plugin ($config, $dn);
- if(!isset($this->attrs['uid'][0])){
+
+
+ if((isset($this->attrs['cn'][0]))&&(!isset($this->attrs['uid'][0]))){
$suffix="Group";
$this->uid = $this->attrs['cn'][0];
$this->attrs['uid'] = $this->attrs['cn'][0];
$display= $this->show_header(_("Remove environment extension"),
_("This server has environment extension enabled. You can disable it by clicking below."));
} else {
- if((in_array("posixAccount",$this->attrs['objectClass']))||($this->parent->by_object['posixAccount']->is_account==true)){
+ if((isset($this->attrs['objectClass']))&&((in_array("posixAccount",$this->attrs['objectClass'])))||($this->parent->by_object['posixAccount']->is_account==true)){
// 4. There is a PosixAccount
$display= $this->show_header(_("Add environment extension"),
_("This server has environment extension disabled. You can enable it by clicking below."));
if(preg_match("/[^0-9]/",$this->gotoProfileQuota)) {
$message[]=_("Please set a valid profile quota size.");
- }
+ }
+ if(!isset($this->attrs['objectClass'])){
+ $this->attrs['objectClass']=array();
+ }
if(!$this->is_group){
if((!((in_array("posixAccount",$this->attrs['objectClass']))||($this->parent->by_object['posixAccount']->is_account==true)))&&(!$this->is_group)){
$message[]=(_("You need to setup a valid posix extension in order to enable evironment features."));