Code

Migration to get_value
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 25 Jul 2008 13:42:32 +0000 (13:42 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 25 Jul 2008 13:42:32 +0000 (13:42 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12060 594d385d-05f5-0310-b6e9-bd551577e9d8

29 files changed:
gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc
gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc
gosa-plugins/gofon/gofon/fonreports/class_fonreport.inc
gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc
gosa-plugins/goto/admin/devices/class_deviceManagement.inc
gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc
gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
gosa-plugins/goto/admin/systems/goto/class_terminalService.inc
gosa-plugins/goto/admin/systems/goto/class_workstationService.inc
gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc
gosa-plugins/goto/admin/systems/ppd/class_printerPPDDialog.inc
gosa-plugins/goto/personal/environment/class_environment.inc
gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-heimdal.inc
gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-golab.inc
gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc
gosa-plugins/ldapmanager/addons/ldapmanager/class_export.inc
gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc
gosa-plugins/mail/admin/groups/mail/class_groupMail.inc
gosa-plugins/mail/admin/systems/services/mail/class_goMailServer.inc
gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc
gosa-plugins/mail/personal/mail/class_mail-methods-sendmail-cyrus.inc
gosa-plugins/mail/personal/mail/class_mail-methods.inc
gosa-plugins/mail/personal/mail/class_mailAccount.inc
gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_password-methods-MIT.inc
gosa-plugins/openxchange/personal/connectivity/openxchange/class_oxchangeAccount.inc
gosa-plugins/samba/personal/samba/class_sambaAccount.inc
gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc
gosa-plugins/systems/admin/systems/class_systemManagement.inc
gosa-plugins/systems/admin/systems/tabs_server.inc

index 50c443ca1b0cabaaad670cf0ce93f7a0b1553803..43af501a2aa2615584e6bfb48b8bb8d29c3c0400 100644 (file)
@@ -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');
     }
index 1532bbeffe31a0b12cdc90d20407eb127840702c..a723ed5b49f44c791c60d68a46c25b2ca28af82b 100644 (file)
@@ -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);
     }
   }
index ce9530421bd017ba5a80e0df4fae4e6dea1ff1d7..ff6bce8d2bd3072b82d58ffd4a53a075957a1e57 100644 (file)
@@ -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                = "*";
index 2ac2700fc544dedff9aa204e56c575040ee7b9ee..44b95fa001a8b2fb76b09a8242f4b86a7a81e14e 100644 (file)
@@ -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);
     }
   }
index 3b1c6375446b5985662ecda69746389e1ffeacc5..bad85579630b913a56f01cc123720df89aed3c73 100644 (file)
@@ -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);
     }
 
index 27b5383b47a266bb4abd10a5c5265c4b2de32511..5bbe95dea17fb7f48876fd2d10896b5650942ea6 100644 (file)
@@ -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);
     }
 
index 3e9e6428a3f62beeafe355447fc77c61cb9b64ae..2463ed87b6f505fc9ad59337e639be90d8a22a41 100644 (file)
@@ -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."/";
       }
index 1fec80d9cc7b75bde13455258953aa891df7bf3a..87f5ef44eab17300e8b0ef53356951f7c345abae 100644 (file)
@@ -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);
index c78dc46969cb4d71a9afe3848cb293e296a45934..4ce1742fe2c9ab770957eb8485dff2451ee46492 100644 (file)
@@ -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);
index c402457c97dfa71008b9bbf011d06c999aec8b8b..407c6f4022995757e957a5edeaba66783d7c742d 100644 (file)
@@ -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'])){
index 7e070e615413a3b8d9acf2140995251d96611fdd..e2875f57ab05907fd1f8bc1286d9422d5c97f52c 100644 (file)
@@ -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."/";
index 80270b74f620865d41ab4a40b0e603565d81bf51..e3bdb3b148187b95c6bfc72166573963fac2961e 100644 (file)
@@ -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);
index 7adcb7103c22df1ab3d910ecb37a0b316a5aa0e0..397b2fd302e6142c4c9901b28744986746f23ca6 100644 (file)
@@ -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";
index 642337346163c136e39e038bc8612069c41eb387..614a20038e7e045e167db7b58267661da870131d 100644 (file)
@@ -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{
index e5054e96c8c673c8cc63ef5ac65aa8d4b82c2779..775244aa6b660d8f56e1e78c728f913730bfb407 100644 (file)
@@ -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{
index 41ae7212cea7a1212ca1dbfcbf5f6561139e36e5..9e774c4bdf8e9a8163a01e98fb7a3fecf47680ee 100644 (file)
@@ -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))
index 4a563d09c211397fffac45483f66e00f03cb793a..e9464a3d4e188b9c0eb586930ba5c5006b32d94a 100644 (file)
@@ -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))
index b522bb8c6ea22f752503720c97c4fb2744e77808..3493fb48b7c0943a724dca3564f570e0b070c3d0 100644 (file)
@@ -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");
index a737f9dbf1d39b05501b33d6b0548a549790ced2..e86ce4818ba064b99b230a4f0a3cd4d1e1df2f01 100644 (file)
@@ -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);
index 4022b03d73372cf2203691f46adebfb1fb9c155e..e04ccaaa350d8021ce750afc3a9dddf4b9ce0f53 100644 (file)
@@ -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{
index 6cc776d0ece725fb4a659ac7ce76ce9a741f6eb0..b80758ea432e668fdcb3aac79cecc24fd491f955 100644 (file)
@@ -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{
index 7f58a4520274b839ba79906308347e81c56e2201..422145069d0b0f57c29b7cba695b39dfd7465c78 100644 (file)
@@ -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{
index 61982e467320110c3cf5db3b077a3c7f5460b96b..4918868bec066c7ef7ed8eb2e8952063e03a5ba2 100644 (file)
@@ -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']);
index 4646b6c431f174212a9de6305e617492fb58bf88..0c2636864290b0dca8f886d626dc0acf74c8eca6 100644 (file)
@@ -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";
index e0139640cab7df9e035e9b9259d91e2585a326b5..461ed7f442a77f2a771e5b780195df689a0859f8 100644 (file)
@@ -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];
     }
index ea8c8da32d0503e76eeace003648f89e2f905710..fe3c81d08dcda523402f0772bb8709f6998979c3 100644 (file)
@@ -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";
       }
 
index ad73ed3bf777d34a4fca997c49a726ed600e342b..85e59850e53b9b2472b4d6fe8122bc9d37f2dd50 100644 (file)
@@ -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);
     }
 
index 43abf28ecf40dabe8ca468aa95dd472251351d13..ed563037e9f7bb8d078b50bf0b9dc0df966d6407 100644 (file)
@@ -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";
index 2a1e59f0a1fe68de16292cf408cdf54bae70f317..bf1dd4134363b55befb81a31343a0f2f466952d2 100644 (file)
@@ -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);
         }