/[smecontribs]/rpms/smeserver-xt_geoip/contribs9/smeserver-xt_geoip-1.0.1-bz10860-license_key.patch
ViewVC logotype

Contents of /rpms/smeserver-xt_geoip/contribs9/smeserver-xt_geoip-1.0.1-bz10860-license_key.patch

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


Revision 1.2 - (show annotations) (download)
Tue Jan 14 14:45:40 2020 UTC (4 years, 9 months ago) by michel
Branch: MAIN
CVS Tags: smeserver-xt_geoip-1_0_1-24_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, HEAD
Changes since 1.1: +20 -5 lines
* Sat Jan 11 2020 Michel Begue <mab974@gmail.com> 1.0.1-23.sme
- add license_key in config db and test in panel

1 diff -urN smeserver-xt_geoip-1.0.1.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/xt_geoip smeserver-xt_geoip-1.0.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/xt_geoip
2 --- smeserver-xt_geoip-1.0.1.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/xt_geoip 2020-01-11 09:35:29.000000000 +0400
3 +++ smeserver-xt_geoip-1.0.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/xt_geoip 2020-01-11 09:43:11.161000000 +0400
4 @@ -286,5 +286,9 @@
5 <trans>Available Services</trans>
6 </entry>
7
8 + <entry>
9 + <base>ERROR_LICENSE_KEY</base>
10 + <trans><![CDATA[ <font color="red">GEOIP license key unavailable. Downloading is <b>inactive</b></font> ]]></trans>
11 + </entry>
12
13 </lexicon>
14 diff -urN smeserver-xt_geoip-1.0.1.old/root/etc/e-smith/templates/usr/share/xt_geoip/update_base/10All smeserver-xt_geoip-1.0.1/root/etc/e-smith/templates/usr/share/xt_geoip/update_base/10All
15 --- smeserver-xt_geoip-1.0.1.old/root/etc/e-smith/templates/usr/share/xt_geoip/update_base/10All 2017-09-15 15:05:44.000000000 +0400
16 +++ smeserver-xt_geoip-1.0.1/root/etc/e-smith/templates/usr/share/xt_geoip/update_base/10All 2020-01-12 22:22:08.798000000 +0400
17 @@ -1,3 +1,5 @@
18 cd /usr/share/xt_geoip
19 -/usr/libexec/xtables-addons/xt_geoip_dl
20 -/usr/libexec/xtables-addons/xt_geoip_build GeoIPCountryWhois.csv
21 +if ( /usr/libexec/xtables-addons/xt_geoip_dl )
22 +then
23 + /usr/libexec/xtables-addons/xt_geoip_build GeoIPCountryWhois.csv
24 +fi
25 \ Pas de fin de ligne à la fin du fichier
26 diff -urN smeserver-xt_geoip-1.0.1.old/root/etc/e-smith/web/functions/xt_geoip smeserver-xt_geoip-1.0.1/root/etc/e-smith/web/functions/xt_geoip
27 --- smeserver-xt_geoip-1.0.1.old/root/etc/e-smith/web/functions/xt_geoip 2020-01-11 09:35:29.000000000 +0400
28 +++ smeserver-xt_geoip-1.0.1/root/etc/e-smith/web/functions/xt_geoip 2020-01-11 10:04:19.498000000 +0400
29 @@ -99,6 +99,13 @@
30 <label> </label>
31 </field>
32
33 + <field
34 + type="literal"
35 + id="stat_license"
36 + value="get_stat_license_key()">
37 + <label> </label>
38 + </field>
39 +
40
41 <field type="literal" id="country_list_label" value="">
42 <description>COUNTRY_LIST_DESCRIPTION</description>
43 diff -urN smeserver-xt_geoip-1.0.1.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm smeserver-xt_geoip-1.0.1/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm
44 --- smeserver-xt_geoip-1.0.1.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm 2020-01-11 09:35:29.000000000 +0400
45 +++ smeserver-xt_geoip-1.0.1/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm 2020-01-12 18:05:02.757000000 +0400
46 @@ -25,6 +25,7 @@
47 get_value
48 get_badcountries
49 get_geoip
50 + get_stat_license_key
51 get_reverse
52 print_service_table
53 get_stat_geoip
54 @@ -189,6 +190,23 @@
55 }
56 }
57
58 +=head2 get_stat_license_key
59 +
60 +method to retrieve the status of geoip license_key for the site
61 +=cut
62 +
63 +sub get_stat_license_key {
64 +
65 + my $fm = shift;
66 + if ((get_prop( 'geoip','status' ) || 'disabled') eq 'enabled' ) {
67 + if ( (get_prop( 'geoip','LicenseKey' ) || '') ne '' ) {
68 + return '';
69 + }
70 + }
71 + return $fm->localise('ERROR_LICENSE_KEY');
72 +
73 +}
74 +
75 =head2 get_date_update
76 =cut
77

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