[admin] filter improve & fix ad link

This commit is contained in:
xiaomlove
2022-03-04 16:16:56 +08:00
parent b9d5df232b
commit 0665770ca5
51 changed files with 218 additions and 71 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.6.0-beta13');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-02-14');
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.6.0-beta14');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-03-04');
defined('IN_TRACKER') || define('IN_TRACKER', true);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
+1 -1
View File
@@ -329,7 +329,7 @@ function format_comment($text, $strip_html = true, $xssclean = false, $newtab =
if ($adid) {
// $s = preg_replace("/\[url=([^\[\s]+?)\](.+?)\[\/url\]/ei", "formatAdUrl(".$adid." ,'\\1', '\\2', ".($newtab==true ? 1 : 0).", 'faqlink')", $s);
$s = preg_replace_callback("/\[url=([^\[\s]+?)\](.+?)\[\/url\]/i", function ($matches) use ($adid, $newtab) {
return formatAdUrl(".$adid." ,$matches[1], $matches[2], ".($newtab==true ? 1 : 0).", 'faqlink');
return formatAdUrl($adid ,$matches[1], $matches[2], ".($newtab==true ? 1 : 0).", 'faqlink');
}, $s);
} else {
// $s = preg_replace("/\[url=([^\[\s]+?)\](.+?)\[\/url\]/ei", "formatUrl('\\1', ".($newtab==true ? 1 : 0).", '\\2', 'faqlink')", $s);
+1 -1
View File
@@ -511,7 +511,7 @@ function api(...$args)
'msg' => (string)$msg,
'data' => $data,
'time' => (float)number_format(microtime(true) - $start, 3),
'request_id' => REQUEST_ID,
'rid' => REQUEST_ID,
];
}