修复帖子增强@人乱序的问题
7232708273 4月前

如果有两个以上相似的用户名 :admin 跟 admi  同时被@[email protected]@[email protected] @[email protected]   会出现匹配混乱

str_replace()函数里的$haya_post_info_usernames[0][$i]循环一次就替换$post['message']所有的@[email protected] 多次循环导致混乱

添加修改一下代码就好了

	preg_match_all('/(?<=@).*?(,|,|:)/', $post['message_fmt'], $haya_post_info_usernames_fmts);
	preg_match_all('/(?<=@).*?(,|,|:)/', $post['message'], $haya_post_info_usernames);
	

最新回复 (1)
全部楼主
  • 晓帅呀
    2月前 2
    0
返回
7232708273
二级用户组
49
主题数
121
帖子数
扫码访问