Code Duplication    Length = 10-11 lines in 2 locations

class/class.directory.php 2 locations

@@ 170-179 (lines=10) @@
167
     * @param array $idarray
168
     * @return array|bool
169
     */
170
    public function &getAllDirectoryIds($idarray = array())
171
    {
172
        $sql = 'SELECT dirid FROM ' . $this->db->prefix('efqdiralpha1_dir') . '';
173
        if (!$result = $this->db->query($sql)) {
174
            return false;
175
        }
176
        while (list($r_id) = $this->db->fetchRow($result)) {
177
            array_push($idarray, $r_id);
178
        }
179
180
        return $idarray;
181
    }
182
@@ 189-199 (lines=11) @@
186
     * @param array $arr
187
     * @return array|bool
188
     */
189
    public function &getAllDirectoryTitles($arr = array())
190
    {
191
        $sql = 'SELECT dirid, name FROM ' . $this->db->prefix('efqdiralpha1_dir') . '';
192
        if (!$result = $this->db->query($sql)) {
193
            return false;
194
        }
195
        while (list($r_id, $r_title) = $this->db->fetchRow($result)) {
196
            $result_arr[$r_id] = $r_title;
197
            //array_push($arr, $result_arr);
198
        }
199
200
        return $result_arr;
201
    }
202