From: hickert Date: Fri, 21 Sep 2007 11:45:02 +0000 (+0000) Subject: Fixed search_config stuff in user tabs X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9a6d56f5f9806516d4888212015e9460dc5418d5;p=gosa.git Fixed search_config stuff in user tabs git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7370 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index e2bfe961d..67cf4ee13 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -112,11 +112,10 @@ class userManagement extends plugin $s_tab= "user"; } - if(!search_config($this->config->data['TABS'], $s_tab , "CLASS")){ + if(!$this->config->search($s_tab, 'class',array('tabs'))){ $s_tab = "user"; } - /******************** Copy & Paste ********************/ diff --git a/plugins/personal/connectivity/class_opengwAccount.inc b/plugins/personal/connectivity/class_opengwAccount.inc index 8a589c113..3646256f0 100644 --- a/plugins/personal/connectivity/class_opengwAccount.inc +++ b/plugins/personal/connectivity/class_opengwAccount.inc @@ -50,20 +50,23 @@ class opengwAccount extends plugin $this->initialy_was_account = false; $this->is_account = false; - /* check if datebase funktions are available, and if database configurations are available */ - if(is_callable("pg_connect")){ - - /* Get configurations */ - if(search_config($this->config->data,"opengwAccount","USERNAME")){ - $atr = array(); - $atr['LOGIN'] = search_config($this->config->data,"opengwAccount","USERNAME"); - $atr['PASSWORD']= search_config($this->config->data,"opengwAccount","PASSWORD"); - $atr['SERVER'] = search_config($this->config->data,"opengwAccount","DATAHOST"); - $atr['DB'] = search_config($this->config->data,"opengwAccount","DATABASE"); - $this->serverCon = $atr; - }else{ - $this->serverCon = $this->config->data['SERVERS']['OPENGROUPWARE']; - } + /* Get configurations */ + if($this->config->search("opengwAccount", 'USERNAME',array('data'))){ + $atr = array(); + $atr['LOGIN'] = $this->config->search("opengwAccount", 'USERNAME',array('data')); + $atr['PASSWORD']= $this->config->search("opengwAccount", 'PASSWORD',array('data')); + $atr['SERVER'] = $this->config->search("opengwAccount", 'DATAHOST',array('data')); + $atr['DB'] = $this->config->search("opengwAccount", 'DATABASE',array('data')); + $this->serverCon = $atr; + }elseif(isset($this->config->data['SERVERS']['OPENGROUPWARE'])){ + $this->serverCon = $this->config->data['SERVERS']['OPENGROUPWARE']; + }else{ + $this->serverCon = array(); + } + + /* check if datebase funktions are available, and if database configurations are available */ + if(is_callable("pg_connect") && count($this->serverCon)){ + $this->handle = new ogw($this->serverCon['LOGIN'],$this->serverCon['PASSWORD'],$this->serverCon['SERVER'],$this->serverCon['DB']); /* Check if current configuration allows database connection */ diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index 82b7a7bce..4ecebf758 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -50,6 +50,7 @@ class environment extends plugin var $gotoAvailableShares= array();// Available Shares for this account /* Kiosk profile */ + var $kiosk_enabled = FALSE; var $gotoKioskProfile = "none"; // The selected Kiosk Profile var $gotoKioskProfiles = array();// All available Kiosk profiles var $newKioskProfiles = array(); @@ -237,10 +238,17 @@ class environment extends plugin $this->gotoShareSelections= $config->getShareList(true); $this->gotoAvailableShares= $config->getShareList(false); - $tmp = new kioskManagementDialog($this->config,$this->dn); - $list = $tmp->getKioskProfiles($this->newKioskProfiles); - $list['none']=_("None"); - $this->kioskProfileList = array_reverse($list); + + if($this->config->search('environment', 'kioskpath') != ""){ + $tmp = new kioskManagementDialog($this->config,$this->dn); + $list = $tmp->getKioskProfiles($this->newKioskProfiles); + $list['none']=_("None"); + $this->kioskProfileList = array_reverse($list); + $this->kiosk_enabled = TRUE; + }else{ + $this->kiosk_enabled = FALSE; + $this->kioskProfileList = array(); + } } @@ -299,6 +307,7 @@ class environment extends plugin /* Fill templating stuff */ $smarty= get_smarty(); + $smarty->assign("kiosk_enabled",$this->kiosk_enabled); $display= ""; $smarty->assign("is_group",$this->is_group); diff --git a/plugins/personal/environment/class_kioskManagementDialog.inc b/plugins/personal/environment/class_kioskManagementDialog.inc index 1e8bc9697..384306e21 100644 --- a/plugins/personal/environment/class_kioskManagementDialog.inc +++ b/plugins/personal/environment/class_kioskManagementDialog.inc @@ -24,7 +24,7 @@ class kioskManagementDialog extends plugin if($attach){ $this->filesToAttach = $attach; } - $this->baseDir = search_config($this->config->data,"environment", "KIOSKPATH"); + $this->baseDir = $this->config->search('environment', 'kioskpath'); } function execute() diff --git a/plugins/personal/environment/environment.tpl b/plugins/personal/environment/environment.tpl index dd31581c6..0e5bae3a0 100644 --- a/plugins/personal/environment/environment.tpl +++ b/plugins/personal/environment/environment.tpl @@ -79,6 +79,9 @@ + +{if $kiosk_enabled} +
@@ -119,6 +122,42 @@
+ + {else} + + + + + + + + + + + + +
+ + + + +
+
+ + +
+ + + +
+{/if} + + + + +