| @@ 90-97 (lines=8) @@ | ||
| 87 | $templateFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $folder); |
|
| 88 | if (is_dir($templateFolder)) { |
|
| 89 | $templateList = array_diff(scandir($templateFolder), array('..', '.')); |
|
| 90 | foreach ($templateList as $k => $v) { |
|
| 91 | $fileInfo = new SplFileInfo($templateFolder . $v); |
|
| 92 | if ($fileInfo->getExtension() === 'html' && $fileInfo->getFilename() !== 'index.html') { |
|
| 93 | if (file_exists($templateFolder . $v)) { |
|
| 94 | unlink($templateFolder . $v); |
|
| 95 | } |
|
| 96 | } |
|
| 97 | } |
|
| 98 | } |
|
| 99 | } |
|
| 100 | } |
|
| @@ 42-47 (lines=6) @@ | ||
| 39 | // remove old html template files |
|
| 40 | $template_directory = XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/templates/'; |
|
| 41 | $template_list = array_diff(scandir($template_directory), array('..', '.')); |
|
| 42 | foreach ($template_list as $k => $v) { |
|
| 43 | $fileinfo = new SplFileInfo($template_directory . $v); |
|
| 44 | if ($fileinfo->getExtension() === 'html' && $fileinfo->getFilename() !== 'index.html') { |
|
| 45 | @unlink($template_directory . $v); |
|
| 46 | } |
|
| 47 | } |
|
| 48 | ||
| 49 | xoops_load('xoopsfile'); |
|
| 50 | ||