Drucker im Adminbereich ändern - Bug behoben
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Thu, 7 Jan 2016 09:50:30 +0000 (10:50 +0100)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Thu, 7 Jan 2016 09:50:30 +0000 (10:50 +0100)
Im Drucker-Fall enthält $::form die Drucker-id in $::form->{id} und die
client-ID in $::form->{client}->{id}, beim init_client Code für den Fall
muß also erst auf id in $::form->{client}->{id} geprüft werden,
ansonsten wird der Client mit der id des Druckers gesucht und nicht
gefunden.

Danke Geoffrey.

SL/Controller/Admin.pm

index 94dfc69..ab4e24f 100644 (file)
@@ -490,7 +490,7 @@ sub action_lock_system {
 
 sub init_db_cfg            { $::lx_office_conf{'authentication/database'}                                                    }
 sub init_is_locked         { SL::System::InstallationLock->is_locked                                                         }
-sub init_client            { SL::DB::Manager::AuthClient->find_by(id => ($::form->{id} || ($::form->{client}  || {})->{id})) }
+sub init_client            { SL::DB::Manager::AuthClient->find_by(id => (($::form->{client} || {})->{id} || $::form->{id}))  }
 sub init_user              { SL::DB::AuthUser  ->new(id => ($::form->{id} || ($::form->{user}    || {})->{id}))->load        }
 sub init_group             { SL::DB::AuthGroup ->new(id => ($::form->{id} || ($::form->{group}   || {})->{id}))->load        }
 sub init_printer           { SL::DB::Printer   ->new(id => ($::form->{id} || ($::form->{printer} || {})->{id}))->load        }