From 1e8c32fbdbae586709164df915748bba8d1fe2f0 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 21 Feb 2018 04:33:47 -0800 Subject: [PATCH 1/2] Fixed - missing table prefix for location parent search --- app/Models/Location.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Models/Location.php b/app/Models/Location.php index bfc7cebf7..1ef5fe8cd 100755 --- a/app/Models/Location.php +++ b/app/Models/Location.php @@ -9,6 +9,7 @@ use App\Presenters\Presentable; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Watson\Validating\ValidatingTrait; +use DB; class Location extends SnipeModel { @@ -184,7 +185,7 @@ class Location extends SnipeModel }) // Ugly, ugly code because Laravel sucks at self-joins ->orWhere(function ($query) use ($search) { - $query->whereRaw("parent_id IN (select id from locations where name LIKE '%".$search."%') "); + $query->whereRaw("parent_id IN (select id from ".DB::getTablePrefix()."locations where name LIKE '%".$search."%') "); }); }); From d28c2af7de1ca8079e6041135a85e90e56fd38a3 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 21 Feb 2018 04:41:44 -0800 Subject: [PATCH 2/2] Fixed bootstrap table issue if per page was set to 10 --- resources/views/partials/bootstrap-table.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index aea5f9490..9dd340b26 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -55,7 +55,7 @@ paginationLastText: "{{ trans('general.last') }}", paginationPreText: "{{ trans('general.previous') }}", paginationNextText: "{{ trans('general.next') }}", - pageList: ['20', '30','50','100','150','200', '500'], + pageList: ['10','20', '30','50','100','150','200', '500'], paginationVAlign: 'both', formatLoadingMessage: function () { return '

Loading... please wait....

';