Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 492 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 492 Rev 658
Line 107... Line 107...
107
		echo "\n";
107
		echo "\n";
108
	}
108
	}
Line 109... Line 109...
109
 
109
 
110
	public function chargerTxtDansWikiEflore() {
110
	public function chargerTxtDansWikiEflore() {
111
		$this->chargerIndex();
111
		$this->chargerIndex();
112
		$envoyes = array();
112
		$envoyes = array();
113
		foreach ($this->index as $nom) {
113
		foreach ($this->index as $nom) {
114
			$tagDsc = $nom['page_wiki_dsc'];
114
			$tagDsc = $nom['page_wiki_dsc'];
115
			if (isset($envoyes[$tagDsc]) == false) {
115
			if ($tagDsc != '' && isset($envoyes[$tagDsc]) == false) {
116
				$fichier = $this->dossierBase.self::DOSSIER_V2.'dsc/'.$tagDsc.'.txt';
116
				$fichier = $this->dossierBase.self::DOSSIER_V2.'dsc/'.$tagDsc.'.txt';
117
				if (file_exists($fichier) === true) {
117
				if (file_exists($fichier) === true) {
118
					$txt = file_get_contents($fichier);
118
					$txt = file_get_contents($fichier);
119
					$this->enregistrerPage($tagDsc, $txt);
119
					$this->enregistrerPage($tagDsc, $txt);
Line 122... Line 122...
122
					$this->messages->traiterErreur("Le fichier $fichier est introuvable.");
122
					$this->messages->traiterErreur("Le fichier $fichier est introuvable.");
123
				}
123
				}
124
			}
124
			}
Line 125... Line 125...
125
 
125
 
126
			$tagCle = $nom['page_wiki_cle'];
126
			$tagCle = $nom['page_wiki_cle'];
127
			if (isset($envoyes[$tagCle]) == false) {
127
			if ($tagCle != '' && isset($envoyes[$tagCle]) == false) {
128
				$fichier = $this->dossierBase.self::DOSSIER_V2.'cle/'.$tagCle.'.txt';
128
				$fichier = $this->dossierBase.self::DOSSIER_V2.'cle/'.$tagCle.'.txt';
129
				if (file_exists($fichier) === true) {
129
				if (file_exists($fichier) === true) {
130
					$txt = file_get_contents($fichier);
130
					$txt = file_get_contents($fichier);
131
					$this->enregistrerPage($tagCle, $txt);
131
					$this->enregistrerPage($tagCle, $txt);
Line 163... Line 163...
163
			$indentation = $this->getIndentationTxtLien($nom);
163
			$indentation = $this->getIndentationTxtLien($nom);
164
			$txtLien = $this->getTxtLienGenerique($nom);
164
			$txtLien = $this->getTxtLienGenerique($nom);
165
			$img = $nom['image'];
165
			$img = $nom['image'];
166
			$tagDsc = $nom['page_wiki_dsc'];
166
			$tagDsc = $nom['page_wiki_dsc'];
167
			if (isset($envoyes[$tagDsc]) == false) {
167
			if (isset($envoyes[$tagDsc]) == false) {
168
				$fichier = $this->dossierBase.self::DOSSIER_V2.'dsc/'.$tagDsc.'.txt';
168
				//$fichier = $this->dossierBase.self::DOSSIER_V2.'dsc/'.$tagDsc.'.txt';
169
				if ($nom['rang'] <= 180) {
169
				if ($nom['rang'] <= 180) {
170
					$pageIndexFamille .= "$indentation- [[$tagDsc $txtLien]]\n";
170
					$pageIndexFamille .= "$indentation- [[$tagDsc $txtLien]]\n";
171
				} elseif ($nom['rang'] == 220) {
171
				} elseif ($nom['rang'] == 220) {
172
					$pageIndexGenre .= "$indentation- [[$tagDsc $txtLien]]\n";
172
					$pageIndexGenre .= "$indentation- [[$tagDsc $txtLien]]\n";
173
				} else {
173
				} else {
Line 176... Line 176...
176
				$envoyes[$tagDsc] = 'OK';
176
				$envoyes[$tagDsc] = 'OK';
177
			}
177
			}
Line 178... Line 178...
178
 
178
 
179
			$tagCle = $nom['page_wiki_cle'];
179
			$tagCle = $nom['page_wiki_cle'];
180
			if (isset($envoyes[$tagCle]) == false) {
180
			if (isset($envoyes[$tagCle]) == false) {
181
				$fichier = $this->dossierBase.self::DOSSIER_V2.'cle/'.$tagCle.'.txt';
181
				//$fichier = $this->dossierBase.self::DOSSIER_V2.'cle/'.$tagCle.'.txt';
182
				$indentation = $indentation.' ';
182
				$indentation = $indentation.' ';
183
				if ($nom['rang'] <= 180) {
183
				if ($nom['rang'] <= 180) {
184
					$pageIndexFamille = rtrim($pageIndexFamille, "\n");
184
					$pageIndexFamille = rtrim($pageIndexFamille, "\n");
185
					$pageIndexFamille .= " - [[$tagCle Clé]]\n";
185
					$pageIndexFamille .= " - [[$tagCle Clé]]\n";