From: cajus Date: Fri, 25 Jul 2008 13:42:32 +0000 (+0000) Subject: Migration to get_value X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3e0fb1c970823aca126cddf3de10146835319a0f;p=gosa.git Migration to get_value git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12060 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc b/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc index 50c443ca1..43af501a2 100644 --- a/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc +++ b/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc @@ -137,7 +137,7 @@ class addressbook extends plugin /* Perform actions with CTI hook */ if (isset($_GET['target']) && isset($_GET['dial']) - && isset($this->config->current['CTIHOOK'])){ + && $this->config->get_cfg_value("ctihook") != "" ){ $dialmode= $_GET['dial']; if ($dialmode == "telephoneNumber" || @@ -183,7 +183,7 @@ class addressbook extends plugin /* Finally dial */ if (isset($_POST['dial']) && session::is_set('source') && session::is_set('target')){ - exec ($this->config->current['CTIHOOK']." '".session::get('source')."' '".session::get('target')."'", $dummy, $retval); + exec ($this->config->get_cfg_value("ctihook")." '".session::get('source')."' '".session::get('target')."'", $dummy, $retval); session::un_set('source'); session::un_set('target'); } diff --git a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc index 1532bbeff..a723ed5b4 100644 --- a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc +++ b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc @@ -49,7 +49,7 @@ class phoneConferenceManagment extends plugin $this->DivListConference = new divListConference($this->config,$this); /* Copy & Paste enabled ?*/ - if((isset($this->config->data['MAIN']['ENABLECOPYPASTE']))&&(preg_match("/true/i",$this->config->data['MAIN']['ENABLECOPYPASTE']))){ + if ($this->config->get_cfg_value("enablecopypaste") == "true"){ $this->CopyPasteHandler = new CopyPasteHandler($this->config); } } diff --git a/gosa-plugins/gofon/gofon/fonreports/class_fonreport.inc b/gosa-plugins/gofon/gofon/fonreports/class_fonreport.inc index ce9530421..ff6bce8d2 100644 --- a/gosa-plugins/gofon/gofon/fonreports/class_fonreport.inc +++ b/gosa-plugins/gofon/gofon/fonreports/class_fonreport.inc @@ -7,7 +7,6 @@ class fonreport extends plugin var $plDescription= "This does something"; var $plIcon = "plugins/gofon/images/phonereport.png"; - /* For internal use */ var $start = 0; var $search_for = "*"; diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc index 2ac2700fc..44b95fa00 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc @@ -48,7 +48,7 @@ class goFonMacro extends plugin $this->DivListMacro = new divListMacro($this->config,$this); /* Copy & Paste enabled ?*/ - if((isset($this->config->data['MAIN']['ENABLECOPYPASTE']))&&(preg_match("/true/i",$this->config->data['MAIN']['ENABLECOPYPASTE']))){ + if ($this->config->get_cfg_value("enablecopypaste") == "true"){ $this->CopyPasteHandler = new CopyPasteHandler($this->config); } } diff --git a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc index 3b1c63754..bad855796 100644 --- a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc +++ b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc @@ -27,7 +27,7 @@ class deviceManagement extends plugin $this->ui = get_userinfo(); /* Check if copy & paste is activated */ - if($this->config->boolValueIsTrue("MAIN","ENABLECOPYPASTE")){ + if($this->config->get_cfg_value("enablecopypaste") == "true"){ $this->CopyPasteHandler = new CopyPasteHandler($this->config); } diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc index 27b5383b4..5bbe95dea 100644 --- a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc +++ b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc @@ -57,7 +57,7 @@ class mimetypeManagement extends plugin $this->ui = &$ui; /* Check if copy & paste is activated */ - if($this->config->boolValueIsTrue("MAIN","ENABLECOPYPASTE")){ + if($this->config->get_cfg_value("enablecopypaste")){ $this->CopyPasteHandler = new CopyPasteHandler($this->config); } diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc index 3e9e6428a..2463ed87b 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc @@ -501,9 +501,8 @@ class printgeneric extends plugin /* Parse selected ppd file */ $config = session::get('config'); - if((isset($config->data['MAIN']['PPD_PATH']))&&(is_dir($config->data['MAIN']['PPD_PATH']))){ - - $path = $config->data['MAIN']['PPD_PATH']; + if ($config->get_cfg_value("ppd_path") != ""){ + $path = $config->get_cfg_value("ppd_path"); if(!preg_match("/\/$/",$path)){ $path = $path."/"; } diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc index 1fec80d9c..87f5ef44e 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc @@ -95,8 +95,8 @@ class termservice extends plugin "1400x1050" => "1400x1050", "1600x1200" => "1600x1200"); - if(isset($this->config->data['MAIN']['RESOLUTIONS'])){ - $file = $this->config->data['MAIN']['RESOLUTIONS']; + if($this->config->get_cfg_value("resolutions") != ""){ + $file = $this->config->get_cfg_value("resolutions"); if(is_readable($file)){ $str = file_get_contents($file); $lines = split("\n",$str); diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc index c78dc4696..4ce1742fe 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc @@ -62,8 +62,8 @@ class workservice extends plugin "1400x1050" => "1400x1050", "1600x1200" => "1600x1200"); - if(isset($this->config->data['MAIN']['RESOLUTIONS'])){ - $file = $this->config->data['MAIN']['RESOLUTIONS']; + if($this->config->get_cfg_value("resolutions") != ""){ + $file = $this->config->get_cfg_value("resolutions"); if(is_readable($file)){ $str = file_get_contents($file); diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc index c402457c9..407c6f402 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc @@ -71,7 +71,7 @@ class workstartup extends plugin plugin::plugin ($config, $dn, $parent); /* Check for si daemon */ - $this->si_active = isset($this->config->current['GOSA_SI']) && !empty($this->config->current['GOSA_SI']); + $this->si_active = $this->config->get_cfg_value("gosa_si") != ""; /* Check object group membership */ if(!isset($this->parent->by_object['ogroup'])){ diff --git a/gosa-plugins/goto/admin/systems/ppd/class_printerPPDDialog.inc b/gosa-plugins/goto/admin/systems/ppd/class_printerPPDDialog.inc index 7e070e615..e2875f57a 100644 --- a/gosa-plugins/goto/admin/systems/ppd/class_printerPPDDialog.inc +++ b/gosa-plugins/goto/admin/systems/ppd/class_printerPPDDialog.inc @@ -35,8 +35,8 @@ class printerPPDDialog extends plugin /* Get PPD path and remove double //, and add trailing / */ $config = session::get('config'); - if(isset($config->data['MAIN']['PPD_PATH'])){ - $this->pathToPPD = $config->data['MAIN']['PPD_PATH']; + if($config->get_cfg_value("ppd_path") != ""){ + $this->pathToPPD = $config->get_cfg_value("ppd_path"); $this->pathToPPD= preg_replace("/\/\//", "/", $this->pathToPPD); if(!preg_match("/\/$/",$this->pathToPPD)){ $this->pathToPPD = $this->pathToPPD."/"; diff --git a/gosa-plugins/goto/personal/environment/class_environment.inc b/gosa-plugins/goto/personal/environment/class_environment.inc index 80270b74f..e3bdb3b14 100644 --- a/gosa-plugins/goto/personal/environment/class_environment.inc +++ b/gosa-plugins/goto/personal/environment/class_environment.inc @@ -217,8 +217,8 @@ class environment extends plugin "1280x768" => "1280x768", "1280x1024" => "1280x1024"); - if(isset($this->config->data['MAIN']['RESOLUTION_HOOK'])){ - $file = $this->config->data['MAIN']['RESOLUTION_HOOK']; + if($this->config->get_cfg_value("resolutions") != ""){ + $file = $this->config->get_cfg_value("resolutions"); if(is_readable($file)){ $str = file_get_contents($file); diff --git a/gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-heimdal.inc b/gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-heimdal.inc index 7adcb7103..397b2fd30 100644 --- a/gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-heimdal.inc +++ b/gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-heimdal.inc @@ -121,14 +121,8 @@ class passwordMethodheimdal extends passwordMethod } $cmd = ""; - if(isset($config->current['HEIMDAL_KEYGEN'])){ - $cmd = $config->current['HEIMDAL_KEYGEN']; - if(!check_command($cmd)){ - new msg_dialog(_("Heimdal"), msgPool::cmdinvalid("HEIMDAL_KEYGEN",$cmd,_("Heimdal")),WARNING_DIALOG); - } - } - if(isset($this->config->data['MAIN']['HEIMDAL_KEYGEN'])){ - $cmd = $this->config->data['MAIN']['HEIMDAL_KEYGEN']; + if($this->config->get_cfg_value("heimdal_keygen") != ""){ + $cmd = $this->config->get_cfg_value("heimdal_keygen"); if(!check_command($cmd)){ new msg_dialog(_("Heimdal"), msgPool::cmdinvalid("HEIMDAL_KEYGEN",$cmd,_("Heimdal")),WARNING_DIALOG); } @@ -144,7 +138,7 @@ class passwordMethodheimdal extends passwordMethod function generate_hash($pwd) { $mode= "kerberos"; - if (isset($this->config->current['KRBSASL']) && preg_match('/^true$/i', $this->config->current['KRBSASL'])){ + if ($this->config->get_cfg_value("krbsasl") == "true"){ $mode= "sasl"; } @@ -177,14 +171,8 @@ class passwordMethodheimdal extends passwordMethod global $config; $cmd = ""; - if(isset($config->current['HEIMDAL_KEYGEN'])){ - $cmd = $config->current['HEIMDAL_KEYGEN']; - if(!check_command($cmd)){ - new msg_dialog(_("Heimdal"), msgPool::cmdinvalid("HEIMDAL_KEYGEN",$cmd,_("Heimdal")),WARNING_DIALOG); - } - } - if(isset($this->config->data['MAIN']['HEIMDAL_KEYGEN'])){ - $cmd = $this->config->data['MAIN']['HEIMDAL_KEYGEN']; + if($this->config->get_cfg_value("heimdal_keygen") != ""){ + $cmd = $this->config->get_cfg_value("heimdal_keygen"); if(!check_command($cmd)){ new msg_dialog(_("Heimdal"), msgPool::cmdinvalid("HEIMDAL_KEYGEN",$cmd,_("Heimdal")),WARNING_DIALOG); } @@ -208,7 +196,7 @@ class passwordMethodheimdal extends passwordMethod function get_hash_name() { $mode= "kerberos"; - if (isset($this->config->current['KRBSASL']) && preg_match('/^true$/i', $this->config->current['KRBSASL'])){ + if ($this->config->get_cfg_value("krbsasl") == "true"){ $mode= "sasl"; } return "$mode"; diff --git a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-golab.inc b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-golab.inc index 642337346..614a20038 100644 --- a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-golab.inc +++ b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-golab.inc @@ -34,8 +34,8 @@ class mailMethodGolab extends mailMethodCyrus /* Check if the mail account identification attribute is overridden in the configuration file */ - if(isset($config->current['MAIL_ATTRIB']) && !empty($config->current['MAIL_ATTRIB'])){ - $new_uattrib= strtolower($config->current['MAIL_ATTRIB']); + if ($config->get_cfg_value("mail_attrib") != ""){ + $new_uattrib= strtolower($config->get_cfg_value("mail_attrib")); if(in_array($new_uattrib,array("mail","uid"))){ $this->uattrib = $new_uattrib; }else{ diff --git a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc index e5054e96c..775244aa6 100644 --- a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc +++ b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc @@ -34,8 +34,8 @@ class mailMethodKolab extends mailMethodCyrus /* Check if the mail account identification attribute is overridden in the configuration file */ - if(isset($config->current['MAIL_ATTRIB']) && !empty($config->current['MAIL_ATTRIB'])){ - $new_uattrib= strtolower($config->current['MAIL_ATTRIB']); + if ($config->get_cfg_value("mail_attrib") != ""){ + $new_uattrib= strtolower($config->get_cfg_value("mail_attrib")); if(in_array($new_uattrib,array("mail","uid"))){ $this->uattrib = $new_uattrib; }else{ diff --git a/gosa-plugins/ldapmanager/addons/ldapmanager/class_export.inc b/gosa-plugins/ldapmanager/addons/ldapmanager/class_export.inc index 41ae7212c..9e774c4bd 100644 --- a/gosa-plugins/ldapmanager/addons/ldapmanager/class_export.inc +++ b/gosa-plugins/ldapmanager/addons/ldapmanager/class_export.inc @@ -69,12 +69,8 @@ class ldifexport extends plugin // Get the LDAP link, to generate the Export $ldap = $this->config->get_ldap_link(); - if ($this->config->current['GOVERNMENTMODE'] == 'true'){ - $smarty->assign ("govmode", "true"); - } else { - $smarty->assign ("govmode", "false"); - } - + if ($this->config->get_cfg_['GOVERNMENTMODE'] == 'true'){ + $smarty->assign ("govmode", $this->config->get_cfg_value("governmentmode")); $smarty->assign("LDIFError",FALSE); if(isset($dn)) diff --git a/gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc b/gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc index 4a563d09c..e9464a3d4 100644 --- a/gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc +++ b/gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc @@ -83,12 +83,7 @@ class xlsexport extends plugin // Get the LDAP link, to generate the Export $ldap = $this->config->get_ldap_link(); - if ($this->config->current['GOVERNMENTMODE'] == 'true'){ - $smarty->assign ("govmode", "true"); - } else { - $smarty->assign ("govmode", "false"); - } - + $smarty->assign ("govmode", $this->config->get_cfg_value("governmentmode")); $smarty->assign("LDIFError",FALSE); if(isset($dn)) diff --git a/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc b/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc index b522bb8c6..3493fb48b 100644 --- a/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc +++ b/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc @@ -69,8 +69,8 @@ class mailgroup extends plugin /* Set mailMethod to the one defined in gosa.conf */ - if (isset($this->config->current['MAILMETHOD'])){ - $this->mmethod= $this->config->current['MAILMETHOD']; + if ($this->config->get_cfg_value("mailmethod")){ + $this->mmethod= $this->config->get_cfg_value("mailmethod"); } /* Check if selected mail method exists @@ -95,7 +95,7 @@ class mailgroup extends plugin } /* Get folder type */ - if(isset($this->config->current['MAILMETHOD'])&&preg_match("/olab/i",$this->config->current['MAILMETHOD'])){ + if(preg_match("/olab/i",$this->config->get_cfg_value("mailmethod"))){ if(isset($this->attrs['kolabFolderType'])){ $tmp = split("\.",$this->attrs['kolabFolderType'][0]); $this->kolabFolderTypeType = $tmp[0]; @@ -666,7 +666,7 @@ class mailgroup extends plugin $smarty->assign("quotadefined", "false"); } - if(isset($this->config->current['MAILMETHOD'])&&preg_match("/olab/i",$this->config->current['MAILMETHOD'])){ + if(preg_match("/olab/i",$this->config->get_cfg_value("mailmethod"))){ $smarty->assign("kolab", TRUE); $smarty->assign("JS",session::get('js')); @@ -725,7 +725,7 @@ class mailgroup extends plugin /* Added these ObjectClass and Attributes, because they were not removed correctly, only in case of kolab ... */ - if(isset($this->config->current['MAILMETHOD'])&&preg_match("/olab/i",$this->config->current['MAILMETHOD'])){ + if(preg_match("/olab/i",$this->config->get_cfg_value("mailmethod"))){ $this->attributes[]="acl"; $this->objectclasses[] = "kolabSharedFolder"; } @@ -774,7 +774,7 @@ class mailgroup extends plugin { /* Add special kolab attributes */ - if(isset($this->config->current['MAILMETHOD'])&&preg_match("/olab/i",$this->config->current['MAILMETHOD'])){ + if(preg_match("/olab/i",$this->config->get_cfg_value("mailmethod"))){ if(isset($_POST['kolabFolderTypeType']) && $this->acl_is_writeable("kolabFolderType")){ $this->kolabFolderTypeType = get_post("kolabFolderTypeType"); $this->kolabFolderTypeSubType = get_post("kolabFolderTypeSubType"); @@ -1312,7 +1312,7 @@ I: Only insider delivery */ } /* Add special kolab attributes */ - if(isset($this->config->current['MAILMETHOD'])&&preg_match("/olab/i",$this->config->current['MAILMETHOD'])){ + if(preg_match("/olab/i",$this->config->get_cfg_value("mailmethod"))){ if(isset($_POST['kolabFolderTypeType']) && $this->acl_is_writeable("kolabFolderType")){ $this->kolabFolderTypeType = get_post("kolabFolderTypeType"); $this->kolabFolderTypeSubType = get_post("kolabFolderTypeSubType"); diff --git a/gosa-plugins/mail/admin/systems/services/mail/class_goMailServer.inc b/gosa-plugins/mail/admin/systems/services/mail/class_goMailServer.inc index a737f9dbf..e86ce4818 100644 --- a/gosa-plugins/mail/admin/systems/services/mail/class_goMailServer.inc +++ b/gosa-plugins/mail/admin/systems/services/mail/class_goMailServer.inc @@ -54,8 +54,8 @@ class goMailServer extends goService{ $this->RestrictionFilters = array("FILTER"=>"FILTER"); foreach(array("ADDITIONALRESTRICTIONFILTERS"=>"RestrictionFilters", "ADDITIONALPROTOCOLLS" =>"TransportProtocols") as $file => $var){ - if(isset($this->config->data['MAIN'][$file])){ - $file = $this->config->data['MAIN'][$file]; + if($this->config->get_cfg_value($file]) != ""){ + $file = $this->config->get_cfg_value($file]); if((isset($file)) && is_readable($file)){ $tmp = file_get_contents($file); $tmp2= split("\n",$tmp); diff --git a/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc b/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc index 4022b03d7..e04ccaaa3 100644 --- a/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc +++ b/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc @@ -30,8 +30,8 @@ class mailMethodCyrus extends mailMethod /* Check if the mail account identification attribute is overridden in the configuration file */ - if(isset($config->current['MAIL_ATTRIB']) && !empty($config->current['MAIL_ATTRIB'])){ - $new_uattrib= strtolower($config->current['MAIL_ATTRIB']); + if($config->get_cfg_value("mail_attrib") != ""){ + $new_uattrib= strtolower($config->get_cfg_value("mail_attrib")); if(in_array($new_uattrib,array("mail","uid"))){ $this->uattrib = $new_uattrib; }else{ diff --git a/gosa-plugins/mail/personal/mail/class_mail-methods-sendmail-cyrus.inc b/gosa-plugins/mail/personal/mail/class_mail-methods-sendmail-cyrus.inc index 6cc776d0e..b80758ea4 100644 --- a/gosa-plugins/mail/personal/mail/class_mail-methods-sendmail-cyrus.inc +++ b/gosa-plugins/mail/personal/mail/class_mail-methods-sendmail-cyrus.inc @@ -26,8 +26,8 @@ class mailMethodSendmailCyrus extends mailMethodCyrus /* Check if the mail account identification attribute is overridden in the configuration file */ - if(isset($config->current['MAIL_ATTRIB']) && !empty($config->current['MAIL_ATTRIB'])){ - $new_uattrib= strtolower($config->current['MAIL_ATTRIB']); + if($config->get_cfg_value("mail_attrib") != ""){ + $new_uattrib= strtolower($config->get_cfg_value("mail_attrib")); if(in_array($new_uattrib,array("mail","uid"))){ $this->uattrib = $new_uattrib; }else{ diff --git a/gosa-plugins/mail/personal/mail/class_mail-methods.inc b/gosa-plugins/mail/personal/mail/class_mail-methods.inc index 7f58a4520..422145069 100644 --- a/gosa-plugins/mail/personal/mail/class_mail-methods.inc +++ b/gosa-plugins/mail/personal/mail/class_mail-methods.inc @@ -28,8 +28,8 @@ class mailMethod /* Check if the mail account identification attribute is overridden in the configuration file */ - if(isset($config->current['MAIL_ATTRIB']) && !empty($config->current['MAIL_ATTRIB'])){ - $new_uattrib= strtolower($config->current['MAIL_ATTRIB']); + if($config->get_cfg_value("mail_attrib") != ""){ + $new_uattrib= strtolower($config->get_cfg_value("mail_attrib")); if(in_array($new_uattrib,array("mail","uid"))){ $this->uattrib = $new_uattrib; }else{ diff --git a/gosa-plugins/mail/personal/mail/class_mailAccount.inc b/gosa-plugins/mail/personal/mail/class_mailAccount.inc index 61982e467..4918868be 100644 --- a/gosa-plugins/mail/personal/mail/class_mailAccount.inc +++ b/gosa-plugins/mail/personal/mail/class_mailAccount.inc @@ -82,8 +82,8 @@ class mailAccount extends plugin $this->initially_was_account= $this->is_account; /* Set mailMethod to the one defined in gosa.conf */ - if (isset($this->config->current['MAILMETHOD'])){ - $method= $this->config->current['MAILMETHOD']; + if ($this->config->get_cfg_value("mailmethod") != ""){ + $method= $this->config->get_cfg_value("mailmethod"); $cls = get_correct_class_name("mailMethod$method"); if ($cls && class_exists($cls)){ @@ -97,9 +97,7 @@ class mailAccount extends plugin /* Create the account prefix user. user/ Preset folder prefix. Will change it later to respect altnamespace. */ - if (isset($this->config->current['CYRUSUNIXSTYLE']) && $this->config->current['CYRUSUNIXSTYLE'] == "true"){ - $this->folder_prefix= "user/"; - }elseif (isset($this->config->data['MAIN']['CYRUSUNIXSTYLE']) && $this->config->data['MAIN']['CYRUSUNIXSTYLE'] == "true"){ + if ($this->config->get_cfg_value("cyrusunixstyle") == "true"){ $this->folder_prefix= "user/"; } else { $this->folder_prefix= "user."; @@ -168,8 +166,8 @@ class mailAccount extends plugin /* Fill vacation array */ $this->vacation= array(); - if (isset($this->config->current['VACATIONDIR'])){ - $dir= $this->config->current['VACATIONDIR']; + if ($this->config->get_cfg_value("vacationdir") != ""){ + $dir= $this->config->get_cfg_value("vacationdir"); if (is_dir($dir) && is_readable($dir)){ /* Look for files and build the vacation array */ @@ -1141,8 +1139,8 @@ class mailAccount extends plugin function allow_remove() { - if (isset($this->config->current['MAILMETHOD'])){ - $method= $this->config->current['MAILMETHOD']; + if ($this->config->get_cfg_value("mailmethod") != ""){ + $method= $this->config->get_cfg_value("mailmethod"); if(preg_match("/olab/i",$method)){ $ldap = $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); diff --git a/gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_password-methods-MIT.inc b/gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_password-methods-MIT.inc index 4646b6c43..0c2636864 100644 --- a/gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_password-methods-MIT.inc +++ b/gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_password-methods-MIT.inc @@ -338,7 +338,7 @@ class passwordMethodMIT extends passwordMethod public function generate_hash($pwd = "") { $mode= "kerberos"; - if (isset($this->config->current['KRBSASL']) && preg_match('/^true$/i', $this->config->current['KRBSASL'])){ + if ($this->config->get_cfg_value("krbsasl") == "true"){ $mode= "sasl"; } return "{".$mode."}".$this->attrs['uid'][0]."@".$this->goKrbRealm; @@ -384,7 +384,7 @@ class passwordMethodMIT extends passwordMethod public function get_hash_name() { $mode= "kerberos"; - if (isset($this->config->current['KRBSASL']) && preg_match('/^true$/i', $this->config->current['KRBSASL'])){ + if ($this->config->get_cfg_value("krbsasl") == "true"){ $mode= "sasl"; } return "$mode"; diff --git a/gosa-plugins/openxchange/personal/connectivity/openxchange/class_oxchangeAccount.inc b/gosa-plugins/openxchange/personal/connectivity/openxchange/class_oxchangeAccount.inc index e0139640c..461ed7f44 100644 --- a/gosa-plugins/openxchange/personal/connectivity/openxchange/class_oxchangeAccount.inc +++ b/gosa-plugins/openxchange/personal/connectivity/openxchange/class_oxchangeAccount.inc @@ -59,7 +59,7 @@ class oxchangeAccount extends plugin $this->uid = $this->attrs['uid'][0]; } - $this->dnmode= $this->config->current['DNMODE']; + $this->dnmode= $this->config->get_cfg_value("dnmode"); if(isset($this->attrs[$this->dnmode][0])){ $this->dnModeValue = $this->attrs[$this->dnmode][0]; } diff --git a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc index ea8c8da32..fe3c81d08 100644 --- a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc +++ b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc @@ -96,7 +96,7 @@ class sambaAccount extends plugin function sambaAccount (&$config, $dn= NULL) { /* Load attributes depending on the samba version */ - $this->samba3= ($config->current['SAMBAVERSION'] == 3); + $this->samba3= ($config->get_cfg_value("sambaversion") == 3); if ($this->samba3){ $this->attributes= array ("sambaSID", "sambaPwdLastSet", "sambaLogonTime", @@ -135,7 +135,7 @@ class sambaAccount extends plugin if(isset($attrs['sambaAlgorithmicRidBase'])){ $this->ridBase= $attrs['sambaAlgorithmicRidBase'][0]; } else { - $this->ridBase= $this->config->current['RIDBASE']; + $this->ridBase= $this->config->get_cfg_value("ridbase"); } if ($this->sambaDomainName == ""){ $this->sambaDomainName= $attrs['sambaDomainName'][0]; @@ -144,8 +144,8 @@ class sambaAccount extends plugin if ($this->sambaDomainName == ""){ $this->sambaDomainName= "DEFAULT"; } - $this->ridBase= $this->config->current['RIDBASE']; - $this->SID= $this->config->current['SID']; + $this->ridBase= $this->config->get_cfg_value("ridbase"); + $this->SID= $this->config->get_cfg_value("sid"); } /* Save in order to compare later on */ @@ -1006,8 +1006,7 @@ class sambaAccount extends plugin /* User wants me to fake the idMappings? This is useful for making winbind resolve the user names in a reasonable amount of time in combination with larger databases. */ - if (isset($this->config->current['SAMBAIDMAPPING']) && - preg_match('/true/i', $this->config->current['SAMBAIDMAPPING'])){ + if ($this->config->get_cfg_value("sambaidmapping") == "true"){ $this->attrs['objectClass'][]= "sambaIdmapEntry"; } diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc b/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc index ad73ed3bf..85e59850e 100644 --- a/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc +++ b/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc @@ -49,7 +49,7 @@ class sudoManagement extends plugin $this->base = sudo::get_sudoers_ou($this->config); /* Copy & Paste enabled ?*/ - if((isset($this->config->data['MAIN']['ENABLECOPYPASTE']))&&(preg_match("/true/i",$this->config->data['MAIN']['ENABLECOPYPASTE']))){ + if ($this->config->get_cfg_value("enablecopypaste") == "true"){ $this->CopyPasteHandler = new CopyPasteHandler($this->config); } diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index 43abf28ec..ed563037e 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -64,7 +64,7 @@ class systems extends plugin $this->DivListSystem = new divListSystem($this->config,$this); /* Copy & Paste enabled ?*/ - if((isset($this->config->data['MAIN']['ENABLECOPYPASTE']))&&(preg_match("/true/i",$this->config->data['MAIN']['ENABLECOPYPASTE']))){ + if ($this->config->get_cfg_value("enablecopypaste") == "true"){ $this->CopyPasteHandler = new CopyPasteHandler($this->config); } @@ -1182,7 +1182,7 @@ class systems extends plugin /* Prepare samba class name */ $samba =""; if ($this->DivListSystem->ShowWinWorkstations){ - if ($this->config->current['SAMBAVERSION'] == "3"){ + if ($this->config->get_cfg_value("sambaversion") == "3"){ $samba= "sambaSamAccount"; } else { $samba= "sambaAccount"; diff --git a/gosa-plugins/systems/admin/systems/tabs_server.inc b/gosa-plugins/systems/admin/systems/tabs_server.inc index 2a1e59f0a..bf1dd4134 100644 --- a/gosa-plugins/systems/admin/systems/tabs_server.inc +++ b/gosa-plugins/systems/admin/systems/tabs_server.inc @@ -99,7 +99,7 @@ class servtabs extends tabs /* cn is not case sensitive for ldap, but for php it is!! */ if($baseobject->orig_dn != "new"){ - if($this->config->current['DNMODE'] == "cn"){ + if($this->config->get_cfg_value("dnmode") == "cn"){ if (strtolower($baseobject->orig_dn) != (strtolower($this->dn))){ $baseobject->recursive_move($baseobject->orig_dn, $this->dn); }