Code Duplication    Length = 16-27 lines in 2 locations

class/Utility.php 1 location

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

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) {