From: Michael Tremer <git@ipfire.org>
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. a63fe65a2f7cf819b27412c9d635806ebba341e0
Date: Tue, 27 Oct 2020 11:38:17 +0000 [thread overview]
Message-ID: <4CL8pd5hxpz2xZm@people01.haj.ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 4206 bytes --]
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".
The branch, next has been updated
via a63fe65a2f7cf819b27412c9d635806ebba341e0 (commit)
from ed3ed3d7235c9e049d1c6a6825806e2b4ebc816f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a63fe65a2f7cf819b27412c9d635806ebba341e0
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Tue Oct 27 11:37:03 2020 +0000
samba: Make changing shares taking effect immediately
The action was performed after the table has already been
rendered which required reloading the page to show a new
share.
This has now been moved to the top so that new changes
will be shown immediately.
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
-----------------------------------------------------------------------
Summary of changes:
html/cgi-bin/samba.cgi | 47 +++++++++++++++++++++++++----------------------
1 file changed, 25 insertions(+), 22 deletions(-)
Difference in files:
diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi
index be670a95e..ec41adc5d 100644
--- a/html/cgi-bin/samba.cgi
+++ b/html/cgi-bin/samba.cgi
@@ -44,7 +44,7 @@ my $userfile = "${General::swroot}/samba/private/smbpasswd";
my %selected= () ;
my $defaultoption= "[My Share]\npath = \ncomment = Share - Public Access\nbrowseable = yes\nwriteable = yes\ncreate mask = 0644\ndirectory mask = 0755\npublic = yes\nforce user = samba";
-my %shares = ();
+my %shares = &config("${General::swroot}/samba/shares");
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
@@ -97,6 +97,30 @@ if ($sambasettings{'ACTION'} eq 'join') {
$message .= &joindomain($sambasettings{'USERNAME'}, $sambasettings{'PASSWORD'});
}
+if ($sambasettings{'ACTION'} eq 'smbshareadd') {
+ $shares{'xvx'} = $sambasettings{'SHAREOPTION'};
+ &save("shares");
+
+ # Reload configuration
+ %shares = config("${General::swroot}/samba/shares");
+}
+
+if ($sambasettings{'ACTION'} eq 'smbsharedel') {
+ delete $shares{$sambasettings{'NAME'}};
+ &save("shares");
+
+ # Reload configuration
+ %shares = config("${General::swroot}/samba/shares");
+}
+
+if ($sambasettings{'ACTION'} eq 'smbsharechange') {
+ $shares{$sambasettings{'NAME'}} = $sambasettings{'SHAREOPTION'};
+ &save("shares");
+
+ # Reload configuration
+ %shares = config("${General::swroot}/samba/shares");
+}
+
############################################################################################################################
########################################### Samba Benutzer oder PC l�chen #################################################
@@ -538,8 +562,6 @@ END
&Header::openbox('100%', 'center', $Lang::tr{'shares'});
-my %shares = config("${General::swroot}/samba/shares");
-
print <<END;
<table class="tbl" width='100%' cellspacing='0'>
<tr>
@@ -654,25 +676,6 @@ if ($sambasettings{'ACTION'} eq 'sharechange') {
END
}
-if ($sambasettings{'ACTION'} eq 'smbshareadd')
- {
- $shares{'xvx'}= "$sambasettings{'SHAREOPTION'}";
- save("shares");
- my $shares = config("${General::swroot}/samba/shares");
- }
-if ($sambasettings{'ACTION'} eq 'smbsharedel')
- {
- delete $shares{$sambasettings{'NAME'}};
- save("shares");
- my %shares = config("${General::swroot}/samba/shares");
- }
-if ($sambasettings{'ACTION'} eq 'smbsharechange')
- {
- $shares{$sambasettings{'NAME'}} = $sambasettings{'SHAREOPTION'};
- save("shares");
- my %shares = config("${General::swroot}/samba/shares");
- }
-
&Header::closebox();
############################################################################################################################
hooks/post-receive
--
IPFire 2.x development tree
reply other threads:[~2020-10-27 11:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CL8pd5hxpz2xZm@people01.haj.ipfire.org \
--to=git@ipfire.org \
--cc=ipfire-scm@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox