This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, master has been updated
via d10c0bf8a002e471b1f491d21b2e9081e252fb30 (commit)
from 00dd6bc5329618392b227b3942d52a83bd383eac (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=d10c0bf8a002e471b1f491d21b2e9081e252fb30
commit d10c0bf8a002e471b1f491d21b2e9081e252fb30
Author: Franck Villaume <[email protected]>
Date: Sat Sep 3 11:20:27 2016 +0200
PHP deprecated option /e to function preg_replace, use preg_replace_callback
diff --git a/src/plugins/blocks/common/blocksPlugin.class.php
b/src/plugins/blocks/common/blocksPlugin.class.php
index 2b06596..ad1ff78 100644
--- a/src/plugins/blocks/common/blocksPlugin.class.php
+++ b/src/plugins/blocks/common/blocksPlugin.class.php
@@ -1,5 +1,4 @@
<?php
-
/**
* Copyright (C) 2006 Alain Peyrat, Alcatel-Lucent
* Copyright (C) 2010 Alain Peyrat <[email protected]>
@@ -119,7 +118,7 @@ control over it to the project's administrator.");
if ($content === false) {
return false;
} elseif ($content) {
- return $this->parseContent($content).'<br />';
+ return $this->parseContent($content);
} else {
return '<table width="100%" border="1" cellpadding="0"
cellspacing="0">'.
'<tr><td align="center">block:
'.$name.'</td></tr></table><br />';
@@ -129,10 +128,10 @@ control over it to the project's administrator.");
function parseContent($text) {
global $HTML;
- $text = preg_replace('/<p>{boxTop (.*?)}<\/p>/ie',
'$HTML->boxTop(\'$1\')', $text);
- $text = preg_replace('/{boxTop (.*?)}/ie',
'$HTML->boxTop(\'$1\')', $text);
- $text = preg_replace('/<p>{boxMiddle (.*?)}<\/p>/ie',
'$HTML->boxMiddle(\'$1\')', $text);
- $text = preg_replace('/{boxMiddle (.*?)}/ie',
'$HTML->boxMiddle(\'$1\')', $text);
+ $text = preg_replace_callback('/<p>{boxTop (.*?)}<\/p>/i',
function($m) { return $HTML->boxTop($m[1]); }, $text);
+ $text = preg_replace_callback('/{boxTop (.*?)}/i', function($m)
{ $HTML->boxTop($m[1]); }, $text);
+ $text = preg_replace_callback('/<p>{boxMiddle (.*?)}<\/p>/i',
function($m) { $HTML->boxMiddle($m[1]); }, $text);
+ $text = preg_replace_callback('/{boxMiddle (.*?)}/i',
function($m) { $HTML->boxMiddle($m[1]); }, $text);
$text = preg_replace('/<p>{boxBottom}<\/p>/i',
$HTML->boxBottom(), $text);
$text = preg_replace('/{boxBottom}/i', $HTML->boxBottom(),
$text);
-----------------------------------------------------------------------
Summary of changes:
src/plugins/blocks/common/blocksPlugin.class.php | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits