mirror of
https://github.com/scratchfoundation/swiki-confirmaccount.git
synced 2024-12-04 12:51:01 -05:00
fixed regex after API format changed
This commit is contained in:
parent
979d8ac685
commit
aab7aa3caa
1 changed files with 5 additions and 2 deletions
|
@ -112,8 +112,11 @@ class AccountRequestSubmission {
|
|||
return;
|
||||
}
|
||||
$success = false;
|
||||
preg_match_all('%<div id="comments-\d+" class="comment +" data-comment-id="\d+">.*?<a href="/users/(.*?)">.*?<div class="content">(.*?)</div>%ms', $data, $matches);
|
||||
foreach ($matches[2] as $key => $val) {
|
||||
preg_match_all('%<div id="comments-\d+" class="comment +" data-comment-id="\d+">.*?<div class="actions-wrap">.*?<div class="name">\s+<a href="/users/(([a-zA-Z0-9]|-|_)+)">(([a-zA-Z0-9]|-|_)+)</a>\s+</div>\s+<div class="content">(.*?)</div>%ms', $data, $matches);
|
||||
unset($matches[2]);
|
||||
unset($matches[3]);
|
||||
unset($matches[4]);
|
||||
foreach ($matches[5] as $key => $val) {
|
||||
$user = $matches[1][$key];
|
||||
$comment = trim($val);
|
||||
if (strtolower($user) == strtolower(htmlspecialchars($this->userName)) && $this->stringContainsArray($comment, $codes)) {
|
||||
|
|
Loading…
Reference in a new issue