Revert regex to full form, remove reference to debugbar
This commit is contained in:
parent
c15a395c2b
commit
68c88e5e4d
2 changed files with 4 additions and 3 deletions
|
@ -4,7 +4,6 @@ namespace App;
|
||||||
|
|
||||||
use Cache;
|
use Cache;
|
||||||
use Twitter;
|
use Twitter;
|
||||||
use Debugbar;
|
|
||||||
use Normalizer;
|
use Normalizer;
|
||||||
use GuzzleHttp\Client;
|
use GuzzleHttp\Client;
|
||||||
use Laravel\Scout\Searchable;
|
use Laravel\Scout\Searchable;
|
||||||
|
@ -28,7 +27,7 @@ class Note extends Model
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private const USERNAMES_REGEX = '/@(\w+)/';
|
private const USERNAMES_REGEX = '/\[.*?\](*SKIP)(*F)|@(\w+)/';
|
||||||
|
|
||||||
protected $contacts;
|
protected $contacts;
|
||||||
|
|
||||||
|
@ -436,7 +435,6 @@ class Note extends Model
|
||||||
preg_match_all(self::USERNAMES_REGEX, $this->getoriginal('note'), $matches);
|
preg_match_all(self::USERNAMES_REGEX, $this->getoriginal('note'), $matches);
|
||||||
|
|
||||||
foreach ($matches[1] as $match) {
|
foreach ($matches[1] as $match) {
|
||||||
Debugbar::info('query inside getContacts');
|
|
||||||
$contacts[$match] = Contact::where('nick', mb_strtolower($match))->first();
|
$contacts[$match] = Contact::where('nick', mb_strtolower($match))->first();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
# Changelog
|
# 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)
|
## Version 0.11.1 (2017-10-22)
|
||||||
- Improve eloquent queries for rendering notes with contacts
|
- Improve eloquent queries for rendering notes with contacts
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue