diff --git a/trunk/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/trunk/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
index 17e92cdd65236f95966931e0104add894db9bb5e..97820940f162e7759ac82e3bb59e10c580fea1d2 100644 (file)
var $cn = "";
var $l = "";
var $description = "";
+ var $printer_description = "";
var $labeledURI = "";
var $gotoPrinterPPD = "";
var $initial_PPD = "";
}
$this->orig_cn = $this->cn;
$this->orig_base = $this->base;
+
+ if (!preg_match('/Printer/i', $this->BelongsTo)) {
+ $this->printer_description = $this->description;
+ }
}
function set_acl_base($base)
/* Assign attributes */
foreach ($this->attributes as $attr){
- $smarty->assign("$attr", $this->$attr);
+ $smarty->assign("$attr", $this->$attr);
+ }
+
+ if (!preg_match("/Printer/", $this->BelongsTo)) {
+ $smarty->assign("printer_description", $this->printer_description);
}
if(isset($_POST['AddUser'])){
if(is_object($this->netConfigDNS)){
$this->netConfigDNS->save_object();
}
+
+ if (!isset($_POST['edit_cancel']) && isset($_POST['printer_description'])) {
+ $this->printer_description = get_post('printer_description');
+ }
/* Set new base if allowed */
$tmp = $this->get_allowed_bases();
if(preg_match("/workstation/i",$this->BelongsTo)){
$this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/",get_ou('printerRDN'),$this->dn);
}
-
+
if(!$this->is_account) return;
if(isset($this->parent->by_object['workgeneric'])){
if($this->parent->by_object['workgeneric']->cn == "wdefault"){
$this->attrs= $attrs;
}
+ if (!empty($this->printer_description)) {
+ $this->attrs['description'] = $this->printer_description;
+ }
+
/* Append printer user
*/
$this->attrs['gotoUserPrinter']=array();