mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
* a guide is a wrapper around an article providing management tools. * administration is limited to the review process. Needs to be expanded. * articles on DB pages are seperate. Editor will be added in the future.
36 lines
770 B
PHP
36 lines
770 B
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
class AjaxGetdescription extends AjaxHandler
|
|
{
|
|
protected $_post = array(
|
|
'description' => [FILTER_CALLBACK, ['options' => 'AjaxHandler::checkFulltext']]
|
|
);
|
|
|
|
public function __construct(array $params)
|
|
{
|
|
parent::__construct($params);
|
|
|
|
if (!$params || $params[0]) // should be empty
|
|
return;
|
|
|
|
$this->handler = 'handleDescription';
|
|
}
|
|
|
|
protected function handleDescription() : string
|
|
{
|
|
$this->contentType = MIME_TYPE_TEXT;
|
|
|
|
if (!User::$id)
|
|
return '';
|
|
|
|
$desc = (new Markup($this->_post['description']))->stripTags();
|
|
|
|
return Lang::trimTextClean($desc, 120);
|
|
}
|
|
}
|
|
|
|
?>
|