use Carp;
use SL::DBUtils ();
+use SL::System::Process;
use parent qw(Rose::Object);
use Rose::Object::MakeMethods::Generic (
- 'scalar --get_set_init' => [ qw(data currencies default_currency _table_currencies_exists) ],
+ 'scalar --get_set_init' => [ qw(data currencies default_currency _table_currencies_exists crm_installed) ],
);
sub init_data {
return (SL::DBUtils::selectfirst_array_query($::form, $::form->get_standard_dbh, qq|SELECT name FROM currencies WHERE id = ?|, $self->data->{currency_id}))[0];
}
+sub init_crm_installed {
+ return -f (SL::System::Process->exe_dir . '/crm/Changelog');
+}
+
sub reload {
my ($self) = @_;
Creates a new instance. Does not read the configuration.
-=item C<init>
+=item C<crm_installed>
-Reads the configuration from the database. Returns C<$self>.
+Returns trueish if the CRM component is installed.
=item C<get_currencies>