Code Duplication    Length = 7-7 lines in 3 locations

index.php 1 location

@@ 42-48 (lines=7) @@
39
    return '0';
40
}
41
42
if (!function_exists('mb_ucfirst') && function_exists('mb_substr')) {
43
   function mb_ucfirst($string) {  
44
   $string = mb_ereg_replace("^[\ ]+","", $string);  
45
   $string = mb_strtoupper(mb_substr($string, 0, 1, "UTF-8"), "UTF-8").mb_substr($string, 1, mb_strlen($string), "UTF-8" );  
46
   return $string;  
47
   }  
48
} 
49
50
// Counts
51
$xoopsTpl->assign('multicats', (int)$xoopsModuleConfig['multicats']);

letter.php 1 location

@@ 44-50 (lines=7) @@
41
list($howmanyother) = $xoopsDB->fetchRow($xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('lxentries') . " WHERE init = '#' AND offline ='0' " . $catperms . ''));
42
$xoopsTpl->assign('totalother', $howmanyother);
43
44
if (!function_exists('mb_ucfirst') && function_exists('mb_substr')) {
45
   function mb_ucfirst($string) {  
46
   $string = mb_ereg_replace("^[\ ]+","", $string);  
47
   $string = mb_strtoupper(mb_substr($string, 0, 1, "UTF-8"), "UTF-8").mb_substr($string, 1, mb_strlen($string), "UTF-8" );  
48
   return $string;  
49
   }  
50
}
51
52
53
// To display the list of categories

submit.php 1 location

@@ 41-47 (lines=7) @@
38
    $op = trim('edit');
39
}
40
41
if (!function_exists('mb_ucfirst') && function_exists('mb_substr')) {
42
   function mb_ucfirst($string) {  
43
   $string = mb_ereg_replace("^[\ ]+","", $string);  
44
   $string = mb_strtoupper(mb_substr($string, 0, 1, "UTF-8"), "UTF-8").mb_substr($string, 1, mb_strlen($string), "UTF-8" );  
45
   return $string;  
46
   }  
47
}
48
49
//$suggest = isset($_GET['suggest']) ? $_GET['suggest'] : (isset($_POST['suggest']) ? $_POST['suggest'] : '');
50
$suggest = isset($_GET['suggest']) ? (int)((int)$_GET['suggest']) : 0;