From 68c88e5e4d1cff7f56541d9dd50c05b75872779d Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Sun, 22 Oct 2017 19:27:11 +0100 Subject: [PATCH] Revert regex to full form, remove reference to debugbar --- app/Note.php | 4 +--- changelog.md | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Note.php b/app/Note.php index 1037afc8..dc932019 100644 --- a/app/Note.php +++ b/app/Note.php @@ -4,7 +4,6 @@ namespace App; use Cache; use Twitter; -use Debugbar; use Normalizer; use GuzzleHttp\Client; use Laravel\Scout\Searchable; @@ -28,7 +27,7 @@ class Note extends Model * * @var string */ - private const USERNAMES_REGEX = '/@(\w+)/'; + private const USERNAMES_REGEX = '/\[.*?\](*SKIP)(*F)|@(\w+)/'; protected $contacts; @@ -436,7 +435,6 @@ class Note extends Model preg_match_all(self::USERNAMES_REGEX, $this->getoriginal('note'), $matches); foreach ($matches[1] as $match) { - Debugbar::info('query inside getContacts'); $contacts[$match] = Contact::where('nick', mb_strtolower($match))->first(); } } diff --git a/changelog.md b/changelog.md index 9b38490e..b6ac39fb 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # Changelog +## Version 0.11.2 (2017-10-22) + - This hotfix removes reference to a de package not installed on production + ## Version 0.11.1 (2017-10-22) - Improve eloquent queries for rendering notes with contacts