aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2014-01-22 12:03:57 +0000
committermistic100 <mistic@piwigo.org>2014-01-22 12:03:57 +0000
commitcd99110a8e52410f1147c1f0d92b7337532c6146 (patch)
tree5b18d4ac23ee27f57c55793ba6a56fa674f4daa6 /admin
parentf1e62b578d939ae4b1b5fa32bc131b69b0ba671b (diff)
bug 2989: Deprecated: preg_replace(): The /e modifier is deprecated
git-svn-id: http://piwigo.org/svn/branches/2.6@26904 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 71c164822..36fc9d93e 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -810,14 +810,18 @@ SELECT id, uppercats, site_id
$categories = array_from_query($query);
// filling $cat_fulldirs
+ $cat_dirs_callback = create_function('$m', 'global $cat_dirs; return $cat_dirs[$m[1]];');
+
$cat_fulldirs = array();
foreach ($categories as $category)
{
$uppercats = str_replace(',', '/', $category['uppercats']);
$cat_fulldirs[$category['id']] = $galleries_url[$category['site_id']];
- $cat_fulldirs[$category['id']].= preg_replace('/(\d+)/e',
- "\$cat_dirs['$1']",
- $uppercats);
+ $cat_fulldirs[$category['id']].= preg_replace_callback(
+ '/(\d+)/',
+ $cat_dirs_callback,
+ $uppercats
+ );
}
return $cat_fulldirs;