Code Duplication    Length = 5-7 lines in 2 locations

admin/category.php 1 location

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

class/faq.php 1 location

@@ 204-210 (lines=7) @@
201
            $myts = MyTextSanitizer:: getInstance();
202
            $ret  = $myts->displayTarea($ret);
203
        }
204
        if ($maxLength != 0) {
205
            if (!XOOPS_USE_MULTIBYTES) {
206
                if (strlen($ret) >= $maxLength) {
207
                    $ret = substr($ret, 0, $maxLength - 1) . '...';
208
                }
209
            }
210
        }
211
212
        return $ret;
213
    }