Fixed bookmark bug.

このコミットが含まれているのは:
テクニカル諏訪子 2018-04-25 18:59:02 +09:00
コミット 93122d6894

ファイルの表示

@ -267,7 +267,7 @@ class BoardController extends Controller {
$valid = $this->objAuth->getPermissions($request->username, $request->password); $valid = $this->objAuth->getPermissions($request->username, $request->password);
if ($valid['for_editown'] == 1) { if ($valid['for_editown'] == 1) {
if ($request->for_id !== 0) { if (isset($request->for_id)) {
DB::table('for_bookmarks') DB::table('for_bookmarks')
->where('user_id', $check) ->where('user_id', $check)
->where('for_id', $request->for_id) ->where('for_id', $request->for_id)
@ -275,8 +275,8 @@ class BoardController extends Controller {
return 'Success!'; return 'Success!';
} }
else if ($request->top_id !== 0) { else if (isset($request->top_id)) {
DB::table('for_bookmarks') $res = DB::table('for_bookmarks')
->where('user_id', $check) ->where('user_id', $check)
->where('top_id', $request->top_id) ->where('top_id', $request->top_id)
->delete(); ->delete();