Code Duplication    Length = 7-7 lines in 2 locations

class/User.php 1 location

@@ 292-298 (lines=7) @@
289
        $sql    = 'SELECT userid FROM ' . $GLOBALS['xoopsDB']->prefix('smallworld_user') . ' ORDER BY userid';
290
        $result = $GLOBALS['xoopsDB']->queryF($sql);
291
        $i      = $GLOBALS['xoopsDB']->getRowsNum($result);
292
        if (0 !== $i) {
293
            $data = [];
294
            while (false !== ($r = $GLOBALS['xoopsDB']->fetchArray($result))) {
295
                $data[] = $r;
296
            }
297
            $retVal = smallworld_array_flatten($data, 0);
298
        }
299
300
        return $retVal;
301
        //redirect_header(XOOPS_URL . "/modules/smallworld/register.php");

class/WallUpdates.php 1 location

@@ 267-273 (lines=7) @@
264
        $query  = 'SELECT you FROM ' . $GLOBALS['xoopsDB']->prefix('smallworld_followers') . " WHERE me = '" . $me . "'";
265
        $result = $GLOBALS['xoopsDB']->queryF($query);
266
        $i      = $GLOBALS['xoopsDB']->getRowsNum($result);
267
        if (0 == $i) {
268
            $data = [$me];
269
        } else {
270
            while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
271
                $data[] = $row;
272
            }
273
        }
274
275
        return $data;
276
    }