From: hickert Date: Wed, 27 Jan 2010 13:21:59 +0000 (+0000) Subject: removed old dialog X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=038508b2708f72bd351cbaf6aeeea46c67651fdf;p=gosa.git removed old dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15374 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/personal/environment/class_hotplugDialog.inc b/gosa-plugins/goto/personal/environment/class_hotplugDialog.inc deleted file mode 100644 index 7719fdb06..000000000 --- a/gosa-plugins/goto/personal/environment/class_hotplugDialog.inc +++ /dev/null @@ -1,119 +0,0 @@ -skipThese = $skipThese; - $this->config = $config; - $this->depselect = session::get('CurrentMainBase'); - } - - function execute() - { - /* Call parent execute */ - plugin::execute(); - - /* Fill templating stuff */ - $smarty= get_smarty(); - $display= ""; - - if(isset($_POST['dialogissubmitted'])){ - $this->regex=$_POST['regexHot']; - $this->depselect = $_POST['depselectHot']; - } - - if((isset($_GET['search']))&&(!empty($_GET['search']))){ - $this->regex=$_GET['search']."*"; - $this->regex=preg_replace("/\*\*/","*",$this->regex); - } - - $this->deplist=$this->config->idepartments; - - $this->hotplugDevices = $this->getHotplugs(); - $smarty->assign("regexHot" ,$this->regex); - $smarty->assign("deplistHot" ,$this->deplist); - $smarty->assign("depselectHot",$this->depselect); - $smarty->assign("apply", apply_filter()); - $smarty->assign("alphabet", generate_alphabet()); - $smarty->assign("search_image", get_template_path('images/lists/search.png')); - $smarty->assign("tree_image", get_template_path('images/lists/search-subtree.png')); - $smarty->assign("launchimage", get_template_path('images/lists/action.png')); - $smarty->assign("deplist", $this->config->idepartments); - - - $smarty->assign("hotplugDevices",$this->hotplugDevices); - $smarty->assign("hotplugDeviceKeys",array_flip($this->hotplugDevices)); - $display.= $smarty->fetch(get_template_path('hotplugDialog.tpl', TRUE,dirname(__FILE__))); - return($display); - } - - function check(){ - /* Call common method to give check the hook */ - $message= plugin::check(); - - if(empty($_POST['hotplugName'])){ - $message[] = _("Please select a hotplug device!"); - } - return $message; - } - - - /* Save to LDAP */ - function save() - { - $entries = array(); - foreach($_POST['hotplugName'] as $name){ - $entries[$name] = $this->hotplugDeviceList[$name]; - } - - return $entries; - } - - function getHotplugs() - { - $ldap= $this->config->get_ldap_link(); - $ldap->cd(get_ou('deviceRDN').$this->depselect); - $ldap->search("(&(objectClass=gotoDevice)(|(cn=".$this->regex.")(description=".$this->regex.")))",array("gotoHotplugDevice","cn","dn")); - - $a_return = array(); - $this->hotplugDeviceList = array(); - while($attr = $ldap->fetch()){ - - if(isset($attr['gotoHotplugDevice'][0])){ - - $hot_plug = $attr['gotoHotplugDevice'][0]; - $tmp = preg_split("/\|/",$hot_plug); - $tmp2 = array(); - - if(in_array($attr['cn'][0],$this->skipThese)){ - continue; - } - - $tmp2['name'] = $attr['cn'][0]; - $tmp2['description'] = $tmp[0]; - $tmp2['id'] = $tmp[1]; - $tmp2['produkt'] = $tmp[2]; - $tmp2['vendor'] = $tmp[3]; - $tmp2['dn'] = $attr['dn']; - - $a_return[$attr['cn'][0]]= $attr['cn'][0]." [".$tmp[0]."] ".$tmp[1]; - - $this->hotplugDeviceList[$attr['cn'][0]]=$tmp2; - } - } - uksort($a_return,"strnatcasecmp"); - return($a_return); - } -} - -// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: -?> diff --git a/gosa-plugins/goto/personal/environment/class_selectPrinterDialog.inc b/gosa-plugins/goto/personal/environment/class_selectPrinterDialog.inc deleted file mode 100644 index 71023aa93..000000000 --- a/gosa-plugins/goto/personal/environment/class_selectPrinterDialog.inc +++ /dev/null @@ -1,159 +0,0 @@ -AlreadyAssigned = $alreadyused; - plugin::plugin ($config, $dn); - - /* Get all departments within this subtree */ - $base = $this->config->current['BASE']; - - /* Add base */ - $tmp = array(); - $tmp[] = array("dn"=>$this->config->current['BASE']); - $tmp= array_merge($tmp,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base, - array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH)); - - $deps = array(); - foreach($tmp as $tm){ - $deps[$tm['dn']] = $tm['dn']; - } - - - /* Load possible departments */ - $ui= get_userinfo(); - $this->ui = $ui; - $tdeps= $ui->get_module_departments("printer"); - $ids = $this->config->idepartments; - $first = ""; - $found = FALSE; - $res = array(); - foreach($ids as $dep => $name){ - if(isset($deps[$dep]) && in_array_ics($dep, $tdeps)){ - $res[$dep] = $ids[$dep]; //$tdeps[$dep]; - } - } - $this->deplist = $res; - $this->depselect = key($res); - } - - function execute() - { - /* Call parent execute */ - plugin::execute(); - - /* Fill templating stuff */ - $smarty= get_smarty(); - $display= ""; - - if(isset($_POST['dialogissubmitted'])){ - foreach(array('regexPrinter' => 'regex','depselectPrinter'=>'depselect') as $attr => $name){ - if(isset($_POST[$attr])){ - $this->$name =$_POST[$attr]; - } - } - } - - if(isset($_POST['subtrees'])){ - $this->subtreesearch= TRUE; - } else { - $this->subtreesearch= FALSE; - } - - if((isset($_GET['search']))&&(!empty($_GET['search']))){ - $this->regex=$_GET['search']."*"; - $this->regex=preg_replace("/\*\*/","*",$this->regex); - } - - $printer_list = $this->getPrinter(); - asort($printer_list); - - $smarty->assign("regexPrinter" ,$this->regex); - $smarty->assign("deplistPrinter" ,$this->deplist); - $smarty->assign("depselectPrinter",$this->depselect); - $smarty->assign("gotoPrinters",$printer_list); - $smarty->assign("apply", apply_filter()); - $smarty->assign("alphabet", generate_alphabet()); - $smarty->assign("subtrees", $this->subtreesearch?"checked":""); - $smarty->assign("search_image", get_template_path('images/lists/search.png')); - $smarty->assign("tree_image", get_template_path('images/lists/search-subtree.png')); - $smarty->assign("infoimage", get_template_path('images/info.png')); - $smarty->assign("launchimage", get_template_path('images/lists/action.png')); - $smarty->assign("deplist", $this->config->idepartments); - - $display.= $smarty->fetch(get_template_path('selectPrinterDialog.tpl', TRUE,dirname(__FILE__))); - return($display); - } - - function check(){ - /* Call common method to give check the hook */ - $message= plugin::check(); - - if(empty($_POST['gotoPrinter'])){ - $message[] = _("Please select a printer!"); - } - return $message; - } - - /* Save to LDAP */ - function save() - { - return($_POST['gotoPrinter']); - } - - /* This function generates the Printerlist - * All printers are returned that match regex and and depselect - */ - function getPrinter($detailed = false) - { - $a_return=array(); - - - $filter = "(&(objectClass=gotoPrinter)(cn=".$this->regex."))"; - $module = $this->module; - $base = $this->depselect; - $attrs = array("cn","description"); - - if ($this->subtreesearch){ - $res = get_list($filter,$module,$base,$attrs, GL_SIZELIMIT | GL_SUBSEARCH); - } else { - $base= get_ou('printerRDN').$base; - $res = get_list($filter,$module,$base,$attrs, GL_SIZELIMIT ); - } - - foreach($res as $printer) { - $acl = $this->ui->get_permissions($printer['dn'],"printer/printgeneric","gotoUserPrinter");; - if(!preg_match("/w/",$acl)){ - continue; - } - if(isset($this->AlreadyAssigned[$printer['cn'][0]])) continue; - if($detailed ==true){ - $a_return[$printer['cn'][0]] = $printer; - }else{ - if(isset($printer['description'][0])){ - $a_return[$printer['cn'][0]] = $printer['cn'][0]." - ".$printer['description'][0]; - }else{ - $a_return[$printer['cn'][0]] = $printer['cn'][0]; - } - } - } - return($a_return); - } -} - -// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: -?> diff --git a/gosa-plugins/goto/personal/environment/hotplugDialog.tpl b/gosa-plugins/goto/personal/environment/hotplugDialog.tpl deleted file mode 100644 index 689ea74bd..000000000 --- a/gosa-plugins/goto/personal/environment/hotplugDialog.tpl +++ /dev/null @@ -1,70 +0,0 @@ -

 {t}Add hotplug devices{/t}

- - - - - - - - - - -
-
-

- -

-
-
-

-
-

-
-
-
-

[F]{t}Filters{/t}

-
-
- - {$alphabet} -
- - - - -
-   - -
- - - - - -
- - - -
- {$apply} -
-
- -

 

- -

- - -

- diff --git a/gosa-plugins/goto/personal/environment/selectPrinterDialog.tpl b/gosa-plugins/goto/personal/environment/selectPrinterDialog.tpl deleted file mode 100644 index 02bb97bab..000000000 --- a/gosa-plugins/goto/personal/environment/selectPrinterDialog.tpl +++ /dev/null @@ -1,72 +0,0 @@ -

 {t}Add printer devices{/t}

- - - - - - - - -
-
-

- -

-
-
-

-
-

-
-
-
-

[F]{t}Filters{/t}

-
-
- - {$alphabet} -
- - - - -
-   - -
- - -
- {t}Search in subtrees{/t} -
- - - - - -
- - - -
- {$apply} -
-
- -

 

-

- - -

-