From 6b67263f01928c0eff20b3f0cf60d31a873c9513 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Fri, 3 Aug 2018 01:24:17 +0200 Subject: [PATCH] Ensure compatibility with DB table prefix --- .../sticky/src/Listener/PinStickiedDiscussionsToTop.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/sticky/src/Listener/PinStickiedDiscussionsToTop.php b/extensions/sticky/src/Listener/PinStickiedDiscussionsToTop.php index 62b00cbfd..3ae36df6b 100755 --- a/extensions/sticky/src/Listener/PinStickiedDiscussionsToTop.php +++ b/extensions/sticky/src/Listener/PinStickiedDiscussionsToTop.php @@ -75,9 +75,9 @@ class PinStickiedDiscussionsToTop $read = $query->newQuery() ->selectRaw(1) ->from('users_discussions as sticky') - ->whereRaw('sticky.discussion_id = id') + ->whereColumn('sticky.discussion_id', 'id') ->where('sticky.user_id', '=', $search->getActor()->id) - ->whereRaw('sticky.read_number >= last_post_number'); + ->whereColumn('sticky.read_number', '>=', 'last_post_number'); // Add the bindings manually (rather than as the second // argument in orderByRaw) for now due to a bug in Laravel which