33 if (
$module->getVar(
'version') == 100) {
34 $result =
$xoopsDB->query(
"SELECT t1.tpl_id FROM ".
$xoopsDB->prefix(
'tplfile').
" t1, ".
$xoopsDB->prefix(
'tplfile').
" t2 WHERE t1.tpl_module = t2.tpl_module AND t1.tpl_tplset=t2.tpl_tplset AND t1.tpl_file = t2.tpl_file AND t1.tpl_id > t2.tpl_id");
40 if (count($tplids) > 0) {
42 $duplicate_files = $tplfile_handler->getObjects(
new Criteria(
'tpl_id',
"(".implode(
',', $tplids).
")",
"IN"));
44 if (count($duplicate_files) > 0) {
45 foreach (array_keys($duplicate_files) as
$i) {
46 $tplfile_handler->delete($duplicate_files[$i]);