diff -Nur smeserver-shared-folders-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm smeserver-shared-folders-0.1_mod/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm
--- smeserver-shared-folders-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm 2010-12-15 08:46:06.000000000 +0100
+++ smeserver-shared-folders-0.1_mod/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm 2010-12-15 08:54:01.000000000 +0100
@@ -252,56 +252,58 @@
my $ReadGroups = $q->param('ReadGroups') || '';
my $share = $q->param('share');
my $manualPerm = $q->param('manualPerm') || '';
+ my $out = '';
if (($manualPerm eq 'yes') || ($manualPerm eq 'enabled')){
- return $fm->localise('MANUAL_PERMS');
+ $out .= $fm->localise('MANUAL_PERMS');
}
- else {
- my %WriteGroups;
- my %ReadGroups;
- foreach my $group ( split ( /[,;]/, $WriteGroups ) ) {
- $WriteGroups{$group} = 1;
- }
- foreach my $group ( split ( /[,;]/, $ReadGroups ) ) {
- $ReadGroups{$group} = 1;
- }
- my @groups = sort { $a->key() cmp $b->key() } $accountdb->groups();
-
- my $out = "
" .
- $fm->localise('PERMISSIONS') .
- " | \n".
- $q->start_table({-class => "sme-border"})."\n".
- $q->Tr(
- esmith::cgi::genSmallCell($q, $fm->localise('GROUPS'),"header"),
- esmith::cgi::genSmallCell($q, $fm->localise('WRITE_PERM'),"header"),
- esmith::cgi::genSmallCell($q, $fm->localise('READ_PERM'),"header")
- );
- foreach my $group (@groups) {
- my $write = "";
- my $read = "";
- my $name = $group->key();
- if ( $WriteGroups{$name} ) {
- $write = "checked";
- }
- if ( $ReadGroups{$name} ) {
- $read = "checked";
- }
+ my %WriteGroups;
+ my %ReadGroups;
+
+ foreach my $group ( split ( /[,;]/, $WriteGroups ) ) {
+ $WriteGroups{$group} = 1;
+ }
+ foreach my $group ( split ( /[,;]/, $ReadGroups ) ) {
+ $ReadGroups{$group} = 1;
+ }
+ my @groups = sort { $a->key() cmp $b->key() } $accountdb->groups();
- $out .= $q->Tr(
- esmith::cgi::genSmallCell($q, $name, "normal"),
- esmith::cgi::genSmallCell($q,"", "normal"),
- esmith::cgi::genSmallCell($q,"", "normal")
- );
+ $out .= " |
" .
+ $fm->localise('PERMISSIONS') .
+ " | \n".
+ $q->start_table({-class => "sme-border"})."\n".
+ $q->Tr(
+ esmith::cgi::genSmallCell($q, $fm->localise('GROUPS'),"header"),
+ esmith::cgi::genSmallCell($q, $fm->localise('WRITE_PERM'),"header"),
+ esmith::cgi::genSmallCell($q, $fm->localise('READ_PERM'),"header")
+ );
+
+ foreach my $group (@groups) {
+ my $write = "";
+ my $read = "";
+ my $name = $group->key();
+ if ( $WriteGroups{$name} ) {
+ $write = "checked";
+ }
+ if ( $ReadGroups{$name} ) {
+ $read = "checked";
}
- $out .= " |
\n";
- return $out;
+ $out .= $q->Tr(
+ esmith::cgi::genSmallCell($q, $name, "normal"),
+
+ esmith::cgi::genSmallCell($q,"", "normal"),
+ esmith::cgi::genSmallCell($q,"", "normal")
+ );
}
+
+ $out .= "\n";
+ return $out;
}
# Print a section bar