Fixed bookmark bug.

このコミットが含まれているのは:
テクニカル諏訪子 2018-04-25 18:59:02 +09:00
コミット 93122d6894
1個のファイルの変更3行の追加3行の削除

ファイルの表示

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