public function count_repeats() {
        global $DB;
        if (!empty($this->properties->repeatid)) {
            $this->properties->eventrepeats = $DB->count_records('event',
                array('repeatid' => $this->properties->repeatid));
            // We don't want to count ourselves.
            $this->properties->eventrepeats--;
        }
        return $this->properties->eventrepeats;
    }
public function count_repeats() {
        global $DB;
        if (!empty($this->properties->repeatid)) {
            $this->properties->eventrepeats = $DB->count_records('event',
                array('repeatid' => $this->properties->repeatid));
            // We don't want to count ourselves.
            $this->properties->eventrepeats--;
        }
        return $this->properties->eventrepeats;
    }
public function count_repeats ( ) { global $ DB ; if ( ! empty ( $ this -> properties -> repeatid ) ) { $ this -> properties -> eventrepeats = $ DB -> count_records ( 'event' , array ( 'repeatid' => $ this -> properties -> repeatid ) ) ; // We don't want to count ourselves. $ this -> properties -> eventrepeats -- ; } return $ this -> properties -> eventrepeats ; }
Return the number of repeat events there are in this events series.

@return int number of event repeated
Return the number of repeat events there are in this events series .