Code Duplication    Length = 16-27 lines in 2 locations

class/Utility.php 1 location

@@ 1123-1149 (lines=27) @@
1120
     * @param $userid
1121
     * @return string
1122
     */
1123
public static function getLinkedProfileFromId($userid)
1124
{
1125
    global $uid, $xoopsModule;
1126
    $userid = (int)$uid;
1127
    if ($userid > 0) {
1128
        $memberHandler = xoops_getHandler('member');
1129
        $user          = $memberHandler->getUser($userid);
1130
        if (is_object($user)) {
1131
            $linkeduser = '<A TITLE="'
1132
                              . _MD_LEXIKON_AUTHORPROFILETEXT
1133
                              . '" HREF="'
1134
                              . XOOPS_URL
1135
                              . '/modules/'
1136
                              . $xoopsModule->dirname()
1137
                              . '/profile.php?uid='
1138
                              . $uid
1139
                              . '">'
1140
                              . $user->getVar('uname')
1141
                              . '</a>';
1142
                //$linkeduser = XoopsUserUtility::getUnameFromId ( $uid );
1143
                //$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>';
1144
                return $linkeduser;
1145
        }
1146
    }
1147
1148
    return $GLOBALS['xoopsConfig']['anonymous'];
1149
}
1150
1151
    // functionset to assign terms with accentuated or umlaut initials to the adequate initial
1152
    /**

include/functions.php 1 location

@@ 676-691 (lines=16) @@
673
}
674
675
// link to userprofile
676
function lx_getLinkedProfileFromId($userid) {
677
    global $uid, $xoopsModule;
678
    $userid = intval($uid);
679
    if ($userid > 0) {
680
        $member_handler = xoops_gethandler('member');
681
        $user = $member_handler->getUser($userid);
682
        if (is_object($user)) {
683
            $linkeduser = '<A TITLE="'._MD_LEXIKON_AUTHORPROFILETEXT.'" HREF="'.XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/profile.php?uid='.$uid.'">'. $user->getVar('uname').'</a>';
684
            //$linkeduser = XoopsUserUtility::getUnameFromId ( $uid );
685
            //$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>';
686
            return $linkeduser;
687
        }
688
    }
689
690
    return $GLOBALS['xoopsConfig']['anonymous'];
691
}
692
693
// functionset to assign terms with accentuated or umlaut initials to the adequate initial
694
function lx_removeAccents($string) {