Code Duplication    Length = 6-12 lines in 5 locations

admin/functions.php 1 location

@@ 460-465 (lines=6) @@
457
    } 
458
    echo "</select></div>";
459
}
460
function uchr($a) {
461
    if (is_scalar($a)) $a= func_get_args();
462
    $str= '';
463
    foreach ($a as $code) $str.= html_entity_decode('&#'.$code.';',ENT_NOQUOTES,'UTF-8');
464
    return $str;
465
}

blocks/entries_initial.php 1 location

@@ 14-19 (lines=6) @@
11
 * @param $options
12
 * @return array
13
 */
14
function uchr($a) {
15
    if (is_scalar($a)) $a= func_get_args();
16
    $str= '';
17
    foreach ($a as $code) $str.= html_entity_decode('&#'.$code.';',ENT_NOQUOTES,'UTF-8');
18
    return $str;
19
} 
20
function b_lxentries_alpha_show($options)
21
{
22
    global $xoopsDB, $xoopsUser, $xoopsModule;

class/Utility.php 2 locations

@@ 331-336 (lines=6) @@
328
     * @return array
329
     * 
330
     */
331
function uchr($a) {
332
    if (is_scalar($a)) $a= func_get_args();
333
    $str= '';
334
    foreach ($a as $code) $str.= html_entity_decode('&#'.$code.';',ENT_NOQUOTES,'UTF-8');
335
    return $str;
336
}
337
public static function getAlphaArray() 
338
{   
339
    global $xoopsUser, $xoopsDB, $xoopsModule;
@@ 404-415 (lines=12) @@
401
     * @param $initials
402
     * @return string
403
     */
404
public static function getUchr($initials)
405
{
406
    if (is_scalar($initials)) {
407
        $initials = func_get_args();
408
    }
409
    $str = '';
410
    foreach ($initials as $init) {
411
        $str .= html_entity_decode('&#' . $init . ';', ENT_NOQUOTES, 'UTF-8');
412
    }
413
414
    return $str;
415
}
416
417
    /* sample */
418
    /*

include/functions.php 1 location

@@ 188-194 (lines=7) @@
185
 * don't take credit for this.
186
 *
187
 */
188
function lx_uchr ($initials) {
189
    if (is_scalar($initials)) $initials= func_get_args();
190
    $str= '';
191
    foreach ($initials as $init) $str.= html_entity_decode('&#'.$init.';',ENT_NOQUOTES,'UTF-8');
192
193
    return $str;
194
}
195
/* sample */
196
/*
197
    echo lx_uchr(23383); echo '<br/>';