Code Duplication    Length = 7-7 lines in 2 locations

class/PublicWallUpdates.php 1 location

@@ 114-120 (lines=7) @@
111
                     . ") AND M.priv = '0'";
112
        }
113
114
        if ($last > 0) {
115
            $query .= ' order by created DESC LIMIT ' . $hm;
116
        } elseif ('a' == $last) {
117
            $query .= ' order by M.msg_id DESC LIMIT ' . $hm;
118
        } else {
119
            $query .= ' order by created DESC LIMIT ' . $hm;
120
        }
121
122
        $result = $xoopsDB->queryF($query);
123
        $count  = $xoopsDB->getRowsNum($result);

class/WallUpdates.php 1 location

@@ 98-104 (lines=7) @@
95
            }
96
        }
97
98
        if ($last > 0) {
99
            $query .= ' order by created DESC LIMIT ' . $hm;
100
        } elseif ('a' === $last) {
101
            $query .= ' order by M.msg_id DESC LIMIT ' . $hm;
102
        } else {
103
            $query .= ' order by created DESC LIMIT ' . $hm;
104
        }
105
        $result = $xoopsDB->queryF($query);
106
        $count  = $xoopsDB->getRowsNum($result);
107
        if (0 == $count) {