| @@ 29-52 (lines=24) @@ | ||
| 26 | * |
|
| 27 | * @return bool |
|
| 28 | */ |
|
| 29 | function checkUpdate() |
|
| 30 | { |
|
| 31 | $oModuleModel = getModel('module'); |
|
| 32 | $oModuleController = getController('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 | ||
| 54 | /** |
|
| 55 | * Execute update |
|
| @@ 21-44 (lines=24) @@ | ||
| 18 | /** |
|
| 19 | * @brief a method to check if successfully installed |
|
| 20 | */ |
|
| 21 | function checkUpdate() |
|
| 22 | { |
|
| 23 | $oModuleModel = getModel('module'); |
|
| 24 | $oModuleController = getController('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 | ||
| 46 | /** |
|
| 47 | * @brief Execute update |
|