From 2cad8f700849d06000ccfc1d877a0c6bf508d090 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 8 Nov 2018 17:03:56 +0100 Subject: add upstream patches from merged PRs add weak dependencies on geolite2 databases --- 73320ff0c35fe102944eae1fb4ed36bfb7d63b18.patch | 49 ++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 73320ff0c35fe102944eae1fb4ed36bfb7d63b18.patch (limited to '73320ff0c35fe102944eae1fb4ed36bfb7d63b18.patch') 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 +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 + #include + #include "Zend/zend_exceptions.h" ++#include "ext/standard/info.h" + #include + + #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 + }; -- cgit