Subversion Repositories Applications.referentiel

Rev

Rev 254 | Rev 259 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 254 Rev 255
Line 938... Line 938...
938
	private function testerEpitheteInfraSpSyntaxe() {
938
	private function testerEpitheteInfraSpSyntaxe() {
939
		$noms_erreur = array();
939
		$noms_erreur = array();
940
		foreach ($this->noms as &$nom) {
940
		foreach ($this->noms as &$nom) {
941
			if ($nom['epithete_infra_sp'] != '') {
941
			if ($nom['epithete_infra_sp'] != '') {
942
				$mots = explode(' ', $nom['epithete_infra_sp']);
942
				$mots = explode(' ', $nom['epithete_infra_sp']);
-
 
943
				$hybride_contient_abbreviation_infra_sp = false;
-
 
944
				$formule_hybridite = (strpos($nom['epithete_infra_sp'], ' x ') !== false);				
943
				foreach ($mots as $mot) {
945
				foreach ($mots as $mot) {
-
 
946
					if($formule_hybridite && $this->verifierEstAbbreviationInfraSp($mot)) {
-
 
947
						$hybride_contient_abbreviation_infra_sp = true;
-
 
948
					}
-
 
949
					$formule_hybridite_valide = $this->verifierEpitheteGenre($mot) || $this->verifierEpitheteSp($mot) || $hybride_contient_abbreviation_infra_sp;
944
					if (!(preg_match('/^[+x]$/', $mot) || $this->verifierTypeEpithete($mot)|| $this->verifierEpitheteSp($mot))) {
950
					if (!(preg_match('/^[+x]$/', $mot) || $this->verifierTypeEpithete($mot) || $this->verifierEpitheteSp($mot) ||
-
 
951
						$formule_hybridite_valide)) {
945
						$epithete_traite = $this->repererEspace($nom['epithete_infra_sp']);
952
						$epithete_traite = $this->repererEspace($nom['epithete_infra_sp']);
946
						$noms_erreur[] = array($nom['num_nom'], $epithete_traite, $nom['exclure_taxref']);
953
						$noms_erreur[] = array($nom['num_nom'], $epithete_traite, $nom['exclure_taxref']);
947
						break;
954
						break;
948
					}
955
					}
949
				}
956
				}
-
 
957
				
-
 
958
				if($formule_hybridite && !$hybride_contient_abbreviation_infra_sp) {
-
 
959
					$epithete_traite = $this->repererEspace($nom['epithete_infra_sp']);
-
 
960
					$noms_erreur[] = array($nom['num_nom'], $epithete_traite, $nom['exclure_taxref']);
-
 
961
				}
950
			}
962
			}
951
		}
963
		}
952
		return $noms_erreur;
964
		return $noms_erreur;
953
	}
965
	}