Code Duplication    Length = 13-14 lines in 2 locations

class/Utility.php 1 location

@@ 1103-1116 (lines=14) @@
1100
     * @param  int $start
1101
     * @return array
1102
     */
1103
public static function getAuthors($limit = 0, $start = 0)
1104
{
1105
    global $xoopsDB;
1106
1107
    $ret    = array();
1108
    $sql    = 'SELECT DISTINCT(uid) AS uid FROM ' . $xoopsDB->prefix('lxentries') . ' WHERE offline = 0 ';
1109
    $sql    .= ' ORDER BY uid';
1110
    $result = $xoopsDB->query($sql);
1111
    while ($myrow = $xoopsDB->fetchArray($result)) {
1112
        $ret[] = $myrow['uid'];
1113
    }
1114
1115
    return $ret;
1116
}
1117
1118
    // link to userprofile
1119
    /**

include/functions.php 1 location

@@ 661-673 (lines=13) @@
658
}
659
660
// Returns the author's IDs for authorslist
661
function lx_getAuthors($limit=0, $start=0) {
662
    global $xoopsDB ;
663
664
    $ret = array();
665
    $sql = 'SELECT distinct(uid) as uid FROM '.$xoopsDB->prefix('lxentries').' WHERE offline = 0 ';
666
    $sql .= " ORDER BY uid";
667
    $result = $xoopsDB->query($sql);
668
    while ( $myrow = $xoopsDB->fetchArray($result) ) {
669
        $ret[] = $myrow['uid'];
670
    }
671
672
    return $ret;
673
}
674
675
// link to userprofile
676
function lx_getLinkedProfileFromId($userid) {