Code Duplication    Length = 11-11 lines in 2 locations

class/APCal.php 2 locations

@@ 808-818 (lines=11) @@
805
            // ����٥�Ȱʳ��ν���
806
            $result = $GLOBALS['xoopsDB']->query("SELECT summary,id,start,location,contact,gmlat,gmlong FROM $this->table WHERE admission > 0 AND start >= $range_start_s AND start < $range_end_s AND ($whr_categories) AND ($whr_class) AND allday <= 0");
807
            while (list($title, $id, $server_time, $location, $contact, $gmlat, $gmlong) = $GLOBALS['xoopsDB']->fetchRow($result)) {
808
                if ($mode === 'NO_YEAR' && ($gmlat > 0 || $gmlong > 0)) {
809
                    $this->gmPoints[] = array(
810
                        'summary'   => $title,
811
                        'gmlat'     => $gmlat,
812
                        'gmlong'    => $gmlong,
813
                        'location'  => $location,
814
                        'contact'   => $contact,
815
                        'startDate' => date('j', $server_time),
816
                        'event_id'  => $id
817
                    );
818
                }
819
                $user_time = $server_time + $tzoffset_s2u;
820
                if (date('n', $user_time) != $this->month) {
821
                    continue;
@@ 840-850 (lines=11) @@
837
                while ($start_s < $end_s) {
838
                    $user_time = $start_s + $tzoffset_s2u;
839
                    if (date('n', $user_time) == $this->month) {
840
                        if ($mode === 'NO_YEAR' && ($gmlat > 0 || $gmlong > 0)) {
841
                            $this->gmPoints[] = array(
842
                                'summary'   => $title,
843
                                'gmlat'     => $gmlat,
844
                                'gmlong'    => $gmlong,
845
                                'location'  => $location,
846
                                'contact'   => $contact,
847
                                'startDate' => date('j', $user_time),
848
                                'event_id'  => $id
849
                            );
850
                        }
851
                        $ret[date('j', $user_time)] = 1;
852
                    }
853
                    $start_s += 86400;