mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
32 lines
864 B
PHP
32 lines
864 B
PHP
<?php
|
|
|
|
namespace Aowow;
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
|
|
class AdminVideosActionEdittitleResponse extends TextResponse
|
|
{
|
|
use TrCommunityHelper;
|
|
|
|
protected int $requiredUserGroup = U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO;
|
|
|
|
protected array $expectedGET = array(
|
|
'id' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkIdListUnsigned']]
|
|
);
|
|
protected array $expectedPOST = array(
|
|
'title' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkTextLine']]
|
|
);
|
|
|
|
protected function generate() : void
|
|
{
|
|
if (!$this->assertGET('id'))
|
|
return;
|
|
|
|
$caption = $this->handleCaption($this->_post['title']);
|
|
|
|
DB::Aowow()->query('UPDATE ?_videos SET `caption` = ? WHERE `id` = ?d', $caption, $this->_get['id'][0]);
|
|
}
|
|
}
|