XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
message.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
8 class message extends ModuleObject
9 {
13  function moduleInstall()
14  {
15  return new BaseObject();
16  }
17 
21  function checkUpdate()
22  {
23  $oModuleModel = getModel('module');
25  $version_update_id = implode('.', array(__CLASS__, __XE_VERSION__, 'updated'));
26  if($oModuleModel->needUpdate($version_update_id))
27  {
28  $config = $oModuleModel->getModuleConfig('message');
29 
30  if($config->skin)
31  {
32  $config_parse = explode('.', $config->skin);
33  if (count($config_parse) > 1)
34  {
35  $template_path = sprintf('./themes/%s/modules/message/', $config_parse[0]);
36  if(is_dir($template_path)) return true;
37  }
38  }
39 
40  $oModuleController->insertUpdatedLog($version_update_id);
41  }
42 
43  return false;
44  }
45 
49  function moduleUpdate()
50  {
51  $oModuleModel = getModel('module');
53  $version_update_id = implode('.', array(__CLASS__, __XE_VERSION__, 'updated'));
54  if($oModuleModel->needUpdate($version_update_id))
55  {
56  $config = $oModuleModel->getModuleConfig('message');
57 
58  if($config->skin)
59  {
60  $config_parse = explode('.', $config->skin);
61  if (count($config_parse) > 1)
62  {
63  $template_path = sprintf('./themes/%s/modules/message/', $config_parse[0]);
64  if(is_dir($template_path))
65  {
66  $config->skin = implode('|@|', $config_parse);
68  $oModuleController->updateModuleConfig('message', $config);
69  }
70  }
71  }
72 
73  $oModuleController->insertUpdatedLog($version_update_id);
74  }
75  return new BaseObject();
76  }
77 
81  function recompileCache()
82  {
83  }
84 }
85 /* End of file message.class.php */
86 /* Location: ./modules/message/message.class.php */
$oModuleModel
Definition: ko.install.php:236
getController($module_name)
Definition: func.inc.php:90
const __XE_VERSION__
Definition: config.inc.php:32
$template_path
a path of directory where template files reside
high class of message module
moduleInstall()
Implement if additional tasks are necessary when installing.
checkUpdate()
a method to check if successfully installed
recompileCache()
Re-generate the cache file.
moduleUpdate()
Execute update.
getModel($module_name)
Definition: func.inc.php:145
$oModuleController
Definition: ko.install.php:287