--- rpms/smeserver-shared-folders/contribs7/smeserver-shared-folders-0.1-add_ajaxplorer_support.patch 2011/06/28 14:59:29 1.2
+++ rpms/smeserver-shared-folders/contribs7/smeserver-shared-folders-0.1-add_ajaxplorer_support.patch 2011/06/28 14:59:56 1.3
@@ -1,57 +1,94 @@
diff -Nur smeserver-shared-folders-0.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares smeserver-shared-folders-0.1_mod/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares
---- smeserver-shared-folders-0.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares 2011-06-27 19:31:39.000000000 +0200
-+++ smeserver-shared-folders-0.1_mod/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares 2011-06-27 19:45:48.000000000 +0200
-@@ -284,7 +284,7 @@
- Entire Internet (no password required)
+--- smeserver-shared-folders-0.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares 2011-06-28 15:44:43.000000000 +0200
++++ smeserver-shared-folders-0.1_mod/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/shares 2011-06-28 15:51:25.000000000 +0200
+@@ -489,4 +489,18 @@
+
--
+
- ENTIRE_INTERNET_PASSWORD
- Entire Internet (password required)
-
-@@ -295,6 +295,16 @@
-
-
-
-+ ENTIRE_INTERNET_AJAXPLORER
-+ Entire Internet with a web-based management interface
++ DESC_AJAXPLORER
++
++ The following settings control the access of this shared folder with the web based file manager Ajaxplorer
++
+
+
+
-+ LOCAL_NETWORK_AJAXPLORER
-+ Local network with a web-based management interface
++ LABEL_AJAXPLORER
++
++ Ajaxplorer Access
++
+
+
-+
- ENABLED_BROWSEABLE
- Enabled, browseable
-
-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 2011-06-27 19:31:39.000000000 +0200
-+++ smeserver-shared-folders-0.1_mod/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm 2011-06-27 19:50:55.000000000 +0200
-@@ -382,7 +382,7 @@
- # access drop down list.
+
+diff -Nur smeserver-shared-folders-0.1/root/etc/e-smith/web/functions/shares smeserver-shared-folders-0.1_mod/root/etc/e-smith/web/functions/shares
+--- smeserver-shared-folders-0.1/root/etc/e-smith/web/functions/shares 2011-06-28 15:44:43.000000000 +0200
++++ smeserver-shared-folders-0.1_mod/root/etc/e-smith/web/functions/shares 2011-06-28 15:52:03.000000000 +0200
+@@ -117,6 +117,8 @@
+
+
- sub httpAccess_list {
-- return {
-+ my $list = {
- 'none' => 'NONE',
- 'local' => 'LOCAL_NETWORK_NO_PASSWORD',
- 'local-pw' => 'LOCAL_NETWORK_PASSWORD',
-@@ -390,6 +390,15 @@
- 'global-pw' => 'ENTIRE_INTERNET_PASSWORD',
- 'global-pw-remote' => 'ENTIRE_INTERNET_PASSWORD_REMOTE'
- };
++
+
-+ # Check if ajaxplorer is enabled
+
+
+
+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 2011-06-28 15:44:43.000000000 +0200
++++ smeserver-shared-folders-0.1_mod/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/shares.pm 2011-06-28 15:54:57.000000000 +0200
+@@ -25,6 +25,7 @@
+ print_share_table
+ print_share_name_field
+ print_encryption_fields
++ print_ajaxplorer_fields
+ genGroupAccess
+ smbAccess_list
+ httpAccess_list
+@@ -293,6 +294,32 @@
+ return undef;
+ }
+
++# If ajaxplorer is enabled:
++sub print_ajaxplorer_fields {
++ my ($self) = @_;
+ if (($configdb->get('ajaxplorer')->prop('status') || 'disabled') eq 'enabled'){
-+ my $access = (($configdb->get('ajaxplorer')->prop('access') || 'private') eq 'public') ?
-+ 'ENTIRE_INTERNET':'LOCAL_NETWORK';
-+ $list->{'ajaxplorer'} = $access . '_AJAXPLORER';
++ print_section_bar();
++ my ($enabled,$disabled) = ('','');
++ if (($accountdb->get($self->{cgi}->param('name'))->prop('Ajaxplorer') || 'disabled') eq 'enabled'){
++ $enabled = ' SELECTED';
++ }
++ else {
++ $disabled = ' SELECTED';
++ }
++ print qq(
) . $self->localise('DESC_AJAXPLORER') . qq( |
);
++ print qq() .
++ $self->localise('LABEL_AJAXPLORER') . qq( | \n);
++ print qq(
++ |
++ );
+ }
++ return undef;
++}
+
-+ return $list;
- }
++
+ # Takes a comma delimited list of groups and returns a string of
+ # html checkboxes for all system groups with the groups having write and read access.
- # VALIDATION ROUTINES
+@@ -537,6 +564,7 @@
+ smbAccess => $self->cgi->param('smbaccess'),
+ httpAccess => $self->cgi->param('httpaccess'),
+ WebDav => $self->cgi->param('webdav'),
++ Ajaxplorer => ($self->cgi->param('ajaxplorer') || 'disabled'),
+ RequireSSL => $self->cgi->param('requireSSL'),
+ Indexes => $self->cgi->param('indexes'),
+ DynamicContent => $self->cgi->param('dynamic'),
+@@ -608,6 +636,7 @@
+ smbAccess => $self->cgi->param('smbaccess'),
+ httpAccess => $self->cgi->param('httpaccess'),
+ WebDav => $self->cgi->param('webdav'),
++ Ajaxplorer => ($self->cgi->param('ajaxplorer') || 'disabled'),
+ RequireSSL => $self->cgi->param('requireSSL'),
+ Indexes => $self->cgi->param('indexes'),
+ DynamicContent => $self->cgi->param('dynamic'),