mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Support hash and space as valid tag separators
https://xetown.com/questions/1728094 - 해시(#) 문자와 공백도 태그 구분자로 사용할 수 있도록 지원 - 해시는 기본 지원하며, 공백은 기본 OFF - tag 모듈 설정에서 커스터마이징 가능 - document 모듈 이외의 자료에서 태그 기능 구현한 경우 적용되지 않을 수 있음
This commit is contained in:
parent
e821955129
commit
38900d4b2d
8 changed files with 242 additions and 47 deletions
|
|
@ -7,6 +7,34 @@
|
|||
*/
|
||||
class tagAdminController extends tag
|
||||
{
|
||||
/**
|
||||
* Save admin config.
|
||||
*/
|
||||
public function procTagAdminInsertConfig()
|
||||
{
|
||||
$config = new stdClass;
|
||||
$vars = Context::getRequestVars();
|
||||
|
||||
$config->separators = [];
|
||||
foreach ($vars->separators ?? [] as $val)
|
||||
{
|
||||
if (in_array($val, ['comma', 'hash', 'space']))
|
||||
{
|
||||
$config->separators[] = $val;
|
||||
}
|
||||
}
|
||||
|
||||
$oModuleController = ModuleController::getInstance();
|
||||
$output = $oModuleController->insertModuleConfig($this->module, $config);
|
||||
if (!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
$this->setMessage('success_registed');
|
||||
$this->setRedirectUrl(Context::get('success_return_url'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Delete all tags for a particular module
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue