新規ポスト機能性

このコミットが含まれているのは:
テクニカル諏訪子 2019-02-07 11:54:17 +09:00
コミット 494da8b2e2
1個のファイルの変更5行の追加4行の削除

ファイルの表示

@ -874,7 +874,8 @@ class BoardController extends Controller {
$valid = $this->objAuth->getPermissions($request->username, $request->password);
if ($valid['for_post'] == 1) {
$fpc = $this->getPostCountFreeze($request->for_id);
$fid = $this->getForumIdFromTopic($request->top_id);
$fpc = $this->getPostCountFreeze($fid);
if ($fpc === 0) {
$next = $this->getNextPostCount($check);
@ -883,7 +884,7 @@ class BoardController extends Controller {
$next = 0;
}
$add = DB::table('for_posts')
->insert([
->insertGetId([
'top_id' => $request->top_id,
'user_id' => $check,
'post_date' => time(),
@ -894,9 +895,9 @@ class BoardController extends Controller {
'delreason' => '',
'nolayout' => $request->nolayout,
'postcount' => $next
]);
]);
return \Response::json($add);
return $this->browseTopicPosts('p', $add, 0, 15, $request);
}
else {
return 'Permission denied.';