summaryrefslogtreecommitdiffstats
path: root/73320ff0c35fe102944eae1fb4ed36bfb7d63b18.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-11-08 17:03:56 +0100
committerRemi Collet <remi@remirepo.net>2018-11-08 17:03:56 +0100
commit2cad8f700849d06000ccfc1d877a0c6bf508d090 (patch)
treeb3a2402cd53664434a584d8a8503277102c67933 /73320ff0c35fe102944eae1fb4ed36bfb7d63b18.patch
parent5818ac23bcfe265b9fe633f0a94987c2fbeb56b3 (diff)
add upstream patches from merged PRs
add weak dependencies on geolite2 databases
Diffstat (limited to '73320ff0c35fe102944eae1fb4ed36bfb7d63b18.patch')
-rw-r--r--73320ff0c35fe102944eae1fb4ed36bfb7d63b18.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/73320ff0c35fe102944eae1fb4ed36bfb7d63b18.patch b/73320ff0c35fe102944eae1fb4ed36bfb7d63b18.patch
new file mode 100644
index 0000000..8bb6a66
--- /dev/null
+++ b/73320ff0c35fe102944eae1fb4ed36bfb7d63b18.patch
@@ -0,0 +1,49 @@
+From 73320ff0c35fe102944eae1fb4ed36bfb7d63b18 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 7 Nov 2018 14:18:00 +0100
+Subject: [PATCH] add MINFO method, and display both extension and library
+ versions
+
+---
+ ext/maxminddb.c | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/ext/maxminddb.c b/ext/maxminddb.c
+index c0177df..6fd758f 100644
+--- a/ext/maxminddb.c
++++ b/ext/maxminddb.c
+@@ -20,6 +20,7 @@
+ #include <php.h>
+ #include <zend.h>
+ #include "Zend/zend_exceptions.h"
++#include "ext/standard/info.h"
+ #include <maxminddb.h>
+
+ #ifdef ZTS
+@@ -546,6 +547,17 @@ PHP_MINIT_FUNCTION(maxminddb){
+ return SUCCESS;
+ }
+
++static PHP_MINFO_FUNCTION(maxminddb)
++{
++ php_info_print_table_start();
++
++ php_info_print_table_row(2, "MaxMind DB Reader", "enabled");
++ php_info_print_table_row(2, "maxminddb extension version", PHP_MAXMINDDB_VERSION);
++ php_info_print_table_row(2, "libmaxminddb library version", MMDB_lib_version());
++
++ php_info_print_table_end();
++}
++
+ zend_module_entry maxminddb_module_entry = {
+ STANDARD_MODULE_HEADER,
+ PHP_MAXMINDDB_EXTNAME,
+@@ -554,7 +566,7 @@ zend_module_entry maxminddb_module_entry = {
+ NULL,
+ NULL,
+ NULL,
+- NULL,
++ PHP_MINFO(maxminddb),
+ PHP_MAXMINDDB_VERSION,
+ STANDARD_MODULE_PROPERTIES
+ };