From b48efa9156d1dd08ed64fd428a25e21599c2ec93 Mon Sep 17 00:00:00 2001 From: horus Date: Sat, 17 Feb 2018 19:16:45 +0100 Subject: Prevents results with empty urls when the crawler had no time to short it. (website) --- site/app/Http/Controllers/SearchController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'site/app/Http/Controllers/SearchController.php') diff --git a/site/app/Http/Controllers/SearchController.php b/site/app/Http/Controllers/SearchController.php index 2587d9b..a0ea2fc 100644 --- a/site/app/Http/Controllers/SearchController.php +++ b/site/app/Http/Controllers/SearchController.php @@ -56,7 +56,7 @@ class SearchController extends Controller { $query = Input::get("q"); $q = "%" . Utility::escapeLike($query) . "%"; - $data = DB::table('all_view')->where('name', 'like', $q)->orWhere('spirit_type', 'like', $q)->orderBy($sort_by, $order_by)->simplePaginate(20); + $data = DB::table('all_view')->whereNotNull('url')->where('name', 'like', $q)->orWhere('spirit_type', 'like', $q)->orderBy($sort_by, $order_by)->simplePaginate(20); #$data = DB::table('whisky_view')->orderBy('procent', 'DESC')->limit(100)->simplePaginate(20); #var_dump($data); exit; -- cgit v1.2.3