/[smecontribs]/rpms/smeserver-xt_geoip/contribs9/smeserver-xt_geoip-1.0.1-3-messag.patch
ViewVC logotype

Contents of /rpms/smeserver-xt_geoip/contribs9/smeserver-xt_geoip-1.0.1-3-messag.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Thu Feb 7 03:46:43 2019 UTC (5 years, 9 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-xt_geoip-1_0_1-8_el6_sme, smeserver-xt_geoip-1_0_1-23_el6_sme, smeserver-xt_geoip-1_0_1-26_el6_sme, smeserver-xt_geoip-1_0_1-25_el6_sme, smeserver-xt_geoip-1_0_1-21_el6_sme, smeserver-xt_geoip-1_0_1-19_el6_sme, smeserver-xt_geoip-1_0_1-18_el6_sme, smeserver-xt_geoip-1_0_1-20_el6_sme, smeserver-xt_geoip-1_0_1-11_el6_sme, smeserver-xt_geoip-1_0_1-5_el6_sme, smeserver-xt_geoip-1_0_1-17_el6_sme, smeserver-xt_geoip-1_0_1-7_el6_sme, smeserver-xt_geoip-1_0_1-04_el6_sme, smeserver-xt_geoip-1_0_1-6_el6_sme, smeserver-xt_geoip-1_0_1-9_el6_sme, smeserver-xt_geoip-1_0_1-16_el6_sme, smeserver-xt_geoip-1_0_1-13_el6_sme, smeserver-xt_geoip-1_0_1-10_el6_sme, smeserver-xt_geoip-1_0_1-14_el6_sme, smeserver-xt_geoip-1_0_1-15_el6_sme, smeserver-xt_geoip-1_0_1-24_el6_sme, smeserver-xt_geoip-1_0_1-12_el6_sme, smeserver-xt_geoip-1_0_1-22_el6_sme, HEAD
Initial import

1 diff -urN smeserver-xt_geoip-1.0.1-2/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/xt_geoip smeserver-xt_geoip-1.0.1-3/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/xt_geoip
2 --- smeserver-xt_geoip-1.0.1-2/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/xt_geoip 2017-10-16 12:54:44.069849885 +0400
3 +++ smeserver-xt_geoip-1.0.1-3/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/xt_geoip 2017-10-16 17:43:02.602175554 +0400
4 @@ -50,13 +50,18 @@
5 </entry>
6
7 <entry>
8 + <base>ERROR_STATUS_GEOIP</base>
9 + <trans><![CDATA[ <font color="red">GEOIP filtering is <b>inactive</b></font> (iptables) ]]></trans>
10 + </entry>
11 +
12 + <entry>
13 <base>LABEL_BADCOUNTRIES_STATUS</base>
14 <trans>Current list of banished country codes : </trans>
15 </entry>
16
17 <entry>
18 - <base>ERR_COUNTRY_NOT_EXIST</base>
19 - <trans>Country code(s) does not exist on the server.</trans>
20 + <base>ERR_COUNTRY_NOT_EXIST: {$listerr}</base>
21 + <trans>Country code(s) does not exist on the server: {$listerr}</trans>
22 </entry>
23
24 <entry>
25 diff -urN smeserver-xt_geoip-1.0.1-2/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/xt_geoip smeserver-xt_geoip-1.0.1-3/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/xt_geoip
26 --- smeserver-xt_geoip-1.0.1-2/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/xt_geoip 2017-10-16 12:55:00.239673366 +0400
27 +++ smeserver-xt_geoip-1.0.1-3/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/xt_geoip 2017-10-16 17:43:39.208046829 +0400
28 @@ -14,6 +14,11 @@
29 <base>LABEL_GEOIP_STATUS</base>
30 <trans>Filtrage GEOIP actuel : </trans>
31 </entry>
32 +
33 + <entry>
34 + <base>ERROR_STATUS_GEOIP</base>
35 + <trans><![CDATA[<font color="red">Filtrage GEOIP <b>inactif </b></font> (iptables) ]]></trans>
36 + </entry>
37
38 <entry>
39 <base>LABEL_GEOIP</base>
40 @@ -50,8 +55,8 @@
41 </entry>
42
43 <entry>
44 - <base>ERR_COUNTRY_NOT_EXIST</base>
45 - <trans>Code(s) pays inexistant(s) sur le serveur.</trans>
46 + <base>ERR_COUNTRY_NOT_EXIST: {$listerr}</base>
47 + <trans>Code(s) pays inexistant(s) sur le serveur: {$listerr}</trans>
48 </entry>
49
50 <entry>
51 diff -urN smeserver-xt_geoip-1.0.1-2/root/etc/e-smith/web/functions/xt_geoip smeserver-xt_geoip-1.0.1-3/root/etc/e-smith/web/functions/xt_geoip
52 --- smeserver-xt_geoip-1.0.1-2/root/etc/e-smith/web/functions/xt_geoip 2017-09-23 20:41:21.000000000 +0400
53 +++ smeserver-xt_geoip-1.0.1-3/root/etc/e-smith/web/functions/xt_geoip 2017-10-16 19:32:32.305538075 +0400
54 @@ -91,6 +91,13 @@
55 value="get_date_update()">
56 <label>LABEL_DATE_UPDATE_STATUS</label>
57 </field>
58 +
59 + <field
60 + type="literal"
61 + id="stat_geoip"
62 + value="get_stat_geoip()">
63 + <label> </label>
64 + </field>
65
66 <subroutine src="print_button('NEXT')" />
67
68 diff -urN smeserver-xt_geoip-1.0.1-2/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm smeserver-xt_geoip-1.0.1-3/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm
69 --- smeserver-xt_geoip-1.0.1-2/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm 2017-10-16 12:52:11.329517138 +0400
70 +++ smeserver-xt_geoip-1.0.1-3/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm 2017-10-16 19:30:37.186412877 +0400
71 @@ -142,6 +142,21 @@
72 return $db->get_prop("masq", "GeoIP");
73 }
74
75 +=head2 get_stat_geoip
76 +
77 +method to retrieve the status of geoip for the form
78 +=cut
79 +
80 +sub get_stat_geoip
81 +{
82 + my $fm = shift;
83 + if ( get_geoip() == 'enabled' && system ( "/sbin/iptables -L -n | grep 'GeoIP' > /dev/null") != 0 ) {
84 + return $fm->localise('ERROR_STATUS_GEOIP');
85 + } else {
86 + return '';
87 + }
88 +}
89 +
90 =head2 get_date_update
91 =cut
92
93 @@ -201,7 +216,7 @@
94 my $file = "/usr/share/xt_geoip/LE/" . $bcs . ".iv4";
95 if (! -f $file) { $listerr .= $bcs . ","; }
96 }
97 - return 'ERR_COUNTRY_NOT_EXIST' if $listerr;
98 + return $self->localise('ERR_COUNTRY_NOT_EXIST: {$listerr}', {listerr=> "$listerr"}) if $listerr;
99 }
100 return 'OK';
101 }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed