ピンとロックを更新
このコミットが含まれているのは:
コミット
6fe496c8ec
|
@ -947,11 +947,18 @@ class BoardController extends Controller {
|
|||
$valid = $this->objAuth->getPermissions($request->username, $request->password);
|
||||
|
||||
if ($valid['for_locky'] == 1) {
|
||||
return DB::table('for_threads')
|
||||
$s = DB::table('for_threads')
|
||||
->select('lock')
|
||||
->where('id', $request->id)
|
||||
->first();
|
||||
|
||||
DB::table('for_threads')
|
||||
->where('id', $request->id)
|
||||
->update([
|
||||
'lock' => 1
|
||||
]);
|
||||
'lock' => ($s->lock == 0 ? 1 : 0)
|
||||
]);
|
||||
|
||||
return ($s->lock == 0 ? 1 : 0);
|
||||
}
|
||||
else {
|
||||
return 'Permission denied.';
|
||||
|
@ -1170,11 +1177,18 @@ class BoardController extends Controller {
|
|||
$valid = $this->objAuth->getPermissions($request->username, $request->password);
|
||||
|
||||
if ($valid['for_sticky'] == 1) {
|
||||
return DB::table('for_threads')
|
||||
$s = DB::table('for_threads')
|
||||
->select('sticky')
|
||||
->where('id', $request->id)
|
||||
->first();
|
||||
|
||||
DB::table('for_threads')
|
||||
->where('id', $request->id)
|
||||
->update([
|
||||
'sticky' => 1
|
||||
]);
|
||||
'sticky' => ($s->sticky == 0 ? 1 : 0)
|
||||
]);
|
||||
|
||||
return ($s->sticky == 0 ? 1 : 0);
|
||||
}
|
||||
else {
|
||||
return 'Permission denied.';
|
||||
|
|
新しいイシューから参照