Code Duplication    Length = 6-7 lines in 2 locations

class/SmallWorldDB.php 1 location

@@ 660-665 (lines=6) @@
657
                               ]);
658
            $this->saveSettings($userid, $posts);
659
            $this->GetSettings($userid);
660
        } else {
661
            while ($row = $xoopsDB->fetchArray($result)) {
662
                $data = $row['value'];
663
            }
664
            return json_encode(unserialize(stripslashes($data)));
665
        }
666
    }
667
}
668

class/SwDatabase.php 1 location

@@ 784-790 (lines=7) @@
781
            );
782
            $this->saveSettings($userid, $posts);
783
            $retVal = $this->getSettings($userid);
784
        } else {
785
            while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
786
                $data = $row['value'];
787
            }
788
789
            $retVal = json_encode(unserialize(stripslashes($data)));
790
        }
791
792
        return $retVal;
793
    }