Code Duplication    Length = 5-7 lines in 2 locations

admin/category.php 1 location

@@ 37-41 (lines=5) @@
34
{
35
    global $xoopsModule, $categoryHandler, $pathIcon16;
36
    $description = $categoryObj->description();
37
    if (!XOOPS_USE_MULTIBYTES) {
38
        if (strlen($description) >= 100) {
39
            $description = substr($description, 0, 100 - 1) . '...';
40
        }
41
    }
42
    $modify = "<a href='category.php?op=mod&categoryid=" . $categoryObj->categoryid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_EDITCOL . "' alt='" . _AM_SF_EDITCOL . "'></a>";
43
    $delete = "<a href='category.php?op=del&categoryid=" . $categoryObj->categoryid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETECOL . "' alt='" . _AM_SF_DELETECOL . "'></a>";
44

class/Faq.php 1 location

@@ 187-193 (lines=7) @@
184
            $myts = \MyTextSanitizer::getInstance();
185
            $ret  = $myts->displayTarea($ret);
186
        }
187
        if (0 != $maxLength) {
188
            if (!XOOPS_USE_MULTIBYTES) {
189
                if (strlen($ret) >= $maxLength) {
190
                    $ret = substr($ret, 0, $maxLength - 1) . '...';
191
                }
192
            }
193
        }
194
195
        return $ret;
196
    }