Skip to content

Commit

Permalink
Fix Quick nick notifications and unread post status.
Browse files Browse the repository at this point in the history
  • Loading branch information
lavigor committed Jun 27, 2017
1 parent f31608d commit 1ffcd11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions notification/quicknick.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function is_available()
private function get_mentioned_users($xml)
{
$usernames = array();
if (strpos($xml, '<REF ') === false)
if (!preg_match('/<REF[ >]/', $xml))
{
return $usernames;
}
Expand All @@ -66,7 +66,8 @@ private function get_mentioned_users($xml)
$xpath = new \DOMXPath($dom);
foreach ($xpath->query('//REF') as $username)
{
$usernames[] = $username->textContent;
preg_match('#^\[ref(.*?)\](.+)\[\/ref\]$#ui', $username->textContent, $matches);
$usernames[] = $matches[2];
}

return $usernames;
Expand Down
2 changes: 1 addition & 1 deletion styles/all/template/quickreply_style.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* @param {jQuery} elements
*/
quickreply.style.markRead = function(elements) {
elements.find('.unreadpost').removeClass('unreadpost').find('.icon.icon-red').removeClass('icon-red');
elements.find('.unreadpost').removeClass('unreadpost').find('.icon.icon-red').removeClass('icon-red').addClass('icon-lightgray');
};

/**
Expand Down

0 comments on commit 1ffcd11

Please sign in to comment.