summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e9aa265)
raw | patch | inline | side by side (parent: e9aa265)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 30 Aug 2005 11:52:08 +0000 (11:52 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 30 Aug 2005 11:52:08 +0000 (11:52 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1263 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_printGeneric.inc | patch | blob | history | |
plugins/admin/systems/tabs_workstation.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index ed2263c21f9f229c18a7fb8a2d498720f8509fba..3394cc566927478f8cb511d7f67e99b3be0423f5 100644 (file)
}
- if(in_array("gotoTerminal",$this->attrs['objectClass'])){
+ if((in_array("gotoWorkstation",$this->attrs['objectClass']))){
+ $this->is_terminal = "true";
+ $this->dn = preg_replace("/ou=workstation/","ou=printer",$this->dn);
+
+ // Reload plugin with new dn... (ou=printers instead of ou=terminals)
+ plugin::plugin ($this->config, $this->dn);
+ $ldap->cat($this->dn);
+ if(count($ldap->fetch())>0){
+ $this->orig_dn= $this->dn;
+ $this->is_account=true;
+ $this->initially_was_account = true;
+ }else{
+ $this->orig_dn = "new";
+ $this->is_account=false;
+ $this->initially_was_account = false;
+ }
+ }elseif((in_array("gotoTerminal",$this->attrs['objectClass']))){
$this->is_terminal = "true";
$this->dn = preg_replace("/ou=terminal/","ou=printer",$this->dn);
function execute()
{
+ print_a($this);
$smarty= get_smarty();
$display="";
/* Template management.
/* Save to LDAP */
function save()
{
+ $dn= $this->dn;
plugin::save();
-
+
+ if((in_array("gotoTerminal",$this->attrs['objectClass']))){
+ $this->dn= preg_replace("/ou=terminal/","ou=printer",$this->dn);
+ }
+
+ if((in_array("gotoWorkstation",$this->attrs['objectClass']))){
+ $this->dn= preg_replace("/ou=workstation/","ou=printer",$this->dn);
+ }
+
$ldap= $this->config->get_ldap_link();
-
+
/* We are currently editing a Terminal, so we want to save a seperate printer which cn is the terminla cn
*/
if($this->is_terminal){
- /* Save in ou=printers instead of ou=terminals */
- $this->dn = preg_replace("/ou=terminal/","ou=printer",$this->dn);
-
/* reduce objectClasses to minimun */
$this->attrs['objectClass']= $this->objectclasses;
diff --git a/plugins/admin/systems/tabs_workstation.inc b/plugins/admin/systems/tabs_workstation.inc
index 13df2dc0f3867b9ec2a00bcc0bc9f58c28c8760b..4f59e1d5685e0f424a7d3aaca32240cb626af6da 100644 (file)
}
tabs::save(TRUE);
+ if(($this->by_object['printgeneric']->is_account==false)&&($this->by_object['printgeneric']->initially_was_account==true)){
+ $this->by_object['printgeneric']->remove_from_parent();
+ }
+
}
}