kopia lustrzana https://github.com/pixelfed/pixelfed
Merge pull request #5948 from maco/case-insensitive-tagging
[bug fix] use case insensitive search when tagging accountspull/5939/head
commit
caf24907a2
|
|
@ -268,10 +268,11 @@ class ComposeController extends Controller
|
|||
|
||||
$blocked->push($request->user()->profile_id);
|
||||
|
||||
$operator = config('database.default') === 'pgsql' ? 'ilike' : 'like';
|
||||
$results = Profile::select('id', 'domain', 'username')
|
||||
->whereNotIn('id', $blocked)
|
||||
->whereNull('domain')
|
||||
->where('username', 'like', '%'.$q.'%')
|
||||
->where('username', $operator, '%'.$q.'%')
|
||||
->limit(15)
|
||||
->get()
|
||||
->map(function ($r) {
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue