Code Duplication    Length = 16-27 lines in 2 locations

include/functions.php 1 location

@@ 800-815 (lines=16) @@
797
}
798
799
// link to userprofile
800
function lx_getLinkedProfileFromId($userid) {
801
    global $uid, $xoopsModule;
802
    $userid = intval($uid);
803
    if ($userid > 0) {
804
        $member_handler = xoops_gethandler('member');
805
        $user = $member_handler->getUser($userid);
806
        if (is_object($user)) {
807
            $linkeduser = '<a title="'._MD_LEXIKON_AUTHORPROFILETEXT.'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/profile.php?uid='.$uid.'">'. $user->getVar('uname').'</a>';
808
            //$linkeduser = XoopsUserUtility::getUnameFromId ( $uid );
809
            //$linkeduser .= '<div style=\'position:relative; right: 4px; top: 2px;\'><a title="'._MD_LEXIKON_AUTHORPROFILETEXT.'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/profile.php?uid='.$uid.'">'._MD_LEXIKON_AUTHORPROFILETEXT.'</a></div>';
810
            return $linkeduser;
811
        }
812
    }
813
814
    return $GLOBALS['xoopsConfig']['anonymous'];
815
}
816
817
// functionset to assign terms with accentuated or umlaut initials to the adequate initial
818
function lx_removeAccents($string) {

class/Utility.php 1 location

@@ 1139-1165 (lines=27) @@
1136
     * @param $userid
1137
     * @return string
1138
     */
1139
public static function getLinkedProfileFromId($userid)
1140
{
1141
    global $uid, $xoopsModule;
1142
    $userid = (int)$uid;
1143
    if ($userid > 0) {
1144
        $memberHandler = xoops_getHandler('member');
1145
        $user          = $memberHandler->getUser($userid);
1146
        if (is_object($user)) {
1147
            $linkeduser = '<A TITLE="'
1148
                              . _MD_LEXIKON_AUTHORPROFILETEXT
1149
                              . '" HREF="'
1150
                              . XOOPS_URL
1151
                              . '/modules/'
1152
                              . $xoopsModule->dirname()
1153
                              . '/profile.php?uid='
1154
                              . $uid
1155
                              . '">'
1156
                              . $user->getVar('uname')
1157
                              . '</a>';
1158
                //$linkeduser = XoopsUserUtility::getUnameFromId ( $uid );
1159
                //$linkeduser .= '<div style=\'position:relative; right: 4px; top: 2px;\'><A TITLE="'._MD_LEXIKON_AUTHORPROFILETEXT.'" HREF="'.XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/profile.php?uid='.$uid.'">'._MD_LEXIKON_AUTHORPROFILETEXT.'</a></div>';
1160
                return $linkeduser;
1161
        }
1162
    }
1163
1164
    return $GLOBALS['xoopsConfig']['anonymous'];
1165
}
1166
1167
    // functionset to assign terms with accentuated or umlaut initials to the adequate initial
1168
    /**