From 8843f8b05d1bd51f41e78deb31d7d67d2b182f46 Mon Sep 17 00:00:00 2001 From: conory Date: Sat, 25 Feb 2017 20:46:38 +0900 Subject: [PATCH] =?UTF-8?q?=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=EC=8B=9C?= =?UTF-8?q?=20=EB=B0=9C=EC=83=9D=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8A=94?= =?UTF-8?q?=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95=20Uncaught=20TypeErr?= =?UTF-8?q?or:=20Argument=201=20passed=20to=20array=20first()=20must=20be?= =?UTF-8?q?=20of=20the=20type=20array?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/ncenterlite/ncenterlite.model.php | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/modules/ncenterlite/ncenterlite.model.php b/modules/ncenterlite/ncenterlite.model.php index 149b4d3a9..dbc51719e 100644 --- a/modules/ncenterlite/ncenterlite.model.php +++ b/modules/ncenterlite/ncenterlite.model.php @@ -11,14 +11,29 @@ class ncenterliteModel extends ncenterlite { $oModuleModel = getModel('module'); $config = $oModuleModel->getModuleConfig('ncenterlite'); - + if(!$config) { $config = new stdClass(); } - if(!$config->use) + + if(!is_array($config->use)) { - $config->use = array('message' => 1); + if($config->use != 'N') + { + $config->use = array( + 'mention' => array('web' => 1), + 'comment' => array('web' => 1), + 'comment_comment' => array('web' => 1), + 'vote' => array('web' => 1), + 'message' => array('web' => 1), + 'admin_content' => array('web' => 1), + ); + } + else + { + $config->use = array(); + } } else { @@ -32,8 +47,8 @@ class ncenterliteModel extends ncenterlite getController('module')->insertModuleConfig('ncenterlite', $config); } } + if(!$config->display_use) $config->display_use = 'all'; - if(!$config->mention_names) $config->mention_names = 'nick_name'; if(!$config->mention_suffixes) {