Code Duplication    Length = 7-7 lines in 2 locations

include/oninstall.php 1 location

@@ 117-123 (lines=7) @@
114
    }
115
116
    //  ---  COPY blank.png FILES ---------------
117
    if (count($configurator->blankFiles) > 0) {
118
        $file = __DIR__ . '/../assets/images/blank.png';
119
        foreach (array_keys($configurator->blankFiles) as $i) {
120
            $dest = $configurator->blankFiles[$i] . '/blank.png';
121
            $classUtility::copyFile($file, $dest);
122
        }
123
    }
124
    //delete .html entries from the tpl table
125
    $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $xoopsModule->getVar('dirname', 'n') . "' AND `tpl_file` LIKE '%.html%'";
126
    $GLOBALS['xoopsDB']->queryF($sql);

include/onupdate.php 1 location

@@ 247-253 (lines=7) @@
244
    }
245
246
    //  ---  COPY blank.png FILES ---------------
247
    if (count($configurator->blankFiles) > 0) {
248
        $file = __DIR__ . '/../assets/images/blank.png';
249
        foreach (array_keys($configurator->blankFiles) as $i) {
250
            $dest = $configurator->blankFiles[$i] . '/blank.png';
251
            $classUtility::copyFile($file, $dest);
252
        }
253
    }
254
255
    //delete .html entries from the tpl table
256
    $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . '\' AND `tpl_file` LIKE \'%.html%\'';