summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 45aa5ae)
raw | patch | inline | side by side (parent: 45aa5ae)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Sep 2005 11:33:55 +0000 (11:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Sep 2005 11:33:55 +0000 (11:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1303 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_printGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 61a0e71e3c1b17fdaeeced50bccd68cbb8b2a300..642f60f39605ab4ddd4112a53af9985a3acba96d 100644 (file)
$ui= get_userinfo();
$this->base= dn2base($ui->dn);
$this->cn= "";
+ $this->is_terminal = true;
} else {
$this->base= preg_replace ("/^[^,]+,[^,]+,[^,]+,/", "", $this->dn);
}
* in case of gotoTerminal it is called from a terminal tab
* else it is a standalone printer
*/
- if((in_array("gotoWorkstation",$this->attrs['objectClass']))){
+ if((isset($this->attrs['objectClass']))&&(in_array("gotoWorkstation",$this->attrs['objectClass']))){
$this->is_terminal = "true";
$this->dn = preg_replace("/ou=workstation/","ou=printer",$this->dn);
$this->type = "station";
- }elseif((in_array("gotoTerminal",$this->attrs['objectClass']))){
+ }elseif((isset($this->attrs['objectClass']))&&(in_array("gotoTerminal",$this->attrs['objectClass']))){
$this->type = "terminal";
$this->is_terminal = "true";
$this->dn = preg_replace("/ou=terminal/","ou=printer",$this->dn);
}
if($this->is_terminal){
- if ($this->is_account){
+ if(empty($this->cn))
+ $display= $this->show_header(_("Add printer extension"),
+ _("This workstation has printer extension disabled. You can't enable it while 'cn' is not present in entry. Possibly you are currently creating a new terminal template"),TRUE,TRUE);
+ $this->is_account= false;
+ return $display;
+
+ if ($this->is_account){
if($this->type=="station"){
$display= $this->show_header(_("Remove printer extension"),
- _("This workstation has printer extension enabled. You can disable it by clicking below."));
+ _("This workstation has printer extension enabled.You can disable it by clicking below."));
}else{
$display= $this->show_header(_("Remove printer extension"),
_("This terminal has printer extension enabled. You can disable it by clicking below."));