Code Duplication    Length = 5-5 lines in 4 locations

admin/categories.php 2 locations

@@ 702-706 (lines=5) @@
699
    } else {
700
        $p_showpopular = 0;
701
    }
702
    if (isset($_POST['descr'])) {
703
        $p_descr = $myts->makeTareaData4Save($_POST['descr']);
704
    } else {
705
        $p_descr = false;
706
    }
707
    if ($_POST['xoops_upload_file'][0] != '') {
708
        require_once XOOPS_ROOT_PATH . "/modules/$moddir/class/class.uploader.php";
709
        $uploader = new XoopsMediaUploader(XOOPS_ROOT_PATH . "/modules/$moddir/init_uploads", array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png', 'image/jpg'), 30000, 250, 250);
@@ 809-813 (lines=5) @@
806
    } else {
807
        $p_showpopular = 0;
808
    }
809
    if (isset($_POST['descr'])) {
810
        $p_descr = $myts->makeTareaData4Save($_POST['descr']);
811
    } else {
812
        $p_descr = '';
813
    }
814
815
    if ($_POST['xoops_upload_file'][0] != '') {
816
        require_once XOOPS_ROOT_PATH . "/modules/$moddir/class/class.uploader.php";

admin/directories.php 1 location

@@ 158-162 (lines=5) @@
155
    } else {
156
        $p_open = '0';
157
    }
158
    if (isset($_POST['descr'])) {
159
        $p_descr = $myts->makeTareaData4Save($_POST['descr']);
160
    } else {
161
        $p_descr = '';
162
    }
163
    if ($_POST['xoops_upload_file'][0] != '') {
164
        require_once __DIR__ . '/../class/class.uploader.php';
165
        $uploader = new XoopsMediaUploader(XOOPS_ROOT_PATH . '/modules/' . $moddir . '/init_uploads', array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png', 'image/jpg'), 30000, 80, 80);

admin/fieldtypes.php 1 location

@@ 258-262 (lines=5) @@
255
    $p_pid         = (int)$_POST['pid'];
256
    $p_allowlist   = (int)$_POST['allowlist'];
257
    $p_showpopular = (int)$_POST['showpopular'];
258
    if (isset($_POST['descr'])) {
259
        $p_descr = $myts->makeTareaData4Save($_POST['descr']);
260
    } else {
261
        $p_descr = '';
262
    }
263
    $newid = $xoopsDB->genId($xoopsDB->prefix($xoopsModule->getVar('dirname', 'n') . '_cat') . '_cid_seq');
264
    $sql   = sprintf("INSERT INTO %s (cid, dirid, title, active, pid) VALUES (%u, %u, '%s', %u, %u)", $xoopsDB->prefix($xoopsModule->getVar('dirname', 'n') . '_cat'), $newid, $p_dirid, $p_title, $p_active, $p_pid);
265
    //echo $sql;