]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
WIO: fix the bugs reported in the forum
authorStephan Feddersen <sfeddersen@ipfire.org>
Sun, 27 Aug 2017 12:41:53 +0000 (14:41 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 29 Aug 2017 13:37:30 +0000 (14:37 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/wio
src/paks/wio/install.sh
src/wio/wio.cgi
src/wio/wiographs.cgi

diff --git a/lfs/wio b/lfs/wio
index 25726cd934a46028f69be993b8b49490887e350d..d70b12b469e43e36f34bc9dc7248608587a0d458 100644 (file)
--- a/lfs/wio
+++ b/lfs/wio
@@ -15,7 +15,7 @@ THISAPP    = wio-$(VER)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = wio
-PAK_VER    = 2
+PAK_VER    = 3
 
 ###############################################################################
 # 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/backup/addons/includes/wio
 
        @rm -rf $(DIR_APP)
index f46ae350e9a60d05b15be212746762a15f1dc580..5c7705bf14744a2aff2ad12fafdf857c8aed30d2 100644 (file)
@@ -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
 
 chmod 4750 /usr/local/bin/wioscan
 chmod 4750 /usr/local/bin/wiohelper
index aa471e621a4ccbb2f15e0f3257c9aa9ee7852b38..4fbf34aee115d5116a6ad99a071a2c09f1019bdf 100644 (file)
@@ -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='left'><select size='1' name='CRON' size='5'>
 ";
 
-for ($i=5; $i<=60; $i+=5) { printf("<option %s>%02s</option>\n",$selected{'CRON'}{$i},$i); }
+for ($i=5; $i<=60; $i+=5) {
+       $_ = sprintf("%02s",$i);
+       print "<option $selected{'CRON'}{$_}>$_</option>\n";
+}
 
 print"
        </select>&nbsp;$Lang::tr{'wio min'}</td>
@@ -929,7 +932,10 @@ print"
        <td align='left'><select size='1' name='TIMEOUT' size='5'>
 ";
 
-for ($i=1; $i<=15; $i++) { printf("<option %s>%02s</option>\n",$selected{'TIMEOUT'}{$i},$i); }
+for ($i=1; $i<=15; $i++) {
+       $_ = sprintf("%02s",$i);
+       print "<option $selected{'TIMEOUT'}{$_}>$_</option>\n";
+}
 
 print" 
        </select>&nbsp;$Lang::tr{'wio sec'}</td>
@@ -980,7 +986,10 @@ print"
        <td align='left'><select size='1' name='OVPNCRON' size='5'>
 ";
 
-for ($i=1; $i<=15; $i++) { printf("<option %s>%02s</option>\n",$selected{'OVPNCRON'}{$i},$i); }
+for ($i=1; $i<=15; $i++) {
+       $_ = sprintf("%02s",$i);
+       print "<option $selected{'OVPNCRON'}{$_}>$_</option>\n";
+}
 
 print"
        </select>&nbsp;$Lang::tr{'wio min'}</td>
@@ -1947,7 +1956,13 @@ print"
 <table border='0' width='100%' bordercolor='$Header::bordercolour' cellspacing='0' cellpadding='0' style='border-collapse: collapse'>
 <tr bgcolor='$color{'color22'}'>
        <td colspan='2' align='right'></td>
-       <td width='10%' align='right'><form method='post' action='/cgi-bin/logs.cgi/log.dat' enctype='multipart/form-data'><input type='hidden' name='SECTION' value='wio' /><input type='submit' name='SUBMIT' value='$Lang::tr{'system logs'}' /></form></td>
+";
+
+if ( $wiosettings{'LOGGING'} eq 'on' ) {
+       print"<td width='10%' align='right'><form method='post' action='/cgi-bin/logs.cgi/log.dat' enctype='multipart/form-data'><input type='hidden' name='SECTION' value='wio' /><input type='submit' name='SUBMIT' value='$Lang::tr{'system logs'}' /></form></td>";
+}
+
+print"
        <td width='10%' align='right'><form method='post' action='$ENV{'SCRIPT_NAME'}' enctype='multipart/form-data'><input type='hidden' name='ACTION' value='$Lang::tr{'edit'}1' /><input type='submit' name='SUBMIT' value='$Lang::tr{'wio_edit_set'}' /></form></td>
 </tr>
 </table>
index 73702370eba55fc310c88530609441479c40654f..06b6946451e36b9d5f7f67812e23cd0486ad2775 100644 (file)
@@ -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.