diff --git a/root/usr/share/smanager/lib/SrvMngr/Controller/Shares-Custom.pm b/root/usr/share/smanager/lib/SrvMngr/Controller/Shares-Custom.pm index 2d96504..21798aa 100644 --- a/root/usr/share/smanager/lib/SrvMngr/Controller/Shares-Custom.pm +++ b/root/usr/share/smanager/lib/SrvMngr/Controller/Shares-Custom.pm @@ -7,11 +7,11 @@ # use esmith::util; use esmith::util::network; -use esmith::ConfigDB; -use esmith::HostsDB; -use esmith::AccountsDB; +use esmith::ConfigDB::UTF8; +use esmith::HostsDB::UTF8; +use esmith::AccountsDB::UTF8; use esmith::NetworksDB; -use esmith::DomainsDB; +use esmith::DomainsDB::UTF8; use constant FALSE => 0; use constant TRUE => 1; @@ -178,7 +178,7 @@ my $ddb; # Return a hash with the fields required which will be loaded into the shared data my $c = shift; my $name = $c->param('Selected'); - $adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db"); + $adb = esmith::AccountsDB::UTF8->open() || die("Couldn't open Accounts db"); my $rec = $adb->get($name) || die("Share $name is not in DB "); my %ret = ( 'Data1'=>'Data for MODIFY', #Example @@ -203,7 +203,7 @@ my $ddb; # Return a hash with the fields required which will be loaded into the shared data my $c = shift; my $name = $c->param('Selected'); - $adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db"); + $adb = esmith::AccountsDB::UTF8->open() || die("Couldn't open Accounts db"); my $rec = $adb->get($name) || die("Share $name is not in DB "); my %ret = ( 'Data1'=>'Data for MODIFY', #Example @@ -218,7 +218,7 @@ my $ddb; # Return a hash with the fields required which will be loaded into the shared data my $c = shift; my $name = $c->param('Selected'); - $adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db"); + $adb = esmith::AccountsDB::UTF8->open() || die("Couldn't open Accounts db"); my $rec = $adb->get($name) || die("Share $name is not in DB "); my %ret = ( 'Data1'=>'Data for MODIFY', #Example @@ -246,7 +246,7 @@ sub actual_Table1 { my $c = shift; my @ret = (); # Actual code for extracting Table1 - $adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db"); + $adb = esmith::AccountsDB::UTF8->open() || die("Couldn't open Accounts db"); my @shares = $adb->get_all_by_prop(type => 'share'); foreach my $share (@shares) { my $sharename = $share->key(); @@ -494,7 +494,7 @@ sub save_share { # my $c = shift; my $name = $c->param('name'); - $adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db"); + $adb = esmith::AccountsDB::UTF8->open() || die("Couldn't open Accounts db"); my $acct = $adb->get($name); my $is_create = !$acct; @@ -594,7 +594,7 @@ sub save_share { sub modify_perm { my $c = shift; my $name = $c->param('name'); - $adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db"); + $adb = esmith::AccountsDB::UTF8->open() || die("Couldn't open Accounts db"); my $acct = $adb->get($name); return $c->l('sf_CANT_FIND_SHARE') unless($acct && $acct->prop('type') eq 'share'); @@ -652,7 +652,7 @@ sub modify_perm { # Remove a share sub remove_share { my $c = shift; - $adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db"); + $adb = esmith::AccountsDB::UTF8->open() || die("Couldn't open Accounts db"); my $name = $c->param('Selected'); my $acct = $adb->get($name); return $c->l('sf_CANCELED','First') if ($c->param('cancel')); @@ -686,7 +686,7 @@ sub remove_share { sub conflict_check { my ($c, $name) = @_; - $adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db"); + $adb = esmith::AccountsDB::UTF8->open() || die("Couldn't open Accounts db"); my $rec = $adb->get($name); my $type; @@ -757,7 +757,7 @@ sub confirm_password { sub max_share_name_length { my ($c, $data) = @_; - $cdb = esmith::ConfigDB->open() || die("Couldn't open config db"); + $cdb = esmith::ConfigDB::UTF8->open() || die("Couldn't open config db"); my $rec = $cdb->get('maxShareNameLength'); my $max = (defined $rec ? $rec->value : '12'); @@ -776,7 +776,7 @@ sub max_share_name_length { sub acl_list { my ($c, $which) = @_; my $sharename = $c->param('Selected'); - my $adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db"); + my $adb = esmith::AccountsDB::UTF8->open() || die("Couldn't open Accounts db"); my $share = $adb->get($sharename); return $c->l('sf_SHARE_NOT_FOUND') unless ($share); diff --git a/root/usr/share/smanager/lib/SrvMngr/Controller/Shares.pm b/root/usr/share/smanager/lib/SrvMngr/Controller/Shares.pm index 9d44118..6c156bc 100644 --- a/root/usr/share/smanager/lib/SrvMngr/Controller/Shares.pm +++ b/root/usr/share/smanager/lib/SrvMngr/Controller/Shares.pm @@ -38,11 +38,11 @@ use Data::Dumper; use esmith::util; use esmith::util::network; -use esmith::ConfigDB; -use esmith::AccountsDB; +use esmith::ConfigDB::UTF8; +use esmith::AccountsDB::UTF8; use esmith::NetworksDB; -use esmith::HostsDB; -use esmith::DomainsDB; +use esmith::HostsDB::UTF8; +use esmith::DomainsDB::UTF8; my $cdb; my $adb; @@ -70,11 +70,11 @@ sub main { $c->app->log->info( $c->log_req ); #The most common ones - $cdb = esmith::ConfigDB->open() || die("Couldn't open config db"); - $adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db"); + $cdb = esmith::ConfigDB::UTF8->open() || die("Couldn't open config db"); + $adb = esmith::AccountsDB::UTF8->open() || die("Couldn't open Accounts db"); $ndb = esmith::NetworksDB->open() || die("Couldn't open Network db"); - $hdb = esmith::HostsDB->open() || die("Couldn't open Hosts db"); - $ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db"); + $hdb = esmith::HostsDB::UTF8->open() || die("Couldn't open Hosts db"); + $ddb = esmith::DomainsDB::UTF8->open() || die("Couldn't open Domains db"); %sf_data = (); my $title = $c->l('sf_Shared_Folders'); @@ -122,11 +122,11 @@ sub do_update { my $modul = ''; #The most common ones - you might want to comment out any not used. - $cdb = esmith::ConfigDB->open() || die("Couldn't open config db"); - $adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db"); + $cdb = esmith::ConfigDB::UTF8->open() || die("Couldn't open config db"); + $adb = esmith::AccountsDB::UTF8->open() || die("Couldn't open Accounts db"); $ndb = esmith::NetworksDB->open() || die("Couldn't open Network db"); - $hdb = esmith::HostsDB->open() || die("Couldn't open Hosts db"); - $ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db"); + $hdb = esmith::HostsDB::UTF8->open() || die("Couldn't open Hosts db"); + $ddb = esmith::DomainsDB::UTF8->open() || die("Couldn't open Domains db"); my $title = $c->l('sf_Shared_Folders'); @@ -275,11 +275,11 @@ sub do_display { $c->app->log->info($c->log_req); #The most common ones - you might want to comment out any not used. - $cdb = esmith::ConfigDB->open() || die("Couldn't open config db"); - $adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db"); + $cdb = esmith::ConfigDB::UTF8->open() || die("Couldn't open config db"); + $adb = esmith::AccountsDB::UTF8->open() || die("Couldn't open Accounts db"); $ndb = esmith::NetworksDB->open() || die("Couldn't open Network db"); - $hdb = esmith::HostsDB->open() || die("Couldn't open Hosts db"); - $ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db"); + $hdb = esmith::HostsDB::UTF8->open() || die("Couldn't open Hosts db"); + $ddb = esmith::DomainsDB::UTF8->open() || die("Couldn't open Domains db"); my $title = $c->l('sf_Shared_Folders'); my $modul = ""; diff --git a/root/usr/share/smanager/themes/default/templates/partials/_sf_PERMISSIONS.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_sf_PERMISSIONS.html.ep index 2e24f6d..96a8b57 100644 --- a/root/usr/share/smanager/themes/default/templates/partials/_sf_PERMISSIONS.html.ep +++ b/root/usr/share/smanager/themes/default/templates/partials/_sf_PERMISSIONS.html.ep @@ -76,7 +76,7 @@
- % my $control_data = $c->stash('Table3'); + % $control_data = $c->stash('Table3'); % foreach my $row (@$control_data) {