1 package SL::InstanceConfiguration;
10 return bless {}, $class;
16 $self->{data} = selectfirst_hashref_query($::form, $::form->get_standard_dbh, qq|SELECT * FROM defaults|);
18 my $curr = $self->{data}->{curr} || '';
20 $self->{currencies} = [ split m/:/, $curr ];
25 sub get_default_currency {
28 return ($self->get_currencies)[0];
34 return $self->{currencies} ? @{ $self->{currencies} } : ();
47 SL::InstanceConfiguration - Provide instance-specific configuration data
51 Lx-Office has two configuration levels: installation specific
52 (provided by the global variable C<%::lxoffice_conf>) and instance
53 specific. The latter is provided by a global instance of this class,
62 Creates a new instance. Does not read the configuration.
66 Reads the configuration from the database. Returns C<$self>.
68 =item C<get_currencies>
70 Returns an array of configured currencies.
72 =item C<get_default_currency>
74 Returns the default currency or undef if no currency has been
81 Updates to the I<defaults> table require that the instance
82 configuration is re-read. This has not been implemented yet.
86 Moritz Bunkus E<lt>m.bunkus@linet-services.deE<gt>