diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 2b9fa073e76e425780c6762db8e5f4043d9f5a83..9ff8c3e3b912fcce9e0a89dce492312c66096619 100644 (file)
"gotoUserAdminPrinter","gotoGroupAdminPrinter","gotoUserPrinter","gotoGroupPrinter");
var $objectclasses = array("top", "gotoPrinter");
- function printgeneric ($config, $dn,$parent)
+ var $parent;
+
+ function printgeneric ($config, $dn,$parent_init,$parent)
{
$this->config = $config;
$this->dn = $dn;
-
+
/* If parent was posted(the tabs object) we can detect the printer type. */
if($parent){
$this->parent = $parent;
$this->orig_dn = $this->dn;
/* Get printer settings, possibly dn has changed */
- plugin::plugin ($config, $this->dn);
+ plugin::plugin ($config, $this->dn,$parent_init);
/* Get is_account initially_was_account status */
$this->getTypeOfPrinter(true);
/* Detect type of printer via parent tabs.
*/
+
+ $class = get_class($this->parent);
if(isset($this->parent->by_object['workgeneric'])){
/* Exclude templates
foreach($_POST as $name => $value){
if(preg_match("/^chooseBase/",$name) && $once){
$once = false;
- $this->dialog = new baseSelectDialog($this->config,$this);
+ $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
$this->dialog->setCurrentBase($this->base);
$this->baseSelection = true;
}
}
/* Fill templating stuff */
- $smarty->assign("bases", $this->config->idepartments);
+ $smarty->assign("bases", $this->get_allowed_bases());
$smarty->assign("base_select", $this->base);
/* Assign attributes */
function save_object()
{
plugin::save_object();
- $this->netConfigDNS->save_object();
+
+ if(is_object($this->netConfigDNS)){
+ $this->netConfigDNS->save_object();
+ }
/* Save base, since this is no LDAP attribute */
- if(isset($_POST['base'])){
+ if((isset($_POST['base'])) && ($this->acl_is_moveable()) ) {
$this->set_acl_base('dummy,'.$_POST['base']);
if($this->acl_is_moveable()){
}
/* If no ppd is selected, remove this attribute */
- if(count($this->gotoPrinterPPD)) {
+ if(!empty($this->gotoPrinterPPD)) {
$this->attrs['gotoPrinterPPD'] = $method.str_replace("//","/",$_SERVER['SERVER_NAME']."/ppd/".$this->gotoPrinterPPD);
}else{
$this->attrs['gotoPrinterPPD'] = array();
"plPriority" => 0,
"plSection" => array("administration"),
"plCategory" => array("printer" => array("description" => _("Printer"),
- "objectClass" => "gotoPrinter")),
+ "objectClass" => "gotoPrinter"),"workstation"),
"plProvidedAcls"=> array(
"cn" => _("Name"),
-
+ "base" => _("Base") ,
"description" => _("Description"),
"l" => _("Location"),
"labeledURI" => _("LabeledURL"),