Merge pull request #6 from jacob-g/master

Adapting to API format change
This commit is contained in:
seotts 2015-04-27 09:21:25 -05:00
commit fc062058e7

View file

@ -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)) {