Code Duplication    Length = 3-3 lines in 6 locations

article.php 1 location

@@ 23-25 (lines=3) @@
20
$pathIcon16 = Xmf\Module\Admin::iconUrl('', 16);
21
22
$moduleDirName = $myts->htmlSpecialChars(basename(__DIR__));
23
if ($moduleDirName !== 'soapbox' && $moduleDirName !== '' && !preg_match('/^(\D+)(\d*)$/', $moduleDirName)) {
24
    echo('invalid dirname: ' . htmlspecialchars($moduleDirName, ENT_QUOTES));
25
}
26
//---GET view sort --
27
$sortname = isset($_GET['sortname']) ? strtolower(trim(strip_tags($myts->stripSlashesGPC($_GET['sortname'])))) : 'datesub';
28
if (!in_array($sortname, array('datesub', 'weight', 'counter', 'rating', 'headline'))) {

class/entrydata.php 1 location

@@ 22-24 (lines=3) @@
19
20
// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
21
$moduleDirName = basename(dirname(__DIR__));
22
if ($moduleDirName !== 'soapbox' && $moduleDirName !== '' && !preg_match('/^(\D+)(\d*)$/', $moduleDirName)) {
23
    echo('invalid dirname: ' . htmlspecialchars($this->mydirname));
24
}
25
require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/class/sbarticles.php';
26
require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/class/sbcolumns.php';
27
require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/class/sbvotedata.php';

class/entryget.php 2 locations

@@ 22-24 (lines=3) @@
19
20
// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
21
$moduleDirName = basename(dirname(__DIR__));
22
if ($moduleDirName !== 'soapbox' && $moduleDirName !== '' && !preg_match('/^(\D+)(\d*)$/', $moduleDirName)) {
23
    echo('invalid dirname: ' . htmlspecialchars($moduleDirName));
24
}
25
26
require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/class/sbarticles.php';
27
require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/class/sbcolumns.php';
@@ 81-83 (lines=3) @@
78
    {
79
        parent::__construct($db);
80
        $moduleDirName = basename(dirname(__DIR__));
81
        if ($moduleDirName !== 'soapbox' && $moduleDirName !== '' && !preg_match('/^(\D+)(\d*)$/', $moduleDirName)) {
82
            echo('invalid dirname: ' . htmlspecialchars($moduleDirName));
83
        }
84
        $this->sbArticleHandler = new SoapboxSbarticlesHandler($db);
85
        $this->sbColumnHandler  = new SoapboxSbcolumnsHandler($db);
86
        $this->sbVoteHandler    = new SoapboxSbvotedataHandler($db);

column.php 1 location

@@ 24-26 (lines=3) @@
21
require_once XOOPS_ROOT_PATH . '/header.php';
22
23
$moduleDirName = $myts->htmlSpecialChars(basename(__DIR__));
24
if ($moduleDirName !== 'soapbox' && $moduleDirName !== '' && !preg_match('/^(\D+)(\d*)$/', $moduleDirName)) {
25
    echo('invalid dirname: ' . htmlspecialchars($moduleDirName, ENT_QUOTES));
26
}
27
28
$columnID = Request::getInt('columnID', 0, 'GET');
29
//---GET view sort --

print.php 1 location

@@ 16-18 (lines=3) @@
13
include __DIR__ . '/header.php';
14
global $moduleDirName;
15
$moduleDirName = $myts->htmlSpecialChars(basename(__DIR__));
16
if ($moduleDirName !== 'soapbox' && $moduleDirName !== '' && !preg_match('/^(\D+)(\d*)$/', $moduleDirName)) {
17
    echo('invalid dirname: ' . htmlspecialchars($moduleDirName, ENT_QUOTES));
18
}
19
20
require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/cleantags.php';
21