aboutsummaryrefslogtreecommitdiffstats
path: root/community/phpldapadmin/phpldapadmin-1.2.3_use-preg_replace_callback.patch
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-28 13:54:43 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-03-28 18:38:20 +0200
commit4272e802a1be191657becb739e6a248c1d0411a7 (patch)
treea07a25b7c99d7da326957a88173ba49583cf6b2a /community/phpldapadmin/phpldapadmin-1.2.3_use-preg_replace_callback.patch
parent3e272105092cd9804a5a022a188db929ebf440da (diff)
downloadaports-4272e802a1be191657becb739e6a248c1d0411a7.tar.bz2
aports-4272e802a1be191657becb739e6a248c1d0411a7.tar.xz
community/*: move php5 and dependent pkgs from main
There two main reasons for this change: * Active support of PHP 5.x ended on January 2017, security support will end on December 2018. Packages in the main repository should be supported for at least 2 years, this means until first quarter of 2019 for the upcoming v3.6. * php7 and its extensions are currently in the community repository, so we can't use single abuild for both php5-* and php7-* packages (as we do for Python and Lua packages). This change was suggested by @vakartel, approved by @ncopa, @kaniini, and @jirutka.
Diffstat (limited to 'community/phpldapadmin/phpldapadmin-1.2.3_use-preg_replace_callback.patch')
-rw-r--r--community/phpldapadmin/phpldapadmin-1.2.3_use-preg_replace_callback.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/community/phpldapadmin/phpldapadmin-1.2.3_use-preg_replace_callback.patch b/community/phpldapadmin/phpldapadmin-1.2.3_use-preg_replace_callback.patch
new file mode 100644
index 0000000000..60c086d197
--- /dev/null
+++ b/community/phpldapadmin/phpldapadmin-1.2.3_use-preg_replace_callback.patch
@@ -0,0 +1,34 @@
+From 5a7edc892f1b3cccab74ed150f9d6843912a39ee Mon Sep 17 00:00:00 2001
+From: Ben Chavet <ben@chavet.net>
+Date: Thu, 29 May 2014 18:57:44 +0000
+Subject: [PATCH] Use preg_replace_callback instead of /e in preg_replace to
+ fix E_DEPRECATED warnings
+
+---
+ lib/ds_ldap.php | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/lib/ds_ldap.php b/lib/ds_ldap.php
+index c346660..8bc1ef8 100644
+--- a/lib/ds_ldap.php
++++ b/lib/ds_ldap.php
+@@ -1116,13 +1116,14 @@ private function unescapeDN($dn) {
+
+ if (is_array($dn)) {
+ $a = array();
+- foreach ($dn as $key => $rdn)
+- $a[$key] = preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$rdn);
+-
++ foreach ($dn as $key => $rdn) {
++ $a[$key] = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', function($m) { return "''.chr(hexdec('${m[1]}')).''"; }, $rdn);
++ }
+ return $a;
+
+- } else
+- return preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$dn);
++ } else {
++ return preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', function($m) { return "''.chr(hexdec('${m[1]}')).''"; }, $dn);
++ }
+ }
+
+ public function getRootDSE($method=null) {