Files
aowow/endpoints/get-description/get-description.php
Sarjuuk fef27c58e6 Template/Update (Part 40)
* convert 'guides' (listing, viewing, writing & management)
 * don't allow comments on WIP guides
2025-09-25 15:58:56 +02:00

36 lines
803 B
PHP

<?php
namespace Aowow;
if (!defined('AOWOW_REVISION'))
die('illegal access');
class GetdescriptionBaseResponse extends TextResponse
{
protected string $contentType = MIME_TYPE_TEXT;
protected bool $requiresLogin = true;
protected array $expectedPOST = array(
'description' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkTextBlob']]
);
public function __construct(string $param)
{
if ($param) // should be empty
$this->generate404();
parent::__construct($param);
}
protected function generate() : void
{
if (!User::canWriteGuide())
return;
$this->result = GuideMgr::createDescription($this->_post['description']);
}
}
?>