Code Duplication    Length = 6-8 lines in 3 locations

class/files/user/UserPrint.php 1 location

@@ 100-105 (lines=6) @@
97
        foreach (array_keys($fields) as $f) {
98
            $fieldName = $fields[$f]->getVar('field_name');
99
            $rpFieldName = $fieldName;
100
            if (strpos($fieldName, '_')) {
101
                $str = strpos($fieldName, '_');
102
                if ($str !== false) {
103
                    $rpFieldName = substr($fieldName, $str + 1, strlen($fieldName));
104
                }
105
            }
106
            $lpFieldName = substr($fieldName, 0, strpos($fieldName, '_'));
107
            if ((0 == $f) && (1 == $this->table->getVar('table_autoincrement'))) {
108
                $fieldId = $fieldName;

class/files/user/UserRss.php 1 location

@@ 99-104 (lines=6) @@
96
        foreach (array_keys($fields) as $f) {
97
            $fieldName = $fields[$f]->getVar('field_name');
98
            $rpFieldName = $fieldName;
99
            if (strpos($fieldName, '_')) {
100
                $str = strpos($fieldName, '_');
101
                if ($str !== false) {
102
                    $rpFieldName = substr($fieldName, $str + 1, strlen($fieldName));
103
                }
104
            }
105
            $lpFieldName = substr($fieldName, 0, strpos($fieldName, '_'));
106
            if (0 == $f) {
107
                $fieldId = $fieldName;

class/files/TDMCreateFile.php 1 location

@@ 386-393 (lines=8) @@
383
     */
384
    public function getRightString($string)
385
    {
386
        if (strpos($string, '_')) {
387
            $str = strpos($string, '_');
388
            if ($str !== false) {
389
                $ret = substr($string, $str + 1, strlen($string));
390
391
                return $ret;
392
            }
393
        }
394
395
        return $string;
396
    }