GeoIP Detection - Version 2.5.6

Version Description

Some users reported problems with open_basedir-notices - if that's you, this update will help. Otherwise there are no changes.

Download this release

Release Info

Developer benjamin4
Plugin Icon 128x128 GeoIP Detection
Version 2.5.6
Comparing to
See all releases

Code changes from version 2.5.4 to 2.5.6

LICENSE ADDED
@@ -0,0 +1,675 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for
11
+ software and other kinds of works.
12
+
13
+ The licenses for most software and other practical works are designed
14
+ to take away your freedom to share and change the works. By contrast,
15
+ the GNU General Public License is intended to guarantee your freedom to
16
+ share and change all versions of a program--to make sure it remains free
17
+ software for all its users. We, the Free Software Foundation, use the
18
+ GNU General Public License for most of our software; it applies also to
19
+ any other work released this way by its authors. You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ them if you wish), that you receive source code or can get it if you
26
+ want it, that you can change the software or use pieces of it in new
27
+ free programs, and that you know you can do these things.
28
+
29
+ To protect your rights, we need to prevent others from denying you
30
+ these rights or asking you to surrender the rights. Therefore, you have
31
+ certain responsibilities if you distribute copies of the software, or if
32
+ you modify it: responsibilities to respect the freedom of others.
33
+
34
+ For example, if you distribute copies of such a program, whether
35
+ gratis or for a fee, you must pass on to the recipients the same
36
+ freedoms that you received. You must make sure that they, too, receive
37
+ or can get the source code. And you must show them these terms so they
38
+ know their rights.
39
+
40
+ Developers that use the GNU GPL protect your rights with two steps:
41
+ (1) assert copyright on the software, and (2) offer you this License
42
+ giving you legal permission to copy, distribute and/or modify it.
43
+
44
+ For the developers' and authors' protection, the GPL clearly explains
45
+ that there is no warranty for this free software. For both users' and
46
+ authors' sake, the GPL requires that modified versions be marked as
47
+ changed, so that their problems will not be attributed erroneously to
48
+ authors of previous versions.
49
+
50
+ Some devices are designed to deny users access to install or run
51
+ modified versions of the software inside them, although the manufacturer
52
+ can do so. This is fundamentally incompatible with the aim of
53
+ protecting users' freedom to change the software. The systematic
54
+ pattern of such abuse occurs in the area of products for individuals to
55
+ use, which is precisely where it is most unacceptable. Therefore, we
56
+ have designed this version of the GPL to prohibit the practice for those
57
+ products. If such problems arise substantially in other domains, we
58
+ stand ready to extend this provision to those domains in future versions
59
+ of the GPL, as needed to protect the freedom of users.
60
+
61
+ Finally, every program is threatened constantly by software patents.
62
+ States should not allow patents to restrict development and use of
63
+ software on general-purpose computers, but in those that do, we wish to
64
+ avoid the special danger that patents applied to a free program could
65
+ make it effectively proprietary. To prevent this, the GPL assures that
66
+ patents cannot be used to render the program non-free.
67
+
68
+ The precise terms and conditions for copying, distribution and
69
+ modification follow.
70
+
71
+ TERMS AND CONDITIONS
72
+
73
+ 0. Definitions.
74
+
75
+ "This License" refers to version 3 of the GNU General Public License.
76
+
77
+ "Copyright" also means copyright-like laws that apply to other kinds of
78
+ works, such as semiconductor masks.
79
+
80
+ "The Program" refers to any copyrightable work licensed under this
81
+ License. Each licensee is addressed as "you". "Licensees" and
82
+ "recipients" may be individuals or organizations.
83
+
84
+ To "modify" a work means to copy from or adapt all or part of the work
85
+ in a fashion requiring copyright permission, other than the making of an
86
+ exact copy. The resulting work is called a "modified version" of the
87
+ earlier work or a work "based on" the earlier work.
88
+
89
+ A "covered work" means either the unmodified Program or a work based
90
+ on the Program.
91
+
92
+ To "propagate" a work means to do anything with it that, without
93
+ permission, would make you directly or secondarily liable for
94
+ infringement under applicable copyright law, except executing it on a
95
+ computer or modifying a private copy. Propagation includes copying,
96
+ distribution (with or without modification), making available to the
97
+ public, and in some countries other activities as well.
98
+
99
+ To "convey" a work means any kind of propagation that enables other
100
+ parties to make or receive copies. Mere interaction with a user through
101
+ a computer network, with no transfer of a copy, is not conveying.
102
+
103
+ An interactive user interface displays "Appropriate Legal Notices"
104
+ to the extent that it includes a convenient and prominently visible
105
+ feature that (1) displays an appropriate copyright notice, and (2)
106
+ tells the user that there is no warranty for the work (except to the
107
+ extent that warranties are provided), that licensees may convey the
108
+ work under this License, and how to view a copy of this License. If
109
+ the interface presents a list of user commands or options, such as a
110
+ menu, a prominent item in the list meets this criterion.
111
+
112
+ 1. Source Code.
113
+
114
+ The "source code" for a work means the preferred form of the work
115
+ for making modifications to it. "Object code" means any non-source
116
+ form of a work.
117
+
118
+ A "Standard Interface" means an interface that either is an official
119
+ standard defined by a recognized standards body, or, in the case of
120
+ interfaces specified for a particular programming language, one that
121
+ is widely used among developers working in that language.
122
+
123
+ The "System Libraries" of an executable work include anything, other
124
+ than the work as a whole, that (a) is included in the normal form of
125
+ packaging a Major Component, but which is not part of that Major
126
+ Component, and (b) serves only to enable use of the work with that
127
+ Major Component, or to implement a Standard Interface for which an
128
+ implementation is available to the public in source code form. A
129
+ "Major Component", in this context, means a major essential component
130
+ (kernel, window system, and so on) of the specific operating system
131
+ (if any) on which the executable work runs, or a compiler used to
132
+ produce the work, or an object code interpreter used to run it.
133
+
134
+ The "Corresponding Source" for a work in object code form means all
135
+ the source code needed to generate, install, and (for an executable
136
+ work) run the object code and to modify the work, including scripts to
137
+ control those activities. However, it does not include the work's
138
+ System Libraries, or general-purpose tools or generally available free
139
+ programs which are used unmodified in performing those activities but
140
+ which are not part of the work. For example, Corresponding Source
141
+ includes interface definition files associated with source files for
142
+ the work, and the source code for shared libraries and dynamically
143
+ linked subprograms that the work is specifically designed to require,
144
+ such as by intimate data communication or control flow between those
145
+ subprograms and other parts of the work.
146
+
147
+ The Corresponding Source need not include anything that users
148
+ can regenerate automatically from other parts of the Corresponding
149
+ Source.
150
+
151
+ The Corresponding Source for a work in source code form is that
152
+ same work.
153
+
154
+ 2. Basic Permissions.
155
+
156
+ All rights granted under this License are granted for the term of
157
+ copyright on the Program, and are irrevocable provided the stated
158
+ conditions are met. This License explicitly affirms your unlimited
159
+ permission to run the unmodified Program. The output from running a
160
+ covered work is covered by this License only if the output, given its
161
+ content, constitutes a covered work. This License acknowledges your
162
+ rights of fair use or other equivalent, as provided by copyright law.
163
+
164
+ You may make, run and propagate covered works that you do not
165
+ convey, without conditions so long as your license otherwise remains
166
+ in force. You may convey covered works to others for the sole purpose
167
+ of having them make modifications exclusively for you, or provide you
168
+ with facilities for running those works, provided that you comply with
169
+ the terms of this License in conveying all material for which you do
170
+ not control copyright. Those thus making or running the covered works
171
+ for you must do so exclusively on your behalf, under your direction
172
+ and control, on terms that prohibit them from making any copies of
173
+ your copyrighted material outside their relationship with you.
174
+
175
+ Conveying under any other circumstances is permitted solely under
176
+ the conditions stated below. Sublicensing is not allowed; section 10
177
+ makes it unnecessary.
178
+
179
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
+
181
+ No covered work shall be deemed part of an effective technological
182
+ measure under any applicable law fulfilling obligations under article
183
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
+ similar laws prohibiting or restricting circumvention of such
185
+ measures.
186
+
187
+ When you convey a covered work, you waive any legal power to forbid
188
+ circumvention of technological measures to the extent such circumvention
189
+ is effected by exercising rights under this License with respect to
190
+ the covered work, and you disclaim any intention to limit operation or
191
+ modification of the work as a means of enforcing, against the work's
192
+ users, your or third parties' legal rights to forbid circumvention of
193
+ technological measures.
194
+
195
+ 4. Conveying Verbatim Copies.
196
+
197
+ You may convey verbatim copies of the Program's source code as you
198
+ receive it, in any medium, provided that you conspicuously and
199
+ appropriately publish on each copy an appropriate copyright notice;
200
+ keep intact all notices stating that this License and any
201
+ non-permissive terms added in accord with section 7 apply to the code;
202
+ keep intact all notices of the absence of any warranty; and give all
203
+ recipients a copy of this License along with the Program.
204
+
205
+ You may charge any price or no price for each copy that you convey,
206
+ and you may offer support or warranty protection for a fee.
207
+
208
+ 5. Conveying Modified Source Versions.
209
+
210
+ You may convey a work based on the Program, or the modifications to
211
+ produce it from the Program, in the form of source code under the
212
+ terms of section 4, provided that you also meet all of these conditions:
213
+
214
+ a) The work must carry prominent notices stating that you modified
215
+ it, and giving a relevant date.
216
+
217
+ b) The work must carry prominent notices stating that it is
218
+ released under this License and any conditions added under section
219
+ 7. This requirement modifies the requirement in section 4 to
220
+ "keep intact all notices".
221
+
222
+ c) You must license the entire work, as a whole, under this
223
+ License to anyone who comes into possession of a copy. This
224
+ License will therefore apply, along with any applicable section 7
225
+ additional terms, to the whole of the work, and all its parts,
226
+ regardless of how they are packaged. This License gives no
227
+ permission to license the work in any other way, but it does not
228
+ invalidate such permission if you have separately received it.
229
+
230
+ d) If the work has interactive user interfaces, each must display
231
+ Appropriate Legal Notices; however, if the Program has interactive
232
+ interfaces that do not display Appropriate Legal Notices, your
233
+ work need not make them do so.
234
+
235
+ A compilation of a covered work with other separate and independent
236
+ works, which are not by their nature extensions of the covered work,
237
+ and which are not combined with it such as to form a larger program,
238
+ in or on a volume of a storage or distribution medium, is called an
239
+ "aggregate" if the compilation and its resulting copyright are not
240
+ used to limit the access or legal rights of the compilation's users
241
+ beyond what the individual works permit. Inclusion of a covered work
242
+ in an aggregate does not cause this License to apply to the other
243
+ parts of the aggregate.
244
+
245
+ 6. Conveying Non-Source Forms.
246
+
247
+ You may convey a covered work in object code form under the terms
248
+ of sections 4 and 5, provided that you also convey the
249
+ machine-readable Corresponding Source under the terms of this License,
250
+ in one of these ways:
251
+
252
+ a) Convey the object code in, or embodied in, a physical product
253
+ (including a physical distribution medium), accompanied by the
254
+ Corresponding Source fixed on a durable physical medium
255
+ customarily used for software interchange.
256
+
257
+ b) Convey the object code in, or embodied in, a physical product
258
+ (including a physical distribution medium), accompanied by a
259
+ written offer, valid for at least three years and valid for as
260
+ long as you offer spare parts or customer support for that product
261
+ model, to give anyone who possesses the object code either (1) a
262
+ copy of the Corresponding Source for all the software in the
263
+ product that is covered by this License, on a durable physical
264
+ medium customarily used for software interchange, for a price no
265
+ more than your reasonable cost of physically performing this
266
+ conveying of source, or (2) access to copy the
267
+ Corresponding Source from a network server at no charge.
268
+
269
+ c) Convey individual copies of the object code with a copy of the
270
+ written offer to provide the Corresponding Source. This
271
+ alternative is allowed only occasionally and noncommercially, and
272
+ only if you received the object code with such an offer, in accord
273
+ with subsection 6b.
274
+
275
+ d) Convey the object code by offering access from a designated
276
+ place (gratis or for a charge), and offer equivalent access to the
277
+ Corresponding Source in the same way through the same place at no
278
+ further charge. You need not require recipients to copy the
279
+ Corresponding Source along with the object code. If the place to
280
+ copy the object code is a network server, the Corresponding Source
281
+ may be on a different server (operated by you or a third party)
282
+ that supports equivalent copying facilities, provided you maintain
283
+ clear directions next to the object code saying where to find the
284
+ Corresponding Source. Regardless of what server hosts the
285
+ Corresponding Source, you remain obligated to ensure that it is
286
+ available for as long as needed to satisfy these requirements.
287
+
288
+ e) Convey the object code using peer-to-peer transmission, provided
289
+ you inform other peers where the object code and Corresponding
290
+ Source of the work are being offered to the general public at no
291
+ charge under subsection 6d.
292
+
293
+ A separable portion of the object code, whose source code is excluded
294
+ from the Corresponding Source as a System Library, need not be
295
+ included in conveying the object code work.
296
+
297
+ A "User Product" is either (1) a "consumer product", which means any
298
+ tangible personal property which is normally used for personal, family,
299
+ or household purposes, or (2) anything designed or sold for incorporation
300
+ into a dwelling. In determining whether a product is a consumer product,
301
+ doubtful cases shall be resolved in favor of coverage. For a particular
302
+ product received by a particular user, "normally used" refers to a
303
+ typical or common use of that class of product, regardless of the status
304
+ of the particular user or of the way in which the particular user
305
+ actually uses, or expects or is expected to use, the product. A product
306
+ is a consumer product regardless of whether the product has substantial
307
+ commercial, industrial or non-consumer uses, unless such uses represent
308
+ the only significant mode of use of the product.
309
+
310
+ "Installation Information" for a User Product means any methods,
311
+ procedures, authorization keys, or other information required to install
312
+ and execute modified versions of a covered work in that User Product from
313
+ a modified version of its Corresponding Source. The information must
314
+ suffice to ensure that the continued functioning of the modified object
315
+ code is in no case prevented or interfered with solely because
316
+ modification has been made.
317
+
318
+ If you convey an object code work under this section in, or with, or
319
+ specifically for use in, a User Product, and the conveying occurs as
320
+ part of a transaction in which the right of possession and use of the
321
+ User Product is transferred to the recipient in perpetuity or for a
322
+ fixed term (regardless of how the transaction is characterized), the
323
+ Corresponding Source conveyed under this section must be accompanied
324
+ by the Installation Information. But this requirement does not apply
325
+ if neither you nor any third party retains the ability to install
326
+ modified object code on the User Product (for example, the work has
327
+ been installed in ROM).
328
+
329
+ The requirement to provide Installation Information does not include a
330
+ requirement to continue to provide support service, warranty, or updates
331
+ for a work that has been modified or installed by the recipient, or for
332
+ the User Product in which it has been modified or installed. Access to a
333
+ network may be denied when the modification itself materially and
334
+ adversely affects the operation of the network or violates the rules and
335
+ protocols for communication across the network.
336
+
337
+ Corresponding Source conveyed, and Installation Information provided,
338
+ in accord with this section must be in a format that is publicly
339
+ documented (and with an implementation available to the public in
340
+ source code form), and must require no special password or key for
341
+ unpacking, reading or copying.
342
+
343
+ 7. Additional Terms.
344
+
345
+ "Additional permissions" are terms that supplement the terms of this
346
+ License by making exceptions from one or more of its conditions.
347
+ Additional permissions that are applicable to the entire Program shall
348
+ be treated as though they were included in this License, to the extent
349
+ that they are valid under applicable law. If additional permissions
350
+ apply only to part of the Program, that part may be used separately
351
+ under those permissions, but the entire Program remains governed by
352
+ this License without regard to the additional permissions.
353
+
354
+ When you convey a copy of a covered work, you may at your option
355
+ remove any additional permissions from that copy, or from any part of
356
+ it. (Additional permissions may be written to require their own
357
+ removal in certain cases when you modify the work.) You may place
358
+ additional permissions on material, added by you to a covered work,
359
+ for which you have or can give appropriate copyright permission.
360
+
361
+ Notwithstanding any other provision of this License, for material you
362
+ add to a covered work, you may (if authorized by the copyright holders of
363
+ that material) supplement the terms of this License with terms:
364
+
365
+ a) Disclaiming warranty or limiting liability differently from the
366
+ terms of sections 15 and 16 of this License; or
367
+
368
+ b) Requiring preservation of specified reasonable legal notices or
369
+ author attributions in that material or in the Appropriate Legal
370
+ Notices displayed by works containing it; or
371
+
372
+ c) Prohibiting misrepresentation of the origin of that material, or
373
+ requiring that modified versions of such material be marked in
374
+ reasonable ways as different from the original version; or
375
+
376
+ d) Limiting the use for publicity purposes of names of licensors or
377
+ authors of the material; or
378
+
379
+ e) Declining to grant rights under trademark law for use of some
380
+ trade names, trademarks, or service marks; or
381
+
382
+ f) Requiring indemnification of licensors and authors of that
383
+ material by anyone who conveys the material (or modified versions of
384
+ it) with contractual assumptions of liability to the recipient, for
385
+ any liability that these contractual assumptions directly impose on
386
+ those licensors and authors.
387
+
388
+ All other non-permissive additional terms are considered "further
389
+ restrictions" within the meaning of section 10. If the Program as you
390
+ received it, or any part of it, contains a notice stating that it is
391
+ governed by this License along with a term that is a further
392
+ restriction, you may remove that term. If a license document contains
393
+ a further restriction but permits relicensing or conveying under this
394
+ License, you may add to a covered work material governed by the terms
395
+ of that license document, provided that the further restriction does
396
+ not survive such relicensing or conveying.
397
+
398
+ If you add terms to a covered work in accord with this section, you
399
+ must place, in the relevant source files, a statement of the
400
+ additional terms that apply to those files, or a notice indicating
401
+ where to find the applicable terms.
402
+
403
+ Additional terms, permissive or non-permissive, may be stated in the
404
+ form of a separately written license, or stated as exceptions;
405
+ the above requirements apply either way.
406
+
407
+ 8. Termination.
408
+
409
+ You may not propagate or modify a covered work except as expressly
410
+ provided under this License. Any attempt otherwise to propagate or
411
+ modify it is void, and will automatically terminate your rights under
412
+ this License (including any patent licenses granted under the third
413
+ paragraph of section 11).
414
+
415
+ However, if you cease all violation of this License, then your
416
+ license from a particular copyright holder is reinstated (a)
417
+ provisionally, unless and until the copyright holder explicitly and
418
+ finally terminates your license, and (b) permanently, if the copyright
419
+ holder fails to notify you of the violation by some reasonable means
420
+ prior to 60 days after the cessation.
421
+
422
+ Moreover, your license from a particular copyright holder is
423
+ reinstated permanently if the copyright holder notifies you of the
424
+ violation by some reasonable means, this is the first time you have
425
+ received notice of violation of this License (for any work) from that
426
+ copyright holder, and you cure the violation prior to 30 days after
427
+ your receipt of the notice.
428
+
429
+ Termination of your rights under this section does not terminate the
430
+ licenses of parties who have received copies or rights from you under
431
+ this License. If your rights have been terminated and not permanently
432
+ reinstated, you do not qualify to receive new licenses for the same
433
+ material under section 10.
434
+
435
+ 9. Acceptance Not Required for Having Copies.
436
+
437
+ You are not required to accept this License in order to receive or
438
+ run a copy of the Program. Ancillary propagation of a covered work
439
+ occurring solely as a consequence of using peer-to-peer transmission
440
+ to receive a copy likewise does not require acceptance. However,
441
+ nothing other than this License grants you permission to propagate or
442
+ modify any covered work. These actions infringe copyright if you do
443
+ not accept this License. Therefore, by modifying or propagating a
444
+ covered work, you indicate your acceptance of this License to do so.
445
+
446
+ 10. Automatic Licensing of Downstream Recipients.
447
+
448
+ Each time you convey a covered work, the recipient automatically
449
+ receives a license from the original licensors, to run, modify and
450
+ propagate that work, subject to this License. You are not responsible
451
+ for enforcing compliance by third parties with this License.
452
+
453
+ An "entity transaction" is a transaction transferring control of an
454
+ organization, or substantially all assets of one, or subdividing an
455
+ organization, or merging organizations. If propagation of a covered
456
+ work results from an entity transaction, each party to that
457
+ transaction who receives a copy of the work also receives whatever
458
+ licenses to the work the party's predecessor in interest had or could
459
+ give under the previous paragraph, plus a right to possession of the
460
+ Corresponding Source of the work from the predecessor in interest, if
461
+ the predecessor has it or can get it with reasonable efforts.
462
+
463
+ You may not impose any further restrictions on the exercise of the
464
+ rights granted or affirmed under this License. For example, you may
465
+ not impose a license fee, royalty, or other charge for exercise of
466
+ rights granted under this License, and you may not initiate litigation
467
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
468
+ any patent claim is infringed by making, using, selling, offering for
469
+ sale, or importing the Program or any portion of it.
470
+
471
+ 11. Patents.
472
+
473
+ A "contributor" is a copyright holder who authorizes use under this
474
+ License of the Program or a work on which the Program is based. The
475
+ work thus licensed is called the contributor's "contributor version".
476
+
477
+ A contributor's "essential patent claims" are all patent claims
478
+ owned or controlled by the contributor, whether already acquired or
479
+ hereafter acquired, that would be infringed by some manner, permitted
480
+ by this License, of making, using, or selling its contributor version,
481
+ but do not include claims that would be infringed only as a
482
+ consequence of further modification of the contributor version. For
483
+ purposes of this definition, "control" includes the right to grant
484
+ patent sublicenses in a manner consistent with the requirements of
485
+ this License.
486
+
487
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
488
+ patent license under the contributor's essential patent claims, to
489
+ make, use, sell, offer for sale, import and otherwise run, modify and
490
+ propagate the contents of its contributor version.
491
+
492
+ In the following three paragraphs, a "patent license" is any express
493
+ agreement or commitment, however denominated, not to enforce a patent
494
+ (such as an express permission to practice a patent or covenant not to
495
+ sue for patent infringement). To "grant" such a patent license to a
496
+ party means to make such an agreement or commitment not to enforce a
497
+ patent against the party.
498
+
499
+ If you convey a covered work, knowingly relying on a patent license,
500
+ and the Corresponding Source of the work is not available for anyone
501
+ to copy, free of charge and under the terms of this License, through a
502
+ publicly available network server or other readily accessible means,
503
+ then you must either (1) cause the Corresponding Source to be so
504
+ available, or (2) arrange to deprive yourself of the benefit of the
505
+ patent license for this particular work, or (3) arrange, in a manner
506
+ consistent with the requirements of this License, to extend the patent
507
+ license to downstream recipients. "Knowingly relying" means you have
508
+ actual knowledge that, but for the patent license, your conveying the
509
+ covered work in a country, or your recipient's use of the covered work
510
+ in a country, would infringe one or more identifiable patents in that
511
+ country that you have reason to believe are valid.
512
+
513
+ If, pursuant to or in connection with a single transaction or
514
+ arrangement, you convey, or propagate by procuring conveyance of, a
515
+ covered work, and grant a patent license to some of the parties
516
+ receiving the covered work authorizing them to use, propagate, modify
517
+ or convey a specific copy of the covered work, then the patent license
518
+ you grant is automatically extended to all recipients of the covered
519
+ work and works based on it.
520
+
521
+ A patent license is "discriminatory" if it does not include within
522
+ the scope of its coverage, prohibits the exercise of, or is
523
+ conditioned on the non-exercise of one or more of the rights that are
524
+ specifically granted under this License. You may not convey a covered
525
+ work if you are a party to an arrangement with a third party that is
526
+ in the business of distributing software, under which you make payment
527
+ to the third party based on the extent of your activity of conveying
528
+ the work, and under which the third party grants, to any of the
529
+ parties who would receive the covered work from you, a discriminatory
530
+ patent license (a) in connection with copies of the covered work
531
+ conveyed by you (or copies made from those copies), or (b) primarily
532
+ for and in connection with specific products or compilations that
533
+ contain the covered work, unless you entered into that arrangement,
534
+ or that patent license was granted, prior to 28 March 2007.
535
+
536
+ Nothing in this License shall be construed as excluding or limiting
537
+ any implied license or other defenses to infringement that may
538
+ otherwise be available to you under applicable patent law.
539
+
540
+ 12. No Surrender of Others' Freedom.
541
+
542
+ If conditions are imposed on you (whether by court order, agreement or
543
+ otherwise) that contradict the conditions of this License, they do not
544
+ excuse you from the conditions of this License. If you cannot convey a
545
+ covered work so as to satisfy simultaneously your obligations under this
546
+ License and any other pertinent obligations, then as a consequence you may
547
+ not convey it at all. For example, if you agree to terms that obligate you
548
+ to collect a royalty for further conveying from those to whom you convey
549
+ the Program, the only way you could satisfy both those terms and this
550
+ License would be to refrain entirely from conveying the Program.
551
+
552
+ 13. Use with the GNU Affero General Public License.
553
+
554
+ Notwithstanding any other provision of this License, you have
555
+ permission to link or combine any covered work with a work licensed
556
+ under version 3 of the GNU Affero General Public License into a single
557
+ combined work, and to convey the resulting work. The terms of this
558
+ License will continue to apply to the part which is the covered work,
559
+ but the special requirements of the GNU Affero General Public License,
560
+ section 13, concerning interaction through a network will apply to the
561
+ combination as such.
562
+
563
+ 14. Revised Versions of this License.
564
+
565
+ The Free Software Foundation may publish revised and/or new versions of
566
+ the GNU General Public License from time to time. Such new versions will
567
+ be similar in spirit to the present version, but may differ in detail to
568
+ address new problems or concerns.
569
+
570
+ Each version is given a distinguishing version number. If the
571
+ Program specifies that a certain numbered version of the GNU General
572
+ Public License "or any later version" applies to it, you have the
573
+ option of following the terms and conditions either of that numbered
574
+ version or of any later version published by the Free Software
575
+ Foundation. If the Program does not specify a version number of the
576
+ GNU General Public License, you may choose any version ever published
577
+ by the Free Software Foundation.
578
+
579
+ If the Program specifies that a proxy can decide which future
580
+ versions of the GNU General Public License can be used, that proxy's
581
+ public statement of acceptance of a version permanently authorizes you
582
+ to choose that version for the Program.
583
+
584
+ Later license versions may give you additional or different
585
+ permissions. However, no additional obligations are imposed on any
586
+ author or copyright holder as a result of your choosing to follow a
587
+ later version.
588
+
589
+ 15. Disclaimer of Warranty.
590
+
591
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
+
600
+ 16. Limitation of Liability.
601
+
602
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
+ SUCH DAMAGES.
611
+
612
+ 17. Interpretation of Sections 15 and 16.
613
+
614
+ If the disclaimer of warranty and limitation of liability provided
615
+ above cannot be given local legal effect according to their terms,
616
+ reviewing courts shall apply local law that most closely approximates
617
+ an absolute waiver of all civil liability in connection with the
618
+ Program, unless a warranty or assumption of liability accompanies a
619
+ copy of the Program in return for a fee.
620
+
621
+ END OF TERMS AND CONDITIONS
622
+
623
+ How to Apply These Terms to Your New Programs
624
+
625
+ If you develop a new program, and you want it to be of the greatest
626
+ possible use to the public, the best way to achieve this is to make it
627
+ free software which everyone can redistribute and change under these terms.
628
+
629
+ To do so, attach the following notices to the program. It is safest
630
+ to attach them to the start of each source file to most effectively
631
+ state the exclusion of warranty; and each file should have at least
632
+ the "copyright" line and a pointer to where the full notice is found.
633
+
634
+ <one line to give the program's name and a brief idea of what it does.>
635
+ Copyright (C) <year> <name of author>
636
+
637
+ This program is free software: you can redistribute it and/or modify
638
+ it under the terms of the GNU General Public License as published by
639
+ the Free Software Foundation, either version 3 of the License, or
640
+ (at your option) any later version.
641
+
642
+ This program is distributed in the hope that it will be useful,
643
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
644
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
+ GNU General Public License for more details.
646
+
647
+ You should have received a copy of the GNU General Public License
648
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
649
+
650
+ Also add information on how to contact you by electronic and paper mail.
651
+
652
+ If the program does terminal interaction, make it output a short
653
+ notice like this when it starts in an interactive mode:
654
+
655
+ <program> Copyright (C) <year> <name of author>
656
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
+ This is free software, and you are welcome to redistribute it
658
+ under certain conditions; type `show c' for details.
659
+
660
+ The hypothetical commands `show w' and `show c' should show the appropriate
661
+ parts of the General Public License. Of course, your program's commands
662
+ might be different; for a GUI interface, you would use an "about box".
663
+
664
+ You should also get your employer (if you work as a programmer) or school,
665
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
666
+ For more information on this, and how to apply and follow the GNU GPL, see
667
+ <http://www.gnu.org/licenses/>.
668
+
669
+ The GNU General Public License does not permit incorporating your program
670
+ into proprietary programs. If your program is a subroutine library, you
671
+ may consider it more useful to permit linking proprietary applications with
672
+ the library. If this is what you want to do, use the GNU Lesser General
673
+ Public License instead of this License. But first, please read
674
+ <http://www.gnu.org/philosophy/why-not-lgpl.html>.
675
+
api.php CHANGED
@@ -150,6 +150,8 @@ function geoip_detect2_get_client_ip() {
150
  if (isset($_SERVER['REMOTE_ADDR']))
151
  $ip = $_SERVER['REMOTE_ADDR'];
152
 
 
 
153
  if (get_option('geoip-detect-has_reverse_proxy', 0) && isset($_SERVER["HTTP_X_FORWARDED_FOR"]))
154
  {
155
  $ip_list = explode(',', @$_SERVER["HTTP_X_FORWARDED_FOR"]);
@@ -168,7 +170,6 @@ function geoip_detect2_get_client_ip() {
168
  $ip_list[] = $ip;
169
 
170
  $ip_list = array_diff($ip_list, $trusted_proxies);
171
-
172
  }
173
 
174
  // Each Proxy server append their information at the end, so the last IP is most trustworthy.
@@ -178,7 +179,7 @@ function geoip_detect2_get_client_ip() {
178
  if (!$ip)
179
  $ip = '::1'; // By default, use localhost
180
 
181
- $ip = apply_filters('geoip2_detect2_client_ip', $ip);
182
 
183
  return $ip;
184
  }
150
  if (isset($_SERVER['REMOTE_ADDR']))
151
  $ip = $_SERVER['REMOTE_ADDR'];
152
 
153
+ $ip_list = array($ip);
154
+
155
  if (get_option('geoip-detect-has_reverse_proxy', 0) && isset($_SERVER["HTTP_X_FORWARDED_FOR"]))
156
  {
157
  $ip_list = explode(',', @$_SERVER["HTTP_X_FORWARDED_FOR"]);
170
  $ip_list[] = $ip;
171
 
172
  $ip_list = array_diff($ip_list, $trusted_proxies);
 
173
  }
174
 
175
  // Each Proxy server append their information at the end, so the last IP is most trustworthy.
179
  if (!$ip)
180
  $ip = '::1'; // By default, use localhost
181
 
182
+ $ip = apply_filters('geoip2_detect2_client_ip', $ip, $ip_list);
183
 
184
  return $ip;
185
  }
composer.lock CHANGED
@@ -5,6 +5,7 @@
5
  "This file is @generated automatically"
6
  ],
7
  "hash": "b16c677dc7d93ad68e6bb2d8e2e96d0c",
 
8
  "packages": [
9
  {
10
  "name": "geoip2/geoip2",
@@ -58,16 +59,16 @@
58
  },
59
  {
60
  "name": "maxmind-db/reader",
61
- "version": "v1.0.3",
62
  "source": {
63
  "type": "git",
64
  "url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
65
- "reference": "07f211ab596ba60f9663d9984b888f76ee1beac9"
66
  },
67
  "dist": {
68
  "type": "zip",
69
- "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/07f211ab596ba60f9663d9984b888f76ee1beac9",
70
- "reference": "07f211ab596ba60f9663d9984b888f76ee1beac9",
71
  "shasum": ""
72
  },
73
  "require": {
@@ -75,7 +76,8 @@
75
  },
76
  "require-dev": {
77
  "phpunit/phpunit": "4.2.*",
78
- "satooshi/php-coveralls": "dev-master"
 
79
  },
80
  "type": "library",
81
  "autoload": {
@@ -103,7 +105,7 @@
103
  "geolocation",
104
  "maxmind"
105
  ],
106
- "time": "2015-03-13 22:35:13"
107
  },
108
  {
109
  "name": "maxmind/web-service-common",
5
  "This file is @generated automatically"
6
  ],
7
  "hash": "b16c677dc7d93ad68e6bb2d8e2e96d0c",
8
+ "content-hash": "223d46e82bc16a7c0d33786966031412",
9
  "packages": [
10
  {
11
  "name": "geoip2/geoip2",
59
  },
60
  {
61
  "name": "maxmind-db/reader",
62
+ "version": "v1.1.0",
63
  "source": {
64
  "type": "git",
65
  "url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
66
+ "reference": "1383655533aa2f13a990b27b075fdde8b7bdd5ff"
67
  },
68
  "dist": {
69
  "type": "zip",
70
+ "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/1383655533aa2f13a990b27b075fdde8b7bdd5ff",
71
+ "reference": "1383655533aa2f13a990b27b075fdde8b7bdd5ff",
72
  "shasum": ""
73
  },
74
  "require": {
76
  },
77
  "require-dev": {
78
  "phpunit/phpunit": "4.2.*",
79
+ "satooshi/php-coveralls": "dev-master",
80
+ "squizlabs/php_codesniffer": "2.*"
81
  },
82
  "type": "library",
83
  "autoload": {
105
  "geolocation",
106
  "maxmind"
107
  ],
108
+ "time": "2016-01-04 15:38:11"
109
  },
110
  {
111
  "name": "maxmind/web-service-common",
geoip-detect.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.yellowtree.de
5
  Description: Retrieving Geo-Information using the Maxmind GeoIP (Lite) Database.
6
  Author: Yellow Tree (Benjamin Pick)
7
  Author URI: http://www.yellowtree.de
8
- Version: 2.5.4
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
  Text Domain: geoip-detect
@@ -16,7 +16,7 @@ Requires WP: 3.5
16
  Requires PHP: 5.3.1
17
  */
18
 
19
- define('GEOIP_DETECT_VERSION', '2.5.4');
20
 
21
  /*
22
  Copyright 2013-2015 Yellow Tree, Siegen, Germany
5
  Description: Retrieving Geo-Information using the Maxmind GeoIP (Lite) Database.
6
  Author: Yellow Tree (Benjamin Pick)
7
  Author URI: http://www.yellowtree.de
8
+ Version: 2.5.6
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
  Text Domain: geoip-detect
16
  Requires PHP: 5.3.1
17
  */
18
 
19
+ define('GEOIP_DETECT_VERSION', '2.5.6');
20
 
21
  /*
22
  Copyright 2013-2015 Yellow Tree, Siegen, Germany
init.php CHANGED
@@ -14,6 +14,11 @@ function geoip_detect_defines() {
14
  add_action('plugins_loaded', 'geoip_detect_defines');
15
 
16
 
 
 
 
 
 
17
 
18
 
19
  function geoip_detect_enqueue_admin_notices() {
@@ -38,12 +43,12 @@ add_action('admin_init', 'geoip_detect_enqueue_admin_notices');
38
 
39
  function geoip_detect_admin_notice_database_missing() {
40
  $ignored_notices = (array) get_user_meta(get_current_user_id(), 'geoip_detect_dismissed_notices', true);
41
- if (in_array('hostinfo_used', $ignored_notices))
42
  return;
43
 
44
  $url = '<a href="tools.php?page=' . GEOIP_PLUGIN_BASENAME . '">GeoIP Detection</a>';
45
  ?>
46
- <div class="error">
47
  <p style="float: right">
48
  <a href="tools.php?page=<?php echo GEOIP_PLUGIN_BASENAME ?>&geoip_detect_dismiss_notice=hostinfo_used"><?php _e('Dismiss notice', 'geoip-detect'); ?></a>
49
 
@@ -59,7 +64,7 @@ function geoip_detect_admin_notice_database_missing() {
59
  <input type="hidden" name="source" value="auto" />
60
  <input type="hidden" name="action" value="update" />
61
  <p>
62
- <input type="submit" value="Install now" class="button button-primary" /> &nbsp;&nbsp;
63
  <a href="?geoip_detect_dismiss_notice=hostinfo_used"><?php _e('Keep using hostip.info', 'geoip-detect'); ?></a>
64
  </p>
65
  </form>
14
  add_action('plugins_loaded', 'geoip_detect_defines');
15
 
16
 
17
+ // Load Locales
18
+ function geoip_detect_load_textdomain() {
19
+ load_plugin_textdomain( 'geoip-detect', false, GEOIP_PLUGIN_DIR . '/languages' );
20
+ }
21
+ add_action( 'plugins_loaded', 'geoip_detect_load_textdomain' );
22
 
23
 
24
  function geoip_detect_enqueue_admin_notices() {
43
 
44
  function geoip_detect_admin_notice_database_missing() {
45
  $ignored_notices = (array) get_user_meta(get_current_user_id(), 'geoip_detect_dismissed_notices', true);
46
+ if (in_array('hostinfo_used', $ignored_notices) || !current_user_can('manage_options'))
47
  return;
48
 
49
  $url = '<a href="tools.php?page=' . GEOIP_PLUGIN_BASENAME . '">GeoIP Detection</a>';
50
  ?>
51
+ <div class="error notice is-dismissible">
52
  <p style="float: right">
53
  <a href="tools.php?page=<?php echo GEOIP_PLUGIN_BASENAME ?>&geoip_detect_dismiss_notice=hostinfo_used"><?php _e('Dismiss notice', 'geoip-detect'); ?></a>
54
 
64
  <input type="hidden" name="source" value="auto" />
65
  <input type="hidden" name="action" value="update" />
66
  <p>
67
+ <input type="submit" value="<?php esc_attr_e('Install now', 'geoip-detect');?>" class="button button-primary" /> &nbsp;&nbsp;
68
  <a href="?geoip_detect_dismiss_notice=hostinfo_used"><?php _e('Keep using hostip.info', 'geoip-detect'); ?></a>
69
  </p>
70
  </form>
languages/messages.pot CHANGED
@@ -1,114 +1,371 @@
1
- # Copyright (C) 2013 GeoIP Detection
2
- # This file is distributed under the same license as the GeoIP Detection package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: GeoIP Detection 1.5\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/geoip-detect\n"
7
- "POT-Creation-Date: 2013-12-19 10:23:18+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: geoip-detect.php:54
16
- msgid ""
17
- "No GeoIP Database file found. Please refer to the installation instructions "
18
- "in readme.txt."
 
 
 
 
 
 
 
 
 
 
19
  msgstr ""
20
 
21
- #: geoip-detect.php:76
 
 
 
 
22
  msgid "Updated successfully."
23
  msgstr ""
24
 
25
- #: geoip-detect.php:78
26
  msgid "Update failed."
27
  msgstr ""
28
 
29
- #: geoip-detect.php:98
 
 
 
 
 
 
 
 
 
 
 
 
30
  msgid ""
31
- "No GeoIP Database found. Click on the button \"Update now\" or follow the "
32
- "installation instructions."
 
 
 
33
  msgstr ""
34
 
35
- #. #-#-#-#-# plugin.pot (GeoIP Detection 1.5) #-#-#-#-#
36
- #. Plugin Name of the plugin/theme
37
- #: geoip-detect.php:108
38
- msgid "GeoIP Detection"
39
  msgstr ""
40
 
41
- #: geoip-detect.php:113
42
- msgid "Plugin page"
 
 
 
 
43
  msgstr ""
44
 
45
- #: updater.php:41
46
  msgid "Downloaded file could not be opened for reading."
47
  msgstr ""
48
 
49
- #: updater.php:43
50
  msgid "Database could not be written (%s)."
51
  msgstr ""
52
 
53
- #: updater.php:67
54
- msgid "Once Weekly"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  msgstr ""
56
 
57
- #: views/plugin_page.php:5
58
- msgid "GeoIP Detect"
59
  msgstr ""
60
 
61
- #: views/plugin_page.php:14
62
  msgid "Last updated: %s"
63
  msgstr ""
64
 
65
- #: views/plugin_page.php:14 views/plugin_page.php:19
66
- msgid "Never"
67
  msgstr ""
68
 
69
- #: views/plugin_page.php:19
70
- msgid "Next update: %s"
71
  msgstr ""
72
 
73
- #: views/plugin_page.php:20
74
- msgid "(The file is updated automatically once a week.)"
75
  msgstr ""
76
 
77
- #: views/plugin_page.php:26
78
- msgid "Update now"
79
  msgstr ""
80
 
81
- #: views/plugin_page.php:34
82
- msgid "Lookup"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  msgstr ""
84
 
85
- #: views/plugin_page.php:39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  msgid "The function %s returns an object:"
87
  msgstr ""
88
 
89
- #: views/plugin_page.php:43
 
 
 
 
 
 
 
 
90
  msgid "Key"
91
  msgstr ""
92
 
93
- #: views/plugin_page.php:44
94
- msgid "Property Value"
95
  msgstr ""
96
 
97
- #: views/plugin_page.php:60
 
 
 
 
98
  msgid "No information found about this IP."
99
  msgstr ""
100
 
101
- #. #-#-#-#-# plugin.pot (GeoIP Detection 1.5) #-#-#-#-#
102
- #. Plugin URI of the plugin/theme
103
- #. #-#-#-#-# plugin.pot (GeoIP Detection 1.5) #-#-#-#-#
104
- #. Author URI of the plugin/theme
105
- msgid "http://www.yellowtree.de"
 
 
 
 
 
 
 
 
 
106
  msgstr ""
107
 
108
- #. Description of the plugin/theme
109
- msgid "Retrieving Geo-Information using the Maxmind GeoIP (Lite) Database."
110
  msgstr ""
111
 
112
- #. Author of the plugin/theme
113
- msgid "YellowTree (Benjamin Pick)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  msgstr ""
1
+ # Copyright (C) 2016 GeoIP Detection
2
+ # This file is distributed under the same license as the package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: GeoIP Detection 2.5.4\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/geoip-detect\n"
7
+ "POT-Creation-Date: 2016-01-06 01:34:25+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #: admin-ui.php:7
16
+ msgid "GeoIP Detection Lookup"
17
+ msgstr ""
18
+
19
+ #: admin-ui.php:7
20
+ msgid "GeoIP Lookup"
21
+ msgstr ""
22
+
23
+ #: admin-ui.php:8 views/lookup.php:19 views/options.php:6
24
+ msgid "GeoIP Detection"
25
+ msgstr ""
26
+
27
+ #: admin-ui.php:13 views/lookup.php:45
28
+ msgid "Lookup"
29
  msgstr ""
30
 
31
+ #: admin-ui.php:16
32
+ msgid "Options"
33
+ msgstr ""
34
+
35
+ #: admin-ui.php:85
36
  msgid "Updated successfully."
37
  msgstr ""
38
 
39
+ #: admin-ui.php:87
40
  msgid "Update failed."
41
  msgstr ""
42
 
43
+ #: check_requirements.php:40
44
+ msgid "GeoIP Detection: Minimum requirements not met."
45
+ msgstr ""
46
+
47
+ #: data-sources/auto.php:12
48
+ msgid "Automatic download & update of Maxmind GeoIP Lite City"
49
+ msgstr ""
50
+
51
+ #: data-sources/auto.php:13
52
+ msgid "%s (updated monthly)"
53
+ msgstr ""
54
+
55
+ #: data-sources/auto.php:14
56
  msgid ""
57
+ "(License: Creative Commons Attribution-ShareAlike 3.0 Unported. See <a href="
58
+ "\"https://github.com/yellowtree/wp-geoip-detect/wiki/FAQ#the-maxmind-lite-"
59
+ "databases-are-licensed-creative-commons-sharealike-attribution-when-do-i-"
60
+ "need-to-give-attribution\" target=\"_blank\">Licensing FAQ</a> for more "
61
+ "details.)"
62
  msgstr ""
63
 
64
+ #: data-sources/auto.php:21
65
+ msgid "Next update: %s"
 
 
66
  msgstr ""
67
 
68
+ #: data-sources/auto.php:21 data-sources/manual.php:36
69
+ msgid "Never"
70
+ msgstr ""
71
+
72
+ #: data-sources/auto.php:27
73
+ msgid "Update now"
74
  msgstr ""
75
 
76
+ #: data-sources/auto.php:88
77
  msgid "Downloaded file could not be opened for reading."
78
  msgstr ""
79
 
80
+ #: data-sources/auto.php:90
81
  msgid "Database could not be written (%s)."
82
  msgstr ""
83
 
84
+ #: data-sources/hostinfo.php:96
85
+ msgid "HostIP.info Web-API"
86
+ msgstr ""
87
+
88
+ #: data-sources/hostinfo.php:98
89
+ msgid ""
90
+ "Free (Licence: GPL)<br />(only English names, does only have the following "
91
+ "fields: country name, country ID and city name)"
92
+ msgstr ""
93
+
94
+ #: data-sources/hostinfo.php:99
95
+ msgid "You can choose a Maxmind database below."
96
+ msgstr ""
97
+
98
+ #: data-sources/manual.php:12
99
+ msgid "Manual download & update of a Maxmind City or Country database"
100
+ msgstr ""
101
+
102
+ #: data-sources/manual.php:14
103
+ msgid ""
104
+ "<a href=\"http://dev.maxmind.com/geoip/geoip2/geolite2/\" target=\"_blank"
105
+ "\">Free version</a> - <a href=\"https://www.maxmind.com/en/geoip2-country-"
106
+ "database\" target=\"_blank\">Commercial Version</a>"
107
+ msgstr ""
108
+
109
+ #: data-sources/manual.php:21
110
+ msgid "No Maxmind database found."
111
  msgstr ""
112
 
113
+ #: data-sources/manual.php:25
114
+ msgid "Database file: %s"
115
  msgstr ""
116
 
117
+ #: data-sources/manual.php:36
118
  msgid "Last updated: %s"
119
  msgstr ""
120
 
121
+ #: data-sources/manual.php:37
122
+ msgid "Database data from: %s"
123
  msgstr ""
124
 
125
+ #: data-sources/manual.php:50
126
+ msgid "Current value: %s"
127
  msgstr ""
128
 
129
+ #: data-sources/manual.php:71
130
+ msgid "The manual datafile has not been found or is not a mmdb-File. "
131
  msgstr ""
132
 
133
+ #: data-sources/manual.php:91 data-sources/manual.php:137
134
+ msgid "Error while creating reader for \"%s\": %s"
135
  msgstr ""
136
 
137
+ #: data-sources/manual.php:148 data-sources/manual.php:155
138
+ msgid "Maxmind File Database (file does not exist or is not readable)"
139
+ msgstr ""
140
+
141
+ #: data-sources/precision.php:64
142
+ msgid "Maxmind Precision Web-API"
143
+ msgstr ""
144
+
145
+ #: data-sources/precision.php:66
146
+ msgid ""
147
+ "<a href=\"https://www.maxmind.com/en/geoip2-precision-services\">Maxmind "
148
+ "Precision Services</a>"
149
+ msgstr ""
150
+
151
+ #: data-sources/precision.php:69
152
+ msgid "API Type: %s"
153
+ msgstr ""
154
+
155
+ #: data-sources/precision.php:73
156
+ msgid "Remaining Credits: ca. %s"
157
+ msgstr ""
158
+
159
+ #: data-sources/precision.php:77 data-sources/precision.php:124
160
+ msgid "Maxmind Precision only works with a given user id and secret."
161
+ msgstr ""
162
+
163
+ #: data-sources/precision.php:87
164
+ msgid "User ID:"
165
+ msgstr ""
166
+
167
+ #: data-sources/precision.php:88
168
+ msgid "User Secret:"
169
+ msgstr ""
170
+
171
+ #: data-sources/precision.php:89
172
+ msgid "API Type:"
173
+ msgstr ""
174
+
175
+ #: init.php:48
176
+ msgid "Dismiss notice"
177
+ msgstr ""
178
+
179
+ #: init.php:51
180
+ msgid "GeoIP Detection: No database installed"
181
+ msgstr ""
182
+
183
+ #: init.php:52
184
+ msgid ""
185
+ "The Plugin %s is currently using the Webservice <a href=\"http://hostip.info"
186
+ "\" target=\"_blank\">hostip.info</a> as data source. <br />You can click on "
187
+ "the button below to download and install Maxmind GeoIPv2 Lite City now."
188
+ msgstr ""
189
+
190
+ #: init.php:53
191
+ msgid ""
192
+ "This database is licenced <a href=\"http://creativecommons.org/licenses/by-"
193
+ "sa/3.0/\">CC BY-SA</a>. See <a href=\"http://dev.maxmind.com/geoip/geoip2/"
194
+ "geolite2/#License\">License</a> for details."
195
+ msgstr ""
196
+
197
+ #: init.php:62
198
+ msgid "Install now"
199
+ msgstr ""
200
+
201
+ #: init.php:63
202
+ msgid "Keep using hostip.info"
203
+ msgstr ""
204
+
205
+ #: views/footer.php:4
206
+ msgid ""
207
+ "This extension is \"charity-ware\". You can use it for free but if you want "
208
+ "to do me a favor, please <a href=\"%s\" target=\"_blank\">donate</a> to <a "
209
+ "href=\"%s\" target=\"_blank\">this charity</a>. (See <a href=\"%s\" target="
210
+ "\"_blank\">FAQ</a> for more infos.)"
211
+ msgstr ""
212
+
213
+ #: views/footer.php:10
214
+ msgid ""
215
+ "This product includes GeoLite2 data created by MaxMind, available from <a "
216
+ "href=\"http://www.maxmind.com/\">http://www.maxmind.com</a>."
217
+ msgstr ""
218
+
219
+ #: views/lookup.php:23 views/options.php:15
220
+ msgid "<b>Selected data source:</b> %s"
221
  msgstr ""
222
 
223
+ #: views/lookup.php:36
224
+ msgid "IP"
225
+ msgstr ""
226
+
227
+ #: views/lookup.php:36
228
+ msgid "Enter an IP (v4 or v6)"
229
+ msgstr ""
230
+
231
+ #: views/lookup.php:37
232
+ msgid "Use these locales:"
233
+ msgstr ""
234
+
235
+ #: views/lookup.php:39
236
+ msgid "Default (Current site language, English otherwise)"
237
+ msgstr ""
238
+
239
+ #: views/lookup.php:40
240
+ msgid "English only"
241
+ msgstr ""
242
+
243
+ #: views/lookup.php:41
244
+ msgid "French, English otherwise"
245
+ msgstr ""
246
+
247
+ #: views/lookup.php:43
248
+ msgid "Skip cache"
249
+ msgstr ""
250
+
251
+ #: views/lookup.php:53
252
  msgid "The function %s returns an object:"
253
  msgstr ""
254
 
255
+ #: views/lookup.php:54
256
+ msgid "Lookup duration: %.5f s"
257
+ msgstr ""
258
+
259
+ #: views/lookup.php:56
260
+ msgid "(Served from cache. Was cached %s ago)"
261
+ msgstr ""
262
+
263
+ #: views/lookup.php:68
264
  msgid "Key"
265
  msgstr ""
266
 
267
+ #: views/lookup.php:69
268
+ msgid "Value"
269
  msgstr ""
270
 
271
+ #: views/lookup.php:70
272
+ msgid "Shortcode equivalent"
273
+ msgstr ""
274
+
275
+ #: views/lookup.php:123
276
  msgid "No information found about this IP."
277
  msgstr ""
278
 
279
+ #: views/lookup.php:128
280
+ msgid "See %s for more documentation."
281
+ msgstr ""
282
+
283
+ #: views/options.php:7
284
+ msgid "Test IP Detection Lookup"
285
+ msgstr ""
286
+
287
+ #: views/options.php:21
288
+ msgid "Options for this data source"
289
+ msgstr ""
290
+
291
+ #: views/options.php:28 views/options.php:48 views/options.php:89
292
+ msgid "Save"
293
  msgstr ""
294
 
295
+ #: views/options.php:39
296
+ msgid "Choose data source:"
297
  msgstr ""
298
 
299
+ #: views/options.php:53
300
+ msgid "General Options"
301
+ msgstr ""
302
+
303
+ #: views/options.php:55
304
+ msgid "Add a country-specific CSS class to the &lt;body&gt;-Tag."
305
+ msgstr ""
306
+
307
+ #: views/options.php:58
308
+ msgid ""
309
+ "Disable caching a page that contains a shortcode or API call to geo-"
310
+ "dependent functions."
311
+ msgstr ""
312
+
313
+ #: views/options.php:60
314
+ msgid "At least WP SuperCache, W3TotalCache and ZenCache are supported."
315
+ msgstr ""
316
+
317
+ #: views/options.php:63
318
+ msgid ""
319
+ "Warning: As the CSS option above is active, this means that all pages are "
320
+ "not cached."
321
+ msgstr ""
322
+
323
+ #: views/options.php:68
324
+ msgid "The server is behind a reverse proxy"
325
+ msgstr ""
326
+
327
+ #: views/options.php:71
328
+ msgid ""
329
+ "(With Proxy: %s - Without Proxy: %s - Client IP with current configuration: "
330
+ "%s)"
331
+ msgstr ""
332
+
333
+ #: views/options.php:73
334
+ msgid "(This doesn't seem to be the case.)"
335
+ msgstr ""
336
+
337
+ #: views/options.php:79
338
+ msgid "External IP of this server:"
339
+ msgstr ""
340
+
341
+ #: views/options.php:79
342
+ msgid "detect automatically"
343
+ msgstr ""
344
+
345
+ #: views/options.php:81
346
+ msgid "Current value:"
347
+ msgstr ""
348
+
349
+ #: views/options.php:82
350
+ msgid ""
351
+ "If empty: Try to use an ip service to detect it (Internet connection is "
352
+ "necessary). If this is not possible, 0.0.0.0 will be returned."
353
+ msgstr ""
354
+
355
+ #: views/options.php:83
356
+ msgid ""
357
+ "(This external adress will be used when the request IP adress is not a "
358
+ "public IP, e.g. 127.0.0.1)"
359
+ msgstr ""
360
+
361
+ #: views/options.php:94
362
+ msgid "IPv6 not supported"
363
+ msgstr ""
364
+
365
+ #: views/options.php:96
366
+ msgid ""
367
+ "Your version of PHP is compiled without IPv6-support, so it is not possible "
368
+ "to lookup adresses like \"2001:4860:4801:5::91\". For more information see "
369
+ "<a href=\"https://php.net/manual/en/function.inet-pton.php\">PHP "
370
+ "documentation & user comments</a>."
371
  msgstr ""
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: benjaminpick
3
  Tags: geoip, ip, maxmind, geolocation, locator, latitude, longitude
4
  Requires at least: 3.5
5
- Tested up to: 4.3
6
  Stable tag: trunk
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -84,6 +84,10 @@ See [API Documentation](https://github.com/yellowtree/wp-geoip-detect/wiki/API-D
84
 
85
  == Upgrade Notice ==
86
 
 
 
 
 
87
  = 2.5.3 =
88
 
89
  This is a security update (please update).
@@ -147,6 +151,14 @@ Fixing automatic weekly updates.
147
 
148
  == Changelog ==
149
 
 
 
 
 
 
 
 
 
150
  = 2.5.4 =
151
 
152
  * FIX: Manual datasource filepath handling corrected.
2
  Contributors: benjaminpick
3
  Tags: geoip, ip, maxmind, geolocation, locator, latitude, longitude
4
  Requires at least: 3.5
5
+ Tested up to: 4.4
6
  Stable tag: trunk
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
84
 
85
  == Upgrade Notice ==
86
 
87
+ = 2.5.6 =
88
+
89
+ Some users reported problems with open_basedir-notices - if that's you, this update will help. Otherwise there are no changes.
90
+
91
  = 2.5.3 =
92
 
93
  This is a security update (please update).
151
 
152
  == Changelog ==
153
 
154
+ = 2.5.6 =
155
+ * FIX: Removed noticed concerning open_basedir.
156
+
157
+ = 2.5.5 =
158
+
159
+ * Clean-up changes to prepare i18n.
160
+ * FIX: Only show the "no database installed" admin notice to admins (props @meitar)
161
+
162
  = 2.5.4 =
163
 
164
  * FIX: Manual datasource filepath handling corrected.
vendor/composer/ClassLoader.php CHANGED
@@ -13,9 +13,7 @@
13
  namespace Composer\Autoload;
14
 
15
  /**
16
- * ClassLoader implements a PSR-0 class loader
17
- *
18
- * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
19
  *
20
  * $loader = new \Composer\Autoload\ClassLoader();
21
  *
@@ -39,6 +37,8 @@ namespace Composer\Autoload;
39
  *
40
  * @author Fabien Potencier <fabien@symfony.com>
41
  * @author Jordi Boggiano <j.boggiano@seld.be>
 
 
42
  */
43
  class ClassLoader
44
  {
@@ -351,7 +351,7 @@ class ClassLoader
351
  foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
352
  if (0 === strpos($class, $prefix)) {
353
  foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
354
- if (is_file($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
355
  return $file;
356
  }
357
  }
@@ -361,7 +361,7 @@ class ClassLoader
361
 
362
  // PSR-4 fallback dirs
363
  foreach ($this->fallbackDirsPsr4 as $dir) {
364
- if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
365
  return $file;
366
  }
367
  }
@@ -380,7 +380,7 @@ class ClassLoader
380
  foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
381
  if (0 === strpos($class, $prefix)) {
382
  foreach ($dirs as $dir) {
383
- if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
384
  return $file;
385
  }
386
  }
@@ -390,7 +390,7 @@ class ClassLoader
390
 
391
  // PSR-0 fallback dirs
392
  foreach ($this->fallbackDirsPsr0 as $dir) {
393
- if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
394
  return $file;
395
  }
396
  }
13
  namespace Composer\Autoload;
14
 
15
  /**
16
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
 
 
17
  *
18
  * $loader = new \Composer\Autoload\ClassLoader();
19
  *
37
  *
38
  * @author Fabien Potencier <fabien@symfony.com>
39
  * @author Jordi Boggiano <j.boggiano@seld.be>
40
+ * @see http://www.php-fig.org/psr/psr-0/
41
+ * @see http://www.php-fig.org/psr/psr-4/
42
  */
43
  class ClassLoader
44
  {
351
  foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
352
  if (0 === strpos($class, $prefix)) {
353
  foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
354
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
355
  return $file;
356
  }
357
  }
361
 
362
  // PSR-4 fallback dirs
363
  foreach ($this->fallbackDirsPsr4 as $dir) {
364
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
365
  return $file;
366
  }
367
  }
380
  foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
381
  if (0 === strpos($class, $prefix)) {
382
  foreach ($dirs as $dir) {
383
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
384
  return $file;
385
  }
386
  }
390
 
391
  // PSR-0 fallback dirs
392
  foreach ($this->fallbackDirsPsr0 as $dir) {
393
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
394
  return $file;
395
  }
396
  }
vendor/composer/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Copyright (c) 2015 Nils Adermann, Jordi Boggiano
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished
9
+ to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ THE SOFTWARE.
21
+
vendor/composer/autoload_real.php CHANGED
@@ -43,8 +43,3 @@ class ComposerAutoloaderInite354937679ffa734a3f63544e59103dd
43
  return $loader;
44
  }
45
  }
46
-
47
- function composerRequiree354937679ffa734a3f63544e59103dd($file)
48
- {
49
- require $file;
50
- }
43
  return $loader;
44
  }
45
  }
 
 
 
 
 
vendor/composer/installed.json CHANGED
@@ -1,55 +1,4 @@
1
  [
2
- {
3
- "name": "maxmind-db/reader",
4
- "version": "v1.0.3",
5
- "version_normalized": "1.0.3.0",
6
- "source": {
7
- "type": "git",
8
- "url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
9
- "reference": "07f211ab596ba60f9663d9984b888f76ee1beac9"
10
- },
11
- "dist": {
12
- "type": "zip",
13
- "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/07f211ab596ba60f9663d9984b888f76ee1beac9",
14
- "reference": "07f211ab596ba60f9663d9984b888f76ee1beac9",
15
- "shasum": ""
16
- },
17
- "require": {
18
- "php": ">=5.3.1"
19
- },
20
- "require-dev": {
21
- "phpunit/phpunit": "4.2.*",
22
- "satooshi/php-coveralls": "dev-master"
23
- },
24
- "time": "2015-03-13 22:35:13",
25
- "type": "library",
26
- "installation-source": "dist",
27
- "autoload": {
28
- "psr-0": {
29
- "MaxMind": "src/"
30
- }
31
- },
32
- "notification-url": "https://packagist.org/downloads/",
33
- "license": [
34
- "Apache-2.0"
35
- ],
36
- "authors": [
37
- {
38
- "name": "Gregory J. Oschwald",
39
- "email": "goschwald@maxmind.com",
40
- "homepage": "http://www.maxmind.com/"
41
- }
42
- ],
43
- "description": "MaxMind DB Reader API",
44
- "homepage": "https://github.com/maxmind/MaxMind-DB-Reader-php",
45
- "keywords": [
46
- "database",
47
- "geoip",
48
- "geoip2",
49
- "geolocation",
50
- "maxmind"
51
- ]
52
- },
53
  {
54
  "name": "maxmind/web-service-common",
55
  "version": "v0.0.4",
@@ -145,5 +94,57 @@
145
  "geolocation",
146
  "maxmind"
147
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  }
149
  ]
1
  [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  {
3
  "name": "maxmind/web-service-common",
4
  "version": "v0.0.4",
94
  "geolocation",
95
  "maxmind"
96
  ]
97
+ },
98
+ {
99
+ "name": "maxmind-db/reader",
100
+ "version": "v1.1.0",
101
+ "version_normalized": "1.1.0.0",
102
+ "source": {
103
+ "type": "git",
104
+ "url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
105
+ "reference": "1383655533aa2f13a990b27b075fdde8b7bdd5ff"
106
+ },
107
+ "dist": {
108
+ "type": "zip",
109
+ "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/1383655533aa2f13a990b27b075fdde8b7bdd5ff",
110
+ "reference": "1383655533aa2f13a990b27b075fdde8b7bdd5ff",
111
+ "shasum": ""
112
+ },
113
+ "require": {
114
+ "php": ">=5.3.1"
115
+ },
116
+ "require-dev": {
117
+ "phpunit/phpunit": "4.2.*",
118
+ "satooshi/php-coveralls": "dev-master",
119
+ "squizlabs/php_codesniffer": "2.*"
120
+ },
121
+ "time": "2016-01-04 15:38:11",
122
+ "type": "library",
123
+ "installation-source": "dist",
124
+ "autoload": {
125
+ "psr-0": {
126
+ "MaxMind": "src/"
127
+ }
128
+ },
129
+ "notification-url": "https://packagist.org/downloads/",
130
+ "license": [
131
+ "Apache-2.0"
132
+ ],
133
+ "authors": [
134
+ {
135
+ "name": "Gregory J. Oschwald",
136
+ "email": "goschwald@maxmind.com",
137
+ "homepage": "http://www.maxmind.com/"
138
+ }
139
+ ],
140
+ "description": "MaxMind DB Reader API",
141
+ "homepage": "https://github.com/maxmind/MaxMind-DB-Reader-php",
142
+ "keywords": [
143
+ "database",
144
+ "geoip",
145
+ "geoip2",
146
+ "geolocation",
147
+ "maxmind"
148
+ ]
149
  }
150
  ]
vendor/maxmind-db/reader/.travis-build.sh CHANGED
@@ -3,8 +3,10 @@
3
  set -e
4
  set -x
5
 
6
- if [ "hhvm" != "$(phpenv version-name)" ]
7
  then
 
 
8
  cd ext
9
  phpize
10
  ./configure --with-maxminddb --enable-maxminddb-debug
3
  set -e
4
  set -x
5
 
6
+ if [ "hhvm" != $TRAVIS_PHP_VERSION ]
7
  then
8
+ export CFLAGS="-L$HOME/libmaxminddb/lib"
9
+ export CPPFLAGS="-I$HOME/libmaxminddb/include"
10
  cd ext
11
  phpize
12
  ./configure --with-maxminddb --enable-maxminddb-debug
vendor/maxmind-db/reader/.travis-install-prereqs.sh CHANGED
@@ -6,14 +6,13 @@ set -x
6
  git submodule update --init --recursive
7
  composer self-update
8
  composer install --dev -n --prefer-source
9
- if [ "hhvm" != "$(phpenv version-name)" ]
10
  then
 
11
  git clone --recursive git://github.com/maxmind/libmaxminddb
12
  cd libmaxminddb
13
  ./bootstrap
14
- ./configure
15
  make
16
- sudo make install
17
- sudo ldconfig
18
- pyrus install pear/PHP_CodeSniffer
19
  fi
6
  git submodule update --init --recursive
7
  composer self-update
8
  composer install --dev -n --prefer-source
9
+ if [ "hhvm" != "$TRAVIS_PHP_VERSION" ]
10
  then
11
+ mkdir -p "$HOME/libmaxminddb"
12
  git clone --recursive git://github.com/maxmind/libmaxminddb
13
  cd libmaxminddb
14
  ./bootstrap
15
+ ./configure --prefix="$HOME/libmaxminddb"
16
  make
17
+ make install
 
 
18
  fi
vendor/maxmind-db/reader/.travis-test.sh CHANGED
@@ -4,13 +4,16 @@ set -e
4
  set -x
5
 
6
  mkdir -p build/logs
7
- phpunit -c .coveralls-phpunit.xml.dist
8
- if [ "hhvm" != "$(phpenv version-name)" ]
 
9
  then
10
- phpcs --standard=PSR2 src/
11
- echo "mbstring.internal_encoding=utf-8" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
12
- echo "mbstring.func_overload = 7" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
13
- phpunit
14
- echo "extension = ext/modules/maxminddb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
15
- phpunit
16
  fi
 
 
4
  set -x
5
 
6
  mkdir -p build/logs
7
+ ./vendor/bin/phpunit -c .coveralls-phpunit.xml.dist
8
+
9
+ if [ "hhvm" != "$TRAVIS_PHP_VERSION" ]
10
  then
11
+ echo "mbstring.internal_encoding=utf-8" >> ~/.phpenv/versions/"$(phpenv version-name)"/etc/php.ini
12
+ echo "mbstring.func_overload = 7" >> ~/.phpenv/versions/"$(phpenv version-name)"/etc/php.ini
13
+ ./vendor/bin/phpunit
14
+
15
+ echo "extension = ext/modules/maxminddb.so" >> ~/.phpenv/versions/"$(phpenv version-name)"/etc/php.ini
16
+ ./vendor/bin/phpunit
17
  fi
18
+
19
+ ./vendor/bin/phpcs --standard=PSR2 src/
vendor/maxmind-db/reader/.travis.yml CHANGED
@@ -5,6 +5,7 @@ php:
5
  - 5.4
6
  - 5.5
7
  - 5.6
 
8
  - hhvm
9
 
10
  before_install:
@@ -24,7 +25,7 @@ after_script:
24
  notifications:
25
  email:
26
  recipients:
27
- - dev@maxmind.com
28
  on_success: change
29
  on_failure: always
30
 
@@ -37,6 +38,6 @@ addons:
37
  project:
38
  name: "maxmind/MaxMind-DB-Reader-php"
39
  description: "Build submitted via Travis CI"
40
- notification_email: dev@maxmind.com
41
  build_command: "./.travis-build.sh"
42
  branch_pattern: .*coverity.*
5
  - 5.4
6
  - 5.5
7
  - 5.6
8
+ - 7.0
9
  - hhvm
10
 
11
  before_install:
25
  notifications:
26
  email:
27
  recipients:
28
+ - dev-ci@maxmind.com
29
  on_success: change
30
  on_failure: always
31
 
38
  project:
39
  name: "maxmind/MaxMind-DB-Reader-php"
40
  description: "Build submitted via Travis CI"
41
+ notification_email: dev-ci@maxmind.com
42
  build_command: "./.travis-build.sh"
43
  branch_pattern: .*coverity.*
vendor/maxmind-db/reader/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
  CHANGELOG
2
  =========
3
 
 
 
 
 
 
 
4
  1.0.3 (2015-03-13)
5
  ------------------
6
 
1
  CHANGELOG
2
  =========
3
 
4
+ 1.1.0 (2016-01-04)
5
+ ------------------
6
+
7
+ * The MaxMind DB extension now supports PHP 7. Pull request by John Boehr.
8
+ GitHub #27.
9
+
10
  1.0.3 (2015-03-13)
11
  ------------------
12
 
vendor/maxmind-db/reader/composer.json CHANGED
@@ -17,7 +17,8 @@
17
  },
18
  "require-dev": {
19
  "phpunit/phpunit": "4.2.*",
20
- "satooshi/php-coveralls": "dev-master"
 
21
  },
22
  "autoload": {
23
  "psr-0": {
17
  },
18
  "require-dev": {
19
  "phpunit/phpunit": "4.2.*",
20
+ "satooshi/php-coveralls": "dev-master",
21
+ "squizlabs/php_codesniffer": "2.*"
22
  },
23
  "autoload": {
24
  "psr-0": {
vendor/maxmind-db/reader/ext/maxminddb.c CHANGED
@@ -18,6 +18,7 @@
18
  #endif
19
 
20
  #include <php.h>
 
21
  #include "Zend/zend_exceptions.h"
22
  #include <maxminddb.h>
23
 
@@ -34,11 +35,31 @@
34
  ZEND_NS_NAME(PHP_MAXMINDDB_READER_NS, \
35
  "InvalidDatabaseException")
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  typedef struct _maxminddb_obj {
38
  zend_object std;
39
  MMDB_s *mmdb;
40
  } maxminddb_obj;
41
-
42
 
43
  PHP_FUNCTION(maxminddb);
44
 
@@ -86,12 +107,21 @@ static zend_class_entry * lookup_class(const char *name TSRMLS_DC);
86
  static zend_object_handlers maxminddb_obj_handlers;
87
  static zend_class_entry *maxminddb_ce;
88
 
 
 
 
 
 
 
 
 
89
  PHP_METHOD(MaxMind_Db_Reader, __construct){
90
  char *db_file = NULL;
91
- int name_len;
 
92
 
93
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &db_file,
94
- &name_len) == FAILURE) {
95
  THROW_EXCEPTION("InvalidArgumentException",
96
  "The constructor takes exactly one argument.");
97
  return;
@@ -116,24 +146,24 @@ PHP_METHOD(MaxMind_Db_Reader, __construct){
116
  return;
117
  }
118
 
119
- maxminddb_obj *mmdb_obj = zend_object_store_get_object(getThis() TSRMLS_CC);
120
  mmdb_obj->mmdb = mmdb;
121
  }
122
 
123
  PHP_METHOD(MaxMind_Db_Reader, get){
124
  char *ip_address = NULL;
125
- int name_len;
 
126
 
127
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &ip_address,
128
- &name_len) == FAILURE) {
129
  THROW_EXCEPTION("InvalidArgumentException",
130
  "Method takes exactly one argument.");
131
  return;
132
  }
133
 
134
  const maxminddb_obj *mmdb_obj =
135
- (maxminddb_obj *)zend_object_store_get_object(
136
- getThis() TSRMLS_CC);
137
 
138
  MMDB_s *mmdb = mmdb_obj->mmdb;
139
 
@@ -203,8 +233,7 @@ PHP_METHOD(MaxMind_Db_Reader, metadata){
203
  }
204
 
205
  const maxminddb_obj *const mmdb_obj =
206
- (maxminddb_obj *)zend_object_store_get_object(
207
- getThis() TSRMLS_CC);
208
 
209
  if (NULL == mmdb_obj->mmdb) {
210
  THROW_EXCEPTION("BadMethodCallException",
@@ -217,20 +246,35 @@ PHP_METHOD(MaxMind_Db_Reader, metadata){
217
 
218
  object_init_ex(return_value, metadata_ce);
219
 
 
 
 
 
 
220
  zval *metadata_array;
221
  ALLOC_INIT_ZVAL(metadata_array);
 
222
 
223
  MMDB_entry_data_list_s *entry_data_list;
224
  MMDB_get_metadata_as_entry_data_list(mmdb_obj->mmdb, &entry_data_list);
225
 
226
  handle_entry_data_list(entry_data_list, metadata_array TSRMLS_CC);
227
  MMDB_free_entry_data_list(entry_data_list);
 
 
 
 
 
 
 
 
228
  zend_call_method_with_1_params(&return_value, metadata_ce,
229
  &metadata_ce->constructor,
230
  ZEND_CONSTRUCTOR_FUNC_NAME,
231
  NULL,
232
  metadata_array);
233
  zval_ptr_dtor(&metadata_array);
 
234
  }
235
 
236
  PHP_METHOD(MaxMind_Db_Reader, close){
@@ -240,8 +284,8 @@ PHP_METHOD(MaxMind_Db_Reader, close){
240
  return;
241
  }
242
 
243
- maxminddb_obj *mmdb_obj = (maxminddb_obj *)zend_object_store_get_object(
244
- getThis() TSRMLS_CC);
245
 
246
  if (NULL == mmdb_obj->mmdb) {
247
  THROW_EXCEPTION("BadMethodCallException",
@@ -264,14 +308,13 @@ static const MMDB_entry_data_list_s *handle_entry_data_list(
264
  case MMDB_DATA_TYPE_ARRAY:
265
  return handle_array(entry_data_list, z_value TSRMLS_CC);
266
  case MMDB_DATA_TYPE_UTF8_STRING:
267
- ZVAL_STRINGL(z_value,
268
  (char *)entry_data_list->entry_data.utf8_string,
269
- entry_data_list->entry_data.data_size,
270
- 1);
271
  break;
272
  case MMDB_DATA_TYPE_BYTES:
273
- ZVAL_STRINGL(z_value, (char *)entry_data_list->entry_data.bytes,
274
- entry_data_list->entry_data.data_size, 1);
275
  break;
276
  case MMDB_DATA_TYPE_DOUBLE:
277
  ZVAL_DOUBLE(z_value, entry_data_list->entry_data.double_value);
@@ -327,8 +370,14 @@ static const MMDB_entry_data_list_s *handle_map(
327
  }
328
 
329
  entry_data_list = entry_data_list->next;
 
 
 
 
 
330
  zval *new_value;
331
  ALLOC_INIT_ZVAL(new_value);
 
332
  entry_data_list = handle_entry_data_list(entry_data_list,
333
  new_value TSRMLS_CC);
334
  add_assoc_zval(z_value, key, new_value);
@@ -348,8 +397,14 @@ static const MMDB_entry_data_list_s *handle_array(
348
  uint i;
349
  for (i = 0; i < size && entry_data_list; i++) {
350
  entry_data_list = entry_data_list->next;
 
 
 
 
 
351
  zval *new_value;
352
  ALLOC_INIT_ZVAL(new_value);
 
353
  entry_data_list = handle_entry_data_list(entry_data_list,
354
  new_value TSRMLS_CC);
355
  add_next_index_zval(z_value, new_value);
@@ -380,7 +435,7 @@ static void handle_uint128(const MMDB_entry_data_list_s *entry_data_list,
380
  spprintf(&num_str, 0, "0x%016" PRIX64 "%016" PRIX64, high, low);
381
  CHECK_ALLOCATED(num_str);
382
 
383
- ZVAL_STRING(z_value, num_str, 1);
384
  efree(num_str);
385
  }
386
 
@@ -390,14 +445,24 @@ static void handle_uint64(const MMDB_entry_data_list_s *entry_data_list,
390
  // We return it as a string because PHP uses signed longs
391
  char *int_str;
392
  spprintf(&int_str, 0, "%" PRIu64,
393
- entry_data_list->entry_data.uint64 );
394
  CHECK_ALLOCATED(int_str);
395
 
396
- ZVAL_STRING(z_value, int_str, 0);
 
397
  }
398
 
399
  static zend_class_entry *lookup_class(const char *name TSRMLS_DC)
400
  {
 
 
 
 
 
 
 
 
 
401
  zend_class_entry **ce;
402
  if (FAILURE ==
403
  zend_lookup_class(name, strlen(name),
@@ -405,36 +470,43 @@ static zend_class_entry *lookup_class(const char *name TSRMLS_DC)
405
  zend_error(E_ERROR, "Class %s not found", name);
406
  }
407
  return *ce;
 
408
  }
409
 
410
- static void maxminddb_free_storage(void *object TSRMLS_DC)
411
  {
412
- maxminddb_obj *obj = (maxminddb_obj *)object;
413
  if (obj->mmdb != NULL) {
414
  MMDB_close(obj->mmdb);
415
  efree(obj->mmdb);
416
  }
417
 
418
- if (obj->std.properties != NULL) {
419
- zend_hash_destroy(obj->std.properties);
420
- FREE_HASHTABLE(obj->std.properties);
421
- }
422
-
423
- efree(obj);
424
  }
425
 
426
- static zend_object_value maxminddb_create_handler(
 
427
  zend_class_entry *type TSRMLS_DC)
428
  {
429
- zend_object_value retval;
 
 
430
 
431
- maxminddb_obj *obj = (maxminddb_obj *)emalloc(sizeof(maxminddb_obj));
432
- memset(obj, 0, sizeof(maxminddb_obj));
433
- obj->std.ce = type;
434
 
435
- ALLOC_HASHTABLE(obj->std.properties);
436
- zend_hash_init(obj->std.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
 
 
 
 
 
437
 
 
 
438
  object_properties_init(&(obj->std), type);
439
 
440
  retval.handle = zend_objects_store_put(obj, NULL,
@@ -444,6 +516,7 @@ static zend_object_value maxminddb_create_handler(
444
 
445
  return retval;
446
  }
 
447
 
448
  /* *INDENT-OFF* */
449
  static zend_function_entry maxminddb_methods[] = {
@@ -466,6 +539,10 @@ PHP_MINIT_FUNCTION(maxminddb){
466
  memcpy(&maxminddb_obj_handlers,
467
  zend_get_std_object_handlers(), sizeof(zend_object_handlers));
468
  maxminddb_obj_handlers.clone_obj = NULL;
 
 
 
 
469
 
470
  return SUCCESS;
471
  }
18
  #endif
19
 
20
  #include <php.h>
21
+ #include <zend.h>
22
  #include "Zend/zend_exceptions.h"
23
  #include <maxminddb.h>
24
 
35
  ZEND_NS_NAME(PHP_MAXMINDDB_READER_NS, \
36
  "InvalidDatabaseException")
37
 
38
+ #ifdef ZEND_ENGINE_3
39
+ #define Z_MAXMINDDB_P(zv) php_maxminddb_fetch_object(Z_OBJ_P(zv))
40
+ #define _ZVAL_STRING ZVAL_STRING
41
+ #define _ZVAL_STRINGL ZVAL_STRINGL
42
+ typedef size_t strsize_t;
43
+ typedef zend_object free_obj_t;
44
+ #else
45
+ #define Z_MAXMINDDB_P(zv) (maxminddb_obj *) zend_object_store_get_object(zv TSRMLS_CC)
46
+ #define _ZVAL_STRING(a, b) ZVAL_STRING(a, b, 1)
47
+ #define _ZVAL_STRINGL(a, b, c) ZVAL_STRINGL(a, b, c, 1)
48
+ typedef int strsize_t;
49
+ typedef void free_obj_t;
50
+ #endif
51
+
52
+ #ifdef ZEND_ENGINE_3
53
+ typedef struct _maxminddb_obj {
54
+ MMDB_s *mmdb;
55
+ zend_object std;
56
+ } maxminddb_obj;
57
+ #else
58
  typedef struct _maxminddb_obj {
59
  zend_object std;
60
  MMDB_s *mmdb;
61
  } maxminddb_obj;
62
+ #endif
63
 
64
  PHP_FUNCTION(maxminddb);
65
 
107
  static zend_object_handlers maxminddb_obj_handlers;
108
  static zend_class_entry *maxminddb_ce;
109
 
110
+ static inline maxminddb_obj *php_maxminddb_fetch_object(zend_object *obj TSRMLS_DC){
111
+ #ifdef ZEND_ENGINE_3
112
+ return (maxminddb_obj *)((char*)(obj) - XtOffsetOf(maxminddb_obj, std));
113
+ #else
114
+ return (maxminddb_obj *)obj;
115
+ #endif
116
+ }
117
+
118
  PHP_METHOD(MaxMind_Db_Reader, __construct){
119
  char *db_file = NULL;
120
+ strsize_t name_len;
121
+ zval * _this_zval = NULL;
122
 
123
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os",
124
+ &_this_zval, maxminddb_ce, &db_file, &name_len) == FAILURE) {
125
  THROW_EXCEPTION("InvalidArgumentException",
126
  "The constructor takes exactly one argument.");
127
  return;
146
  return;
147
  }
148
 
149
+ maxminddb_obj *mmdb_obj = Z_MAXMINDDB_P(getThis());
150
  mmdb_obj->mmdb = mmdb;
151
  }
152
 
153
  PHP_METHOD(MaxMind_Db_Reader, get){
154
  char *ip_address = NULL;
155
+ strsize_t name_len;
156
+ zval * _this_zval = NULL;
157
 
158
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os",
159
+ &_this_zval, maxminddb_ce, &ip_address, &name_len) == FAILURE) {
160
  THROW_EXCEPTION("InvalidArgumentException",
161
  "Method takes exactly one argument.");
162
  return;
163
  }
164
 
165
  const maxminddb_obj *mmdb_obj =
166
+ (maxminddb_obj *)Z_MAXMINDDB_P(getThis());
 
167
 
168
  MMDB_s *mmdb = mmdb_obj->mmdb;
169
 
233
  }
234
 
235
  const maxminddb_obj *const mmdb_obj =
236
+ (maxminddb_obj *)Z_MAXMINDDB_P(getThis());
 
237
 
238
  if (NULL == mmdb_obj->mmdb) {
239
  THROW_EXCEPTION("BadMethodCallException",
246
 
247
  object_init_ex(return_value, metadata_ce);
248
 
249
+ #ifdef ZEND_ENGINE_3
250
+ zval _metadata_array;
251
+ zval *metadata_array = &_metadata_array;
252
+ ZVAL_NULL(metadata_array);
253
+ #else
254
  zval *metadata_array;
255
  ALLOC_INIT_ZVAL(metadata_array);
256
+ #endif
257
 
258
  MMDB_entry_data_list_s *entry_data_list;
259
  MMDB_get_metadata_as_entry_data_list(mmdb_obj->mmdb, &entry_data_list);
260
 
261
  handle_entry_data_list(entry_data_list, metadata_array TSRMLS_CC);
262
  MMDB_free_entry_data_list(entry_data_list);
263
+ #ifdef ZEND_ENGINE_3
264
+ zend_call_method_with_1_params(return_value, metadata_ce,
265
+ &metadata_ce->constructor,
266
+ ZEND_CONSTRUCTOR_FUNC_NAME,
267
+ NULL,
268
+ metadata_array);
269
+ zval_ptr_dtor(metadata_array);
270
+ #else
271
  zend_call_method_with_1_params(&return_value, metadata_ce,
272
  &metadata_ce->constructor,
273
  ZEND_CONSTRUCTOR_FUNC_NAME,
274
  NULL,
275
  metadata_array);
276
  zval_ptr_dtor(&metadata_array);
277
+ #endif
278
  }
279
 
280
  PHP_METHOD(MaxMind_Db_Reader, close){
284
  return;
285
  }
286
 
287
+ maxminddb_obj *mmdb_obj =
288
+ (maxminddb_obj *)Z_MAXMINDDB_P(getThis());
289
 
290
  if (NULL == mmdb_obj->mmdb) {
291
  THROW_EXCEPTION("BadMethodCallException",
308
  case MMDB_DATA_TYPE_ARRAY:
309
  return handle_array(entry_data_list, z_value TSRMLS_CC);
310
  case MMDB_DATA_TYPE_UTF8_STRING:
311
+ _ZVAL_STRINGL(z_value,
312
  (char *)entry_data_list->entry_data.utf8_string,
313
+ entry_data_list->entry_data.data_size);
 
314
  break;
315
  case MMDB_DATA_TYPE_BYTES:
316
+ _ZVAL_STRINGL(z_value, (char *)entry_data_list->entry_data.bytes,
317
+ entry_data_list->entry_data.data_size);
318
  break;
319
  case MMDB_DATA_TYPE_DOUBLE:
320
  ZVAL_DOUBLE(z_value, entry_data_list->entry_data.double_value);
370
  }
371
 
372
  entry_data_list = entry_data_list->next;
373
+ #ifdef ZEND_ENGINE_3
374
+ zval _new_value;
375
+ zval * new_value = &_new_value;
376
+ ZVAL_NULL(new_value);
377
+ #else
378
  zval *new_value;
379
  ALLOC_INIT_ZVAL(new_value);
380
+ #endif
381
  entry_data_list = handle_entry_data_list(entry_data_list,
382
  new_value TSRMLS_CC);
383
  add_assoc_zval(z_value, key, new_value);
397
  uint i;
398
  for (i = 0; i < size && entry_data_list; i++) {
399
  entry_data_list = entry_data_list->next;
400
+ #ifdef ZEND_ENGINE_3
401
+ zval _new_value;
402
+ zval * new_value = &_new_value;
403
+ ZVAL_NULL(new_value);
404
+ #else
405
  zval *new_value;
406
  ALLOC_INIT_ZVAL(new_value);
407
+ #endif
408
  entry_data_list = handle_entry_data_list(entry_data_list,
409
  new_value TSRMLS_CC);
410
  add_next_index_zval(z_value, new_value);
435
  spprintf(&num_str, 0, "0x%016" PRIX64 "%016" PRIX64, high, low);
436
  CHECK_ALLOCATED(num_str);
437
 
438
+ _ZVAL_STRING(z_value, num_str);
439
  efree(num_str);
440
  }
441
 
445
  // We return it as a string because PHP uses signed longs
446
  char *int_str;
447
  spprintf(&int_str, 0, "%" PRIu64,
448
+ entry_data_list->entry_data.uint64);
449
  CHECK_ALLOCATED(int_str);
450
 
451
+ _ZVAL_STRING(z_value, int_str);
452
+ efree(int_str);
453
  }
454
 
455
  static zend_class_entry *lookup_class(const char *name TSRMLS_DC)
456
  {
457
+ #ifdef ZEND_ENGINE_3
458
+ zend_string *n = zend_string_init(name, strlen(name), 0);
459
+ zend_class_entry *ce = zend_lookup_class(n);
460
+ zend_string_release(n);
461
+ if( NULL == ce ) {
462
+ zend_error(E_ERROR, "Class %s not found", name);
463
+ }
464
+ return ce;
465
+ #else
466
  zend_class_entry **ce;
467
  if (FAILURE ==
468
  zend_lookup_class(name, strlen(name),
470
  zend_error(E_ERROR, "Class %s not found", name);
471
  }
472
  return *ce;
473
+ #endif
474
  }
475
 
476
+ static void maxminddb_free_storage(free_obj_t *object TSRMLS_DC)
477
  {
478
+ maxminddb_obj *obj = php_maxminddb_fetch_object((zend_object *)object TSRMLS_CC);
479
  if (obj->mmdb != NULL) {
480
  MMDB_close(obj->mmdb);
481
  efree(obj->mmdb);
482
  }
483
 
484
+ zend_object_std_dtor(&obj->std TSRMLS_CC);
485
+ #ifndef ZEND_ENGINE_3
486
+ efree(object);
487
+ #endif
 
 
488
  }
489
 
490
+ #ifdef ZEND_ENGINE_3
491
+ static zend_object *maxminddb_create_handler(
492
  zend_class_entry *type TSRMLS_DC)
493
  {
494
+ maxminddb_obj *obj = (maxminddb_obj *)ecalloc(1, sizeof(maxminddb_obj));
495
+ zend_object_std_init(&obj->std, type TSRMLS_CC);
496
+ object_properties_init(&(obj->std), type);
497
 
498
+ obj->std.handlers = &maxminddb_obj_handlers;
 
 
499
 
500
+ return &obj->std;
501
+ }
502
+ #else
503
+ static zend_object_value maxminddb_create_handler(
504
+ zend_class_entry *type TSRMLS_DC)
505
+ {
506
+ zend_object_value retval;
507
 
508
+ maxminddb_obj *obj = (maxminddb_obj *)ecalloc(1, sizeof(maxminddb_obj));
509
+ zend_object_std_init(&obj->std, type TSRMLS_CC);
510
  object_properties_init(&(obj->std), type);
511
 
512
  retval.handle = zend_objects_store_put(obj, NULL,
516
 
517
  return retval;
518
  }
519
+ #endif
520
 
521
  /* *INDENT-OFF* */
522
  static zend_function_entry maxminddb_methods[] = {
539
  memcpy(&maxminddb_obj_handlers,
540
  zend_get_std_object_handlers(), sizeof(zend_object_handlers));
541
  maxminddb_obj_handlers.clone_obj = NULL;
542
+ #ifdef ZEND_ENGINE_3
543
+ maxminddb_obj_handlers.offset = XtOffsetOf(maxminddb_obj, std);
544
+ maxminddb_obj_handlers.free_obj = maxminddb_free_storage;
545
+ #endif
546
 
547
  return SUCCESS;
548
  }
vendor/maxmind-db/reader/ext/php_maxminddb.h CHANGED
@@ -15,7 +15,7 @@
15
 
16
  #ifndef PHP_MAXMINDDB_H
17
  #define PHP_MAXMINDDB_H 1
18
- #define PHP_MAXMINDDB_VERSION "1.0.3"
19
  #define PHP_MAXMINDDB_EXTNAME "maxminddb"
20
 
21
  extern zend_module_entry maxminddb_module_entry;
15
 
16
  #ifndef PHP_MAXMINDDB_H
17
  #define PHP_MAXMINDDB_H 1
18
+ #define PHP_MAXMINDDB_VERSION "1.1.0"
19
  #define PHP_MAXMINDDB_EXTNAME "maxminddb"
20
 
21
  extern zend_module_entry maxminddb_module_entry;
vendor/maxmind-db/reader/tests/MaxMind/Db/Test/ReaderTest.php CHANGED
@@ -59,6 +59,8 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
59
  // For the C extension, which returns a hexadecimal
60
  if (extension_loaded('gmp')) {
61
  $uint128 = gmp_strval($uint128);
 
 
62
  }
63
 
64
  $this->assertEquals(
@@ -85,7 +87,14 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
85
  $this->assertEquals(0, $record['uint16']);
86
  $this->assertEquals(0, $record['uint32']);
87
  $this->assertEquals(0, $record['uint64']);
88
- $this->assertEquals(0, $record['uint128']);
 
 
 
 
 
 
 
89
  }
90
 
91
  public function testNoIpV4SearchTree()
59
  // For the C extension, which returns a hexadecimal
60
  if (extension_loaded('gmp')) {
61
  $uint128 = gmp_strval($uint128);
62
+ } else {
63
+ $this->markTestIncomplete('Requires gmp extension to check value of uint128');
64
  }
65
 
66
  $this->assertEquals(
87
  $this->assertEquals(0, $record['uint16']);
88
  $this->assertEquals(0, $record['uint32']);
89
  $this->assertEquals(0, $record['uint64']);
90
+
91
+ $uint128 = $record['uint128'];
92
+ if (extension_loaded('gmp')) {
93
+ $uint128 = gmp_strval($uint128);
94
+ } else {
95
+ $this->markTestIncomplete('Requires gmp extension to check value of uint128');
96
+ }
97
+ $this->assertEquals('0', $uint128);
98
  }
99
 
100
  public function testNoIpV4SearchTree()