Code Duplication    Length = 4-4 lines in 3 locations

admin/admin_header.php 1 location

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

include/functions.php 1 location

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

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
    // get template path
181
    $template_path = XNEWSLETTER_ROOT_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/templates/';
182
    if (!is_dir($template_path)) {