aboutsummaryrefslogtreecommitdiffstats
path: root/admin/history.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2014-01-27 18:05:04 +0000
committermistic100 <mistic@piwigo.org>2014-01-27 18:05:04 +0000
commit6fcc5f10df0fbd02877e49aec7b662c64c60acc7 (patch)
tree5359b9244063c672c9c829c2e54bc935e870567f /admin/history.php
parent46c2cb6b5f407848ed9bc60812b84f645106fedc (diff)
Merged revision(s) 26972, 26998 from trunk:
replace more preg_replace callback ........ remove *_version_compare methods in languages & plugins & themes classes, unused and outdated (preg_replace /e modifier) git-svn-id: http://piwigo.org/svn/branches/2.6@26999 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/history.php')
-rw-r--r--admin/history.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/admin/history.php b/admin/history.php
index 8307d5e32..8a2e07926 100644
--- a/admin/history.php
+++ b/admin/history.php
@@ -339,6 +339,8 @@ SELECT
id,
name, url_name
FROM '.TAGS_TABLE;
+
+ global $name_of_tag; // used for preg_replace
$name_of_tag = array();
$result = pwg_query($query);
while ($row=pwg_db_fetch_assoc($result))
@@ -399,9 +401,9 @@ SELECT
$tags_string = '';
if (isset($line['tag_ids']))
{
- $tags_string = preg_replace(
- '/(\d+)/e',
- 'isset($name_of_tag["$1"]) ? $name_of_tag["$1"] : "$1"',
+ $tags_string = preg_replace_callback(
+ '/(\d+)/',
+ create_function('$m', 'return isset($name_of_tag[$m[1]]) ? $name_of_tag[$m[1]] : $m[1];'),
str_replace(
',',
', ',
@@ -541,6 +543,8 @@ SELECT
),
)
);
+
+ unset($name_of_tag);
}
// +-----------------------------------------------------------------------+