Update controller and custom to use our for db handles
This commit is contained in:
@@ -44,13 +44,13 @@ use esmith::NetworksDB::UTF8;
|
|||||||
use esmith::HostsDB;
|
use esmith::HostsDB;
|
||||||
use esmith::DomainsDB::UTF8;
|
use esmith::DomainsDB::UTF8;
|
||||||
|
|
||||||
my $cdb;
|
our $cdb;
|
||||||
my $adb;
|
our $adb;
|
||||||
my $ndb;
|
our $ndb;
|
||||||
my $hdb;
|
our $hdb;
|
||||||
my $ddb;
|
our $ddb;
|
||||||
|
|
||||||
my %${prefix}_data;
|
our %${prefix}_data;
|
||||||
|
|
||||||
require '/usr/share/smanager/lib/SrvMngr/Controller/${PackageName}-Custom.pm'; #The code that is to be added by the developer
|
require '/usr/share/smanager/lib/SrvMngr/Controller/${PackageName}-Custom.pm'; #The code that is to be added by the developer
|
||||||
|
|
||||||
@@ -209,11 +209,11 @@ sub do_display {
|
|||||||
$c->app->log->info($c->log_req);
|
$c->app->log->info($c->log_req);
|
||||||
|
|
||||||
#The most common ones - you might want to delete some of these if they are not used.
|
#The most common ones - you might want to delete some of these if they are not used.
|
||||||
$cdb = esmith::ConfigDB::UTF8->open() || die("Couldn't open config db");
|
$cdb = esmith::ConfigDB::UTF8->open() || die("Couldn't open config db");
|
||||||
$adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db");
|
$adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db");
|
||||||
$ndb = esmith::NetworksDB->open() || die("Couldn't open Network db");
|
$ndb = esmith::NetworksDB->open() || die("Couldn't open Network db");
|
||||||
$hdb = esmith::HostsDB::UTF8->open() || die("Couldn't open Hosts db");
|
$hdb = esmith::HostsDB::UTF8->open() || die("Couldn't open Hosts db");
|
||||||
$ddb = esmith::DomainsDB::UTF8->open() || die("Couldn't open Domains db");
|
$ddb = esmith::DomainsDB::UTF8->open() || die("Couldn't open Domains db");
|
||||||
|
|
||||||
my $title = $c->l('${prefix}_${MenuDescription}');
|
my $title = $c->l('${prefix}_${MenuDescription}');
|
||||||
my $modul = '';
|
my $modul = '';
|
||||||
|
@@ -18,11 +18,11 @@ use constant TRUE => 1;
|
|||||||
|
|
||||||
|
|
||||||
#The most common ones - open DB when required.
|
#The most common ones - open DB when required.
|
||||||
my $cdb;
|
#my $cdb;
|
||||||
my $adb;
|
#my $adb;
|
||||||
my $ndb;
|
#my $ndb;
|
||||||
my $hdb;
|
#my $hdb;
|
||||||
my $ddb;
|
#my $ddb;
|
||||||
|
|
||||||
#The most common ones - you might want to use these if you need to make sure that the DB is refreshed.
|
#The most common ones - you might want to use these if you need to make sure that the DB is refreshed.
|
||||||
#$cdb = esmith::ConfigDB::UTF8->open() || die("Couldn't open config db");
|
#$cdb = esmith::ConfigDB::UTF8->open() || die("Couldn't open config db");
|
||||||
|
Reference in New Issue
Block a user