Code Duplication    Length = 5-7 lines in 2 locations

sources/find.queries.php 1 location

@@ 87-91 (lines=5) @@
84
            //build an array of personal folders ids
85
            array_push($arrayPf, $record['id']);
86
            //build also a string with those ids
87
            if (empty($listPf)) {
88
                $listPf = $record['id'];
89
            } else {
90
                $listPf .= ', '.$record['id'];
91
            }
92
        }
93
    }
94
}

sources/main.queries.php 1 location

@@ 712-718 (lines=7) @@
709
            );
710
            $number = DB::count();
711
            foreach ($rows as $record) {
712
                if (!empty($record['pw'])) {
713
                    if (empty($list)) {
714
                        $list = $record['id'];
715
                    } else {
716
                        $list .= ",".$record['id'];
717
                    }
718
                }
719
            }
720
721
            // change salt