Code Duplication    Length = 4-4 lines in 3 locations

include/task.inc.php 1 location

@@ 176-179 (lines=4) @@
173
    global $XoopsTpl, $xoopsDB, $xoopsUser;
174
    $helper = Xnewsletter\Helper::getInstance();
175
176
    if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
177
        require_once XOOPS_ROOT_PATH . '/class/template.php';
178
        $xoopsTpl = new \XoopsTpl();
179
    }
180
181
    // get once template path
182
    $template_path = XNEWSLETTER_ROOT_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/templates/';

admin/admin_header.php 1 location

@@ 71-74 (lines=4) @@
68
    redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM);
69
}
70
71
if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
72
    require_once XOOPS_ROOT_PATH . '/class/template.php';
73
    $xoopsTpl = new \XoopsTpl();
74
}
75

include/functions.php 1 location

@@ 477-480 (lines=4) @@
474
    global $XoopsTpl;
475
    $helper = Xnewsletter\Helper::getInstance();
476
477
    if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
478
        require_once XOOPS_ROOT_PATH . '/class/template.php';
479
        $xoopsTpl = new \XoopsTpl();
480
    }
481
    // get template path
482
    $template_path = XNEWSLETTER_ROOT_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/templates/';
483
    if (!is_dir($template_path)) {