/[smecontribs]/rpms/smeserver-shared-folders/contribs8/smeserver-shared-folders-0.1-print_group_table_with_manual_perms.patch
ViewVC logotype

Contents of /rpms/smeserver-shared-folders/contribs8/smeserver-shared-folders-0.1-print_group_table_with_manual_perms.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sun Mar 3 22:04:40 2013 UTC (11 years, 8 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-shared-folders-0_1-80_el5_sme, smeserver-shared-folders-0_1-83_el5_sme, smeserver-shared-folders-0_1-84_el5_sme, smeserver-shared-folders-0_1-82_el5_sme, smeserver-shared-folders-0_1-87_el5_sme, smeserver-shared-folders-0_1-86_el5_sme, smeserver-shared-folders-0_1-81_el5_sme, smeserver-shared-folders-0_1-85_el5_sme, smeserver-shared-folders-0_1-79_el5_sme, HEAD
Initial import

1 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
2 --- smeserver-shared-folders-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm 2010-12-15 08:46:06.000000000 +0100
3 +++ 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
4 @@ -252,56 +252,58 @@
5 my $ReadGroups = $q->param('ReadGroups') || '';
6 my $share = $q->param('share');
7 my $manualPerm = $q->param('manualPerm') || '';
8 + my $out = '';
9
10 if (($manualPerm eq 'yes') || ($manualPerm eq 'enabled')){
11 - return $fm->localise('MANUAL_PERMS');
12 + $out .= $fm->localise('MANUAL_PERMS');
13 }
14 - else {
15 - my %WriteGroups;
16 - my %ReadGroups;
17 - foreach my $group ( split ( /[,;]/, $WriteGroups ) ) {
18 - $WriteGroups{$group} = 1;
19 - }
20 - foreach my $group ( split ( /[,;]/, $ReadGroups ) ) {
21 - $ReadGroups{$group} = 1;
22 - }
23 - my @groups = sort { $a->key() cmp $b->key() } $accountdb->groups();
24 -
25 - my $out = "<tr><td class=\"sme-noborders-label\">" .
26 - $fm->localise('PERMISSIONS') .
27 - "</td><td>\n".
28 - $q->start_table({-class => "sme-border"})."\n".
29 - $q->Tr(
30 - esmith::cgi::genSmallCell($q, $fm->localise('GROUPS'),"header"),
31 - esmith::cgi::genSmallCell($q, $fm->localise('WRITE_PERM'),"header"),
32 - esmith::cgi::genSmallCell($q, $fm->localise('READ_PERM'),"header")
33 - );
34
35 - foreach my $group (@groups) {
36 - my $write = "";
37 - my $read = "";
38 - my $name = $group->key();
39 - if ( $WriteGroups{$name} ) {
40 - $write = "checked";
41 - }
42 - if ( $ReadGroups{$name} ) {
43 - $read = "checked";
44 - }
45 + my %WriteGroups;
46 + my %ReadGroups;
47 +
48 + foreach my $group ( split ( /[,;]/, $WriteGroups ) ) {
49 + $WriteGroups{$group} = 1;
50 + }
51 + foreach my $group ( split ( /[,;]/, $ReadGroups ) ) {
52 + $ReadGroups{$group} = 1;
53 + }
54 + my @groups = sort { $a->key() cmp $b->key() } $accountdb->groups();
55
56 - $out .= $q->Tr(
57 - esmith::cgi::genSmallCell($q, $name, "normal"),
58 - esmith::cgi::genSmallCell($q,"<input type=\"checkbox\""
59 - . " name=\"write\""
60 - . " $write value=\"$name\">", "normal"),
61 - esmith::cgi::genSmallCell($q,"<input type=\"checkbox\""
62 - . " name=\"read\""
63 - . " $read value=\"$name\">", "normal")
64 - );
65 + $out .= "<tr><td class=\"sme-noborders-label\">" .
66 + $fm->localise('PERMISSIONS') .
67 + "</td><td>\n".
68 + $q->start_table({-class => "sme-border"})."\n".
69 + $q->Tr(
70 + esmith::cgi::genSmallCell($q, $fm->localise('GROUPS'),"header"),
71 + esmith::cgi::genSmallCell($q, $fm->localise('WRITE_PERM'),"header"),
72 + esmith::cgi::genSmallCell($q, $fm->localise('READ_PERM'),"header")
73 + );
74 +
75 + foreach my $group (@groups) {
76 + my $write = "";
77 + my $read = "";
78 + my $name = $group->key();
79 + if ( $WriteGroups{$name} ) {
80 + $write = "checked";
81 + }
82 + if ( $ReadGroups{$name} ) {
83 + $read = "checked";
84 }
85
86 - $out .= "</table></td></tr>\n";
87 - return $out;
88 + $out .= $q->Tr(
89 + esmith::cgi::genSmallCell($q, $name, "normal"),
90 +
91 + esmith::cgi::genSmallCell($q,"<input type=\"checkbox\""
92 + . " name=\"write\""
93 + . " $write value=\"$name\">", "normal"),
94 + esmith::cgi::genSmallCell($q,"<input type=\"checkbox\""
95 + . " name=\"read\""
96 + . " $read value=\"$name\">", "normal")
97 + );
98 }
99 +
100 + $out .= "</table></td></tr>\n";
101 + return $out;
102 }
103
104 # Print a section bar

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed