| @@ 1818-1846 (lines=29) @@ | ||
| 1815 | /** |
|
| 1816 | * @brief Get skin information of the module |
|
| 1817 | */ |
|
| 1818 | function getModuleSkinVars($module_srl) |
|
| 1819 | { |
|
| 1820 | $skin_vars = false; |
|
| 1821 | $oCacheHandler = CacheHandler::getInstance('object', null, true); |
|
| 1822 | if($oCacheHandler->isSupport()) |
|
| 1823 | { |
|
| 1824 | $object_key = 'module_skin_vars:'.$module_srl; |
|
| 1825 | $cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key); |
|
| 1826 | $skin_vars = $oCacheHandler->get($cache_key); |
|
| 1827 | } |
|
| 1828 | ||
| 1829 | if($skin_vars === false) |
|
| 1830 | { |
|
| 1831 | $args = new stdClass(); |
|
| 1832 | $args->module_srl = $module_srl; |
|
| 1833 | $output = executeQueryArray('module.getModuleSkinVars',$args); |
|
| 1834 | if(!$output->toBool()) return; |
|
| 1835 | ||
| 1836 | $skin_vars = array(); |
|
| 1837 | foreach($output->data as $vars) |
|
| 1838 | { |
|
| 1839 | $skin_vars[$vars->name] = $vars; |
|
| 1840 | } |
|
| 1841 | ||
| 1842 | if($oCacheHandler->isSupport()) $oCacheHandler->put($cache_key, $skin_vars); |
|
| 1843 | } |
|
| 1844 | ||
| 1845 | return $skin_vars; |
|
| 1846 | } |
|
| 1847 | ||
| 1848 | /** |
|
| 1849 | * Get default skin name |
|
| @@ 1933-1961 (lines=29) @@ | ||
| 1930 | * @param $module_srl Sequence of module |
|
| 1931 | * @return array |
|
| 1932 | */ |
|
| 1933 | function getModuleMobileSkinVars($module_srl) |
|
| 1934 | { |
|
| 1935 | $skin_vars = false; |
|
| 1936 | $oCacheHandler = CacheHandler::getInstance('object', null, true); |
|
| 1937 | if($oCacheHandler->isSupport()) |
|
| 1938 | { |
|
| 1939 | $object_key = 'module_mobile_skin_vars:'.$module_srl; |
|
| 1940 | $cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key); |
|
| 1941 | $skin_vars = $oCacheHandler->get($cache_key); |
|
| 1942 | } |
|
| 1943 | ||
| 1944 | if($skin_vars === false) |
|
| 1945 | { |
|
| 1946 | $args = new stdClass(); |
|
| 1947 | $args->module_srl = $module_srl; |
|
| 1948 | $output = executeQueryArray('module.getModuleMobileSkinVars',$args); |
|
| 1949 | if(!$output->toBool() || !$output->data) return; |
|
| 1950 | ||
| 1951 | $skin_vars = array(); |
|
| 1952 | foreach($output->data as $vars) |
|
| 1953 | { |
|
| 1954 | $skin_vars[$vars->name] = $vars; |
|
| 1955 | } |
|
| 1956 | ||
| 1957 | if($oCacheHandler->isSupport()) $oCacheHandler->put($cache_key, $skin_vars); |
|
| 1958 | } |
|
| 1959 | ||
| 1960 | return $skin_vars; |
|
| 1961 | } |
|
| 1962 | ||
| 1963 | /** |
|
| 1964 | * Combine skin information with module information |
|