From 679d4af0c64f2f84ccfff3639a0f8ef67a9d0ada Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 24 Jul 2016 17:42:14 +0900 Subject: [PATCH 1/3] Automatically generate notify ID if not given --- modules/ncenterlite/ncenterlite.controller.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index 553817518..821ac4ff7 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -993,7 +993,11 @@ class ncenterliteController extends ncenterlite return new Object(); } - + // 노티 ID가 없는 경우 자동 생성 + if (!$args->notify) + { + $args->notify = $this->_getNotifyId($args); + } if($anonymous == TRUE) { From 3245c3ae46cd7dc935ec52e7f56b401a39c91007 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 24 Jul 2016 17:49:23 +0900 Subject: [PATCH 2/3] Add X, Y, Z notification types for customization --- modules/ncenterlite/ncenterlite.model.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/modules/ncenterlite/ncenterlite.model.php b/modules/ncenterlite/ncenterlite.model.php index 2e5f1ba44..7794d386f 100644 --- a/modules/ncenterlite/ncenterlite.model.php +++ b/modules/ncenterlite/ncenterlite.model.php @@ -328,6 +328,26 @@ class ncenterliteModel extends ncenterlite $type = $lang->ncenterlite_type_test; break; + // Custom string. + case 'X': + return $notification->target_body; + + // Custom language. + case 'Y': + return $lang->{$notification->target_body}; + + // Custom language with string interpolation. + case 'Z': + return vsprintf($lang->{$notification->target_body}, array( + $notification->target_member_srl, // %1$d + $notification->target_nick_name, // %2$s + $notification->target_user_id, // %3$s + $notification->target_email_address, // %4$s + $notification->target_browser, // %5$s + $notification->target_summary, // %6$s + $notification->target_url, // %7$s + )); + // Other. case 'U': default: From 6a9681622c3506bd8d051a57e86a15f2f460da30 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 24 Jul 2016 18:02:04 +0900 Subject: [PATCH 3/3] Also auto-generate the regdate field if it is empty --- modules/ncenterlite/ncenterlite.controller.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index 821ac4ff7..fb50a53c3 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -998,6 +998,12 @@ class ncenterliteController extends ncenterlite { $args->notify = $this->_getNotifyId($args); } + + // 날짜가 없는 경우 자동 생성 + if (!$args->regdate) + { + $args->regdate = date('YmdHis'); + } if($anonymous == TRUE) {