Code Duplication    Length = 4-5 lines in 2 locations

include/class_field.php 1 location

@@ 62-66 (lines=5) @@
59
        $fields = array();
60
        $result = $GLOBALS['xoopsDB']->query($SQL);
61
        $count  = 0;
62
        while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
63
            $fields[] = $row['Id'];
64
            ++$count;
65
            $configValues[] = $row;
66
        }
67
        $this->configValues = isset($configValues) ? $configValues : '';
68
        //print_r ($this->configValues); die();
69
        return $fields;

tools.php 1 location

@@ 489-492 (lines=4) @@
486
    //find next id
487
    $sql    = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " WHERE isActive = '1' ORDER BY `order`";
488
    $result = $GLOBALS['xoopsDB']->query($sql);
489
    while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
490
        $valorder[] = $row['order'];
491
        $valid[]    = $row['Id'];
492
    }
493
    foreach ($valid as $key => $value) {
494
        //find current ID location
495
        if ($value == $field) {