/** * Return true if xml property is valid * textbox1 passed by reference for efficiency; don't change it */ protected function validateData(&$textbox1) { global $wgUser; if (!StructuredData::titleStringHasId($this->titleString)) { return false; } if (ESINHandler::hasAmbiguousDates($this->xml)) { return false; } if (!StructuredData::isRedirect($textbox1)) { $parentFamilies = StructuredData::getTitlesAsArray($this->xml->child_of_family); $spouseFamilies = StructuredData::getTitlesAsArray($this->xml->spouse_of_family); return !ESINHandler::isLiving($this->xml) && strlen((string) $this->xml->gender) > 0 && !StructuredData::titlesOverlap($parentFamilies, $spouseFamilies) && ($this->isGedcomPage || !StructuredData::titlesMissingId($parentFamilies)) && ($this->isGedcomPage || !StructuredData::titlesMissingId($spouseFamilies)) && ($wgUser->isAllowed('patrol') || StructuredData::titlesExist(NS_FAMILY, $parentFamilies)) && ($wgUser->isAllowed('patrol') || StructuredData::titlesExist(NS_FAMILY, $spouseFamilies)); } return true; }