mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Remove trailing whitespace
This commit is contained in:
parent
c5267b42fd
commit
37b0d3a1e6
71 changed files with 806 additions and 806 deletions
|
|
@ -14,7 +14,7 @@ class tagAdminController extends tag
|
|||
{
|
||||
$config = new stdClass;
|
||||
$vars = Context::getRequestVars();
|
||||
|
||||
|
||||
$config->separators = [];
|
||||
foreach ($vars->separators ?? [] as $val)
|
||||
{
|
||||
|
|
@ -23,18 +23,18 @@ class tagAdminController extends tag
|
|||
$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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ class tagAdminView extends tag
|
|||
{
|
||||
$config = ModuleModel::getModuleConfig($this->module) ?: new stdClass;
|
||||
Context::set('tag_config', $config);
|
||||
|
||||
|
||||
$this->setTemplatePath($this->module_path . 'tpl');
|
||||
$this->setTemplateFile('config');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,27 +57,27 @@ class tag extends ModuleObject
|
|||
$oModuleController = getController('module');
|
||||
$oDB = &DB::getInstance();
|
||||
// 2007. 10. 17 document.insertDocument, updateDocument, deleteDocument trigger property for
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'tag', 'controller', 'triggerArrangeTag', 'before'))
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'tag', 'controller', 'triggerArrangeTag', 'before'))
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'tag', 'controller', 'triggerArrangeTag', 'before');
|
||||
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'tag', 'controller', 'triggerInsertTag', 'after'))
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'tag', 'controller', 'triggerInsertTag', 'after'))
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'tag', 'controller', 'triggerInsertTag', 'after');
|
||||
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'tag', 'controller', 'triggerArrangeTag', 'before'))
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'tag', 'controller', 'triggerArrangeTag', 'before'))
|
||||
$oModuleController->insertTrigger('document.updateDocument', 'tag', 'controller', 'triggerArrangeTag', 'before');
|
||||
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'tag', 'controller', 'triggerInsertTag', 'after'))
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'tag', 'controller', 'triggerInsertTag', 'after'))
|
||||
$oModuleController->insertTrigger('document.updateDocument', 'tag', 'controller', 'triggerInsertTag', 'after');
|
||||
|
||||
if(!$oModuleModel->getTrigger('document.deleteDocument', 'tag', 'controller', 'triggerDeleteTag', 'after'))
|
||||
if(!$oModuleModel->getTrigger('document.deleteDocument', 'tag', 'controller', 'triggerDeleteTag', 'after'))
|
||||
$oModuleController->insertTrigger('document.deleteDocument', 'tag', 'controller', 'triggerDeleteTag', 'after');
|
||||
// 2007. 10. 17 modules are deleted when you delete all registered triggers that add tag
|
||||
if(!$oModuleModel->getTrigger('module.deleteModule', 'tag', 'controller', 'triggerDeleteModuleTags', 'after'))
|
||||
$oModuleController->insertTrigger('module.deleteModule', 'tag', 'controller', 'triggerDeleteModuleTags', 'after');
|
||||
// tag in the index column of the table tag
|
||||
if(!$oDB->isIndexExists("tags","idx_tag"))
|
||||
if(!$oDB->isIndexExists("tags","idx_tag"))
|
||||
$oDB->addIndex("tags","idx_tag", array("document_srl","tag"));
|
||||
|
||||
|
||||
if(!$oModuleModel->getTrigger('document.moveDocumentModule', 'tag', 'controller', 'triggerMoveDocument', 'after'))
|
||||
{
|
||||
$oModuleController->insertTrigger('document.moveDocumentModule', 'tag', 'controller', 'triggerMoveDocument', 'after');
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class tagController extends tag
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$tag_list = tagModel::splitString($obj->tags ?? '');
|
||||
if (count($tag_list))
|
||||
{
|
||||
|
|
@ -30,7 +30,7 @@ class tagController extends tag
|
|||
|
||||
/**
|
||||
* Replace all tags belonging to a document with a new list of tags.
|
||||
*
|
||||
*
|
||||
* @param object $obj
|
||||
* @return BaseObject
|
||||
*/
|
||||
|
|
@ -67,7 +67,7 @@ class tagController extends tag
|
|||
|
||||
/**
|
||||
* Delete all tags belonging to a document.
|
||||
*
|
||||
*
|
||||
* @param object $obj
|
||||
* @return BaseObject
|
||||
*/
|
||||
|
|
@ -96,7 +96,7 @@ class tagController extends tag
|
|||
$oTagController = getAdminController('tag');
|
||||
return $oTagController->deleteModuleTags($obj->module_srl);
|
||||
}
|
||||
|
||||
|
||||
function triggerMoveDocument($obj)
|
||||
{
|
||||
executeQuery('tag.updateTagModule', $obj);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class tagModel extends tag
|
|||
*/
|
||||
protected static $_separator_list = null;
|
||||
protected static $_separator_regexp = null;
|
||||
|
||||
|
||||
/**
|
||||
* Generate and cache separator list and regexp.
|
||||
*/
|
||||
|
|
@ -27,7 +27,7 @@ class tagModel extends tag
|
|||
{
|
||||
self::$_separator_list = ['comma', 'hash'];
|
||||
}
|
||||
|
||||
|
||||
$regexp = '/[';
|
||||
$regexp_map = [
|
||||
'comma' => ',',
|
||||
|
|
@ -39,13 +39,13 @@ class tagModel extends tag
|
|||
$regexp .= $regexp_map[$separator];
|
||||
}
|
||||
$regexp .= ']+/';
|
||||
|
||||
|
||||
self::$_separator_regexp = $regexp;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Split a string of tags into an array.
|
||||
*
|
||||
*
|
||||
* @param string $str
|
||||
* @return array
|
||||
*/
|
||||
|
|
@ -55,14 +55,14 @@ class tagModel extends tag
|
|||
{
|
||||
self::_generateSeparatorConfig();
|
||||
}
|
||||
|
||||
|
||||
// Clean up the input string.
|
||||
$str = trim(utf8_normalize_spaces(utf8_clean($str)));
|
||||
if ($str === '')
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
// Split the input string and collect non-empty fragments.
|
||||
$fragments = preg_split(self::$_separator_regexp, $str, -1, PREG_SPLIT_NO_EMPTY);
|
||||
$tags = [];
|
||||
|
|
@ -74,11 +74,11 @@ class tagModel extends tag
|
|||
$tags[strtolower($fragment)] = $fragment;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Return a list of valid fragments with no duplicates.
|
||||
return array_values(array_unique($tags));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Imported Tag List
|
||||
* Many of the specified module in order to extract the number of tags
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue