From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephan Feddersen <sfeddersen@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH] WIO: fix the bugs reported in the forum Date: Sun, 27 Aug 2017 14:41:53 +0200 Message-ID: <1503837713-9760-1-git-send-email-sfeddersen@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4677944220257682448==" List-Id: <development.lists.ipfire.org> --===============4677944220257682448== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable --- lfs/wio | 4 ++-- src/paks/wio/install.sh | 1 + src/wio/wio.cgi | 25 ++++++++++++++++++++----- src/wio/wiographs.cgi | 2 +- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/lfs/wio b/lfs/wio index 25726cd..d70b12b 100644 --- a/lfs/wio +++ b/lfs/wio @@ -15,7 +15,7 @@ THISAPP =3D wio-$(VER) DIR_APP =3D $(DIR_SRC)/$(THISAPP) TARGET =3D $(DIR_INFO)/$(THISAPP) PROG =3D wio -PAK_VER =3D 2 +PAK_VER =3D 3 =20 ############################################################################= ### # Top-level Rules @@ -58,7 +58,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) install -v -m 644 $(DIR_APP)/wio/images/* /srv/web/ipfire/html/images/wio/ install -v -m 655 $(DIR_APP)/wio/lang/wio.de.pl /var/ipfire/addon-lang/ install -v -m 655 $(DIR_APP)/wio/lang/wio.en.pl /var/ipfire/addon-lang/ - install -v -m 655 $(DIR_APP)/wio/EX-wio.menu /var/ipfire/menu.d/ + install -v -m 644 $(DIR_APP)/wio/EX-wio.menu /var/ipfire/menu.d/ install -v -m 644 $(DIR_APP)/wio/config/backup/includes/wio /var/ipfire/bac= kup/addons/includes/wio =20 @rm -rf $(DIR_APP) diff --git a/src/paks/wio/install.sh b/src/paks/wio/install.sh index f46ae35..5c7705b 100644 --- a/src/paks/wio/install.sh +++ b/src/paks/wio/install.sh @@ -30,6 +30,7 @@ chown -R nobody.nobody /var/log/rrd/wio chown -R nobody.nobody /var/log/wio chown root.nobody /usr/local/bin/wioscan chown root.nobody /usr/local/bin/wiohelper +chown nobody.nobody /var/ipfire/menu.d/EX-wio.menu =20 chmod 4750 /usr/local/bin/wioscan chmod 4750 /usr/local/bin/wiohelper diff --git a/src/wio/wio.cgi b/src/wio/wio.cgi index aa471e6..4fbf34a 100644 --- a/src/wio/wio.cgi +++ b/src/wio/wio.cgi @@ -21,7 +21,7 @@ # = # ############################################################################= ### # -# id: wio.cgi, v1.3.1 2017/07/11 21:31:16 sfeddersen +# id: wio.cgi, v1.3.2 2017/08/27 14:11:16 sfeddersen # # This wio.cgi is based on the Code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. @@ -917,7 +917,10 @@ print" <td align=3D'left'><select size=3D'1' name=3D'CRON' size=3D'5'> "; =20 -for ($i=3D5; $i<=3D60; $i+=3D5) { printf("<option %s>%02s</option>\n",$selec= ted{'CRON'}{$i},$i); } +for ($i=3D5; $i<=3D60; $i+=3D5) { + $_ =3D sprintf("%02s",$i); + print "<option $selected{'CRON'}{$_}>$_</option>\n"; +} =20 print" </select> $Lang::tr{'wio min'}</td> @@ -929,7 +932,10 @@ print" <td align=3D'left'><select size=3D'1' name=3D'TIMEOUT' size=3D'5'> "; =20 -for ($i=3D1; $i<=3D15; $i++) { printf("<option %s>%02s</option>\n",$selected= {'TIMEOUT'}{$i},$i); } +for ($i=3D1; $i<=3D15; $i++) { + $_ =3D sprintf("%02s",$i); + print "<option $selected{'TIMEOUT'}{$_}>$_</option>\n"; +} =20 print"=09 </select> $Lang::tr{'wio sec'}</td> @@ -980,7 +986,10 @@ print" <td align=3D'left'><select size=3D'1' name=3D'OVPNCRON' size=3D'5'> "; =20 -for ($i=3D1; $i<=3D15; $i++) { printf("<option %s>%02s</option>\n",$selected= {'OVPNCRON'}{$i},$i); } +for ($i=3D1; $i<=3D15; $i++) { + $_ =3D sprintf("%02s",$i); + print "<option $selected{'OVPNCRON'}{$_}>$_</option>\n"; +} =20 print" </select> $Lang::tr{'wio min'}</td> @@ -1947,7 +1956,13 @@ print" <table border=3D'0' width=3D'100%' bordercolor=3D'$Header::bordercolour' cel= lspacing=3D'0' cellpadding=3D'0' style=3D'border-collapse: collapse'> <tr bgcolor=3D'$color{'color22'}'> <td colspan=3D'2' align=3D'right'></td> - <td width=3D'10%' align=3D'right'><form method=3D'post' action=3D'/cgi-bin/= logs.cgi/log.dat' enctype=3D'multipart/form-data'><input type=3D'hidden' name= =3D'SECTION' value=3D'wio' /><input type=3D'submit' name=3D'SUBMIT' value=3D'= $Lang::tr{'system logs'}' /></form></td> +"; + +if ( $wiosettings{'LOGGING'} eq 'on' ) { + print"<td width=3D'10%' align=3D'right'><form method=3D'post' action=3D'/cg= i-bin/logs.cgi/log.dat' enctype=3D'multipart/form-data'><input type=3D'hidden= ' name=3D'SECTION' value=3D'wio' /><input type=3D'submit' name=3D'SUBMIT' val= ue=3D'$Lang::tr{'system logs'}' /></form></td>"; +} + +print" <td width=3D'10%' align=3D'right'><form method=3D'post' action=3D'$ENV{'SCR= IPT_NAME'}' enctype=3D'multipart/form-data'><input type=3D'hidden' name=3D'AC= TION' value=3D'$Lang::tr{'edit'}1' /><input type=3D'submit' name=3D'SUBMIT' v= alue=3D'$Lang::tr{'wio_edit_set'}' /></form></td> </tr> </table> diff --git a/src/wio/wiographs.cgi b/src/wio/wiographs.cgi index 7370237..06b6946 100644 --- a/src/wio/wiographs.cgi +++ b/src/wio/wiographs.cgi @@ -21,7 +21,7 @@ # = # ############################################################################= ### # -# id: wiographs.cgi, v1.3.1 2017/07/11 21:31:16 sfeddersen +# id: wiographs.cgi, v1.3.2 2017/08/27 14:11:16 sfeddersen # # This wiographs.cgi is based on the Code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. --=20 2.7.4 --===============4677944220257682448==--