fix register error
This commit is contained in:
parent
a5a5278bf7
commit
9b67be638b
1 changed files with 8 additions and 13 deletions
|
|
@ -11,10 +11,6 @@ class HashtagAddon extends Addon
|
|||
public $addonPath;
|
||||
public $addonFile;
|
||||
|
||||
/**
|
||||
* 애드온 생성자입니다.
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
|
@ -23,6 +19,7 @@ class HashtagAddon extends Addon
|
|||
{
|
||||
$that = $this;
|
||||
|
||||
// database creation
|
||||
EventHAndler::addEventHandler(
|
||||
"amber.load_config_after",
|
||||
function ($args = null) {
|
||||
|
|
@ -62,8 +59,8 @@ class HashtagAddon extends Addon
|
|||
|
||||
EventHandler::addEventHandler(
|
||||
"gnuboard.bbs.write_update_document_create",
|
||||
function ($args = null) use ($that) {
|
||||
$that->writeUpdateDocumentUpdate($args);
|
||||
function () use ($that) {
|
||||
$that->writeUpdateDocumentUpdate();
|
||||
}
|
||||
,
|
||||
10
|
||||
|
|
@ -71,8 +68,8 @@ class HashtagAddon extends Addon
|
|||
|
||||
EventHandler::addEventHandler(
|
||||
"gnuboard.bbs.write_update_document_update",
|
||||
function ($args = null) use ($that) {
|
||||
$that->writeUpdateDocumentUpdate($args);
|
||||
function () use ($that) {
|
||||
$that->writeUpdateDocumentUpdate();
|
||||
}
|
||||
,
|
||||
10
|
||||
|
|
@ -100,6 +97,7 @@ class HashtagAddon extends Addon
|
|||
public function delete_hashtags($bo_table, $wr_id)
|
||||
{
|
||||
global $g5;
|
||||
sql_query("DELETE FROM {$g5['hashtag_posts_table']} WHERE `post_id` = 0");
|
||||
sql_query("DELETE FROM {$g5['hashtag_posts_table']} WHERE `board_id` = '{$bo_table}' AND `post_id` = '{$wr_id}'");
|
||||
$sql = "SELECT h.srl, COUNT(hp.srl) AS count
|
||||
FROM {$g5['hashtags_table']} h
|
||||
|
|
@ -134,9 +132,9 @@ class HashtagAddon extends Addon
|
|||
}
|
||||
}
|
||||
|
||||
public function writeUpdateDocumentUpdate($data)
|
||||
public function writeUpdateDocumentUpdate()
|
||||
{
|
||||
global $is_admin;
|
||||
global $is_admin, $bo_table, $wr_id;
|
||||
|
||||
if ($is_admin) {
|
||||
$wr_content = '';
|
||||
|
|
@ -145,9 +143,6 @@ class HashtagAddon extends Addon
|
|||
$wr_content = preg_replace("#[\\\]+$#", "", $wr_content);
|
||||
}
|
||||
|
||||
$bo_table = isset($data[0]) ? $data[0] : '';
|
||||
$wr_id = isset($data[2]) ? $data[2] : '';
|
||||
|
||||
$this->proc_hashtags($bo_table, $wr_id, $wr_content);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue