From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Marx To: development@lists.ipfire.org Subject: [PATCH] BUG11505: Captive Portal: no way to remove an uploaded logo Date: Thu, 24 May 2018 12:38:39 +0200 Message-ID: <1527158319-14437-1-git-send-email-alexander.marx@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0046980810882024662==" List-Id: --===============0046980810882024662== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable added a delete button Signed-off-by: Alexander Marx --- html/cgi-bin/captive.cgi | 9 ++++++++- langs/de/cgi-bin/de.pl | 1 + langs/en/cgi-bin/en.pl | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/html/cgi-bin/captive.cgi b/html/cgi-bin/captive.cgi index 65cc349..02b2eb5 100755 --- a/html/cgi-bin/captive.cgi +++ b/html/cgi-bin/captive.cgi @@ -142,6 +142,10 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'save'}) { } } =20 +if ($cgiparams{'ACTION'} eq "$Lang::tr{'Captive delete logo'}") { + unlink $logo; +} + if ($cgiparams{'ACTION'} eq "$Lang::tr{'Captive generate coupons'}") { #check valid remark if ($cgiparams{'REMARK'} ne '' && !&validremark($cgiparams{'REMARK'})){ @@ -381,7 +385,10 @@ if (-e $logo) { print < $Lang::tr{'Captive logo uploaded'} - $Lang::tr{'yes'} + + $Lang::tr{'yes'}  + + END } diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index edff684..f00a667 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -28,6 +28,7 @@ 'Captive clients' =3D> 'Clients', 'Captive config' =3D> 'Konfiguration', 'Captive coupon' =3D> 'Gutschein', +'Captive delete logo' =3D> 'Logo l=C3=B6schen', 'Captive err doublevoucher' =3D> 'Ein Gutschein mit diesem Code ist bereits = im Umlauf', 'Captive expire' =3D> 'Ablauf', 'Captive expiry time' =3D> 'Ablaufzeit', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index 0c77ce4..ef141a3 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -27,6 +27,7 @@ 'Captive client session expiry time' =3D> 'Session Expiry Time', 'Captive config' =3D> 'Settings', 'Captive coupon' =3D> 'Coupon', +'Captive delete logo' =3D> 'Delete Logo', 'Captive err doublevoucher' =3D> 'A coupon with this code already exists', 'Captive expire' =3D> 'Expire', 'Captive expiry time' =3D> 'Expiry Time', --=20 2.7.4 --===============0046980810882024662==--