| @@ 176-192 (lines=17) @@ | ||
| 173 | /** |
|
| 174 | * @return mixed |
|
| 175 | */ |
|
| 176 | public static function sf_getModuleConfig() |
|
| 177 | { |
|
| 178 | static $smartConfig; |
|
| 179 | if (!$smartConfig) { |
|
| 180 | global $xoopsModule; |
|
| 181 | if (isset($xoopsModule) && is_object($xoopsModule) && $xoopsModule->getVar('dirname') === 'smartfaq') { |
|
| 182 | global $xoopsModuleConfig; |
|
| 183 | $smartConfig = $xoopsModuleConfig; |
|
| 184 | } else { |
|
| 185 | $smartModule = sf_getModuleInfo(); |
|
| 186 | $hModConfig = xoops_getHandler('config'); |
|
| 187 | $smartConfig = $hModConfig->getConfigsByCat(0, $smartModule->getVar('mid')); |
|
| 188 | } |
|
| 189 | } |
|
| 190 | ||
| 191 | return $smartConfig; |
|
| 192 | } |
|
| 193 | ||
| 194 | /** |
|
| 195 | * @return string |
|
| @@ 36-52 (lines=17) @@ | ||
| 33 | /** |
|
| 34 | * @return mixed |
|
| 35 | */ |
|
| 36 | function sf_getModuleConfig() |
|
| 37 | { |
|
| 38 | static $smartConfig; |
|
| 39 | if (!$smartConfig) { |
|
| 40 | global $xoopsModule; |
|
| 41 | if (null !== ($xoopsModule) && is_object($xoopsModule) && $xoopsModule->getVar('dirname') === 'smartfaq') { |
|
| 42 | global $xoopsModuleConfig; |
|
| 43 | $smartConfig = $xoopsModuleConfig; |
|
| 44 | } else { |
|
| 45 | $smartModule = sf_getModuleInfo(); |
|
| 46 | $hModConfig = xoops_getHandler('config'); |
|
| 47 | $smartConfig = $hModConfig->getConfigsByCat(0, $smartModule->getVar('mid')); |
|
| 48 | } |
|
| 49 | } |
|
| 50 | ||
| 51 | return $smartConfig; |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * @return string |
|