XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
integration_search.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
9 {
15  function moduleInstall()
16  {
17  // Registered in action forward
19  $oModuleController->insertActionForward('integration_search', 'view', 'IS');
20 
21  return new BaseObject();
22  }
23 
29  function checkUpdate()
30  {
31  $oModuleModel = getModel('module');
33  $version_update_id = implode('.', array(__CLASS__, __XE_VERSION__, 'updated'));
34  if($oModuleModel->needUpdate($version_update_id))
35  {
36  $config = $oModuleModel->getModuleConfig('integration_search');
37 
38  if($config->skin)
39  {
40  $config_parse = explode('.', $config->skin);
41  if(count($config_parse) > 1)
42  {
43  $template_path = sprintf('./themes/%s/modules/integration_search/', $config_parse[0]);
44  if(is_dir($template_path)) return true;
45  }
46  }
47 
48  $oModuleController->insertUpdatedLog($version_update_id);
49  }
50 
51  return false;
52  }
53 
59  function moduleUpdate()
60  {
61  $oModuleModel = getModel('module');
63  $version_update_id = implode('.', array(__CLASS__, __XE_VERSION__, 'updated'));
64  if($oModuleModel->needUpdate($version_update_id))
65  {
66  $config = $oModuleModel->getModuleConfig('message');
67 
68  if($config->skin)
69  {
70  $config_parse = explode('.', $config->skin);
71  if(count($config_parse) > 1)
72  {
73  $template_path = sprintf('./themes/%s/modules/integration_search/', $config_parse[0]);
74  if(is_dir($template_path))
75  {
76  $config->skin = implode('|@|', $config_parse);
78  $oModuleController->updateModuleConfig('integration_search', $config);
79  }
80  }
81  }
82 
83  $oModuleController->insertUpdatedLog($version_update_id);
84  }
85 
86  return new BaseObject(0, 'success_updated');
87  }
88 
94  function recompileCache()
95  {
96  }
97 }
98 /* End of file integration_search.class.php */
99 /* Location: ./modules/integration_search/integration_search.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
getModel($module_name)
Definition: func.inc.php:145
$oModuleController
Definition: ko.install.php:287