summaryrefslogtreecommitdiff
path: root/site/app/Http/Controllers/SearchController.php
diff options
context:
space:
mode:
authorhorus2018-02-17 19:16:45 +0100
committerhorus2018-02-17 19:16:45 +0100
commitb48efa9156d1dd08ed64fd428a25e21599c2ec93 (patch)
treed7949326aaa25a7845a4244694de74c6675c920f /site/app/Http/Controllers/SearchController.php
parent47ee2f721f552d0b65159516f7420d14a7880bbd (diff)
downloadalkobote-b48efa9156d1dd08ed64fd428a25e21599c2ec93.tar.gz
Prevents results with empty urls when the crawler had no time to short it. (website)
Diffstat (limited to 'site/app/Http/Controllers/SearchController.php')
-rw-r--r--site/app/Http/Controllers/SearchController.php2
1 files changed, 1 insertions, 1 deletions
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;