Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 3524 Rev 3612
Line 64... Line 64...
64
	}
64
	}
Line 65... Line 65...
65
 
65
 
66
	public function insererParCheminSiInexistant($mot_cle, $chemin_parent, $user_id) {
66
	public function insererParCheminSiInexistant($mot_cle, $chemin_parent, $user_id) {
67
		$mot_cle = self::simplifier($mot_cle);
67
		$mot_cle = self::simplifier($mot_cle);
-
 
68
		$cheminMotCle = self::getCheminHarmonise($chemin_parent, $mot_cle);
68
		$cheminMotCle = self::getCheminHarmonise($chemin_parent, $mot_cle);
69
		$motCleP = Cel::db()->proteger($mot_cle);
69
		$cheminMotCleP = Cel::db()->proteger($cheminMotCle);
70
		$cheminMotCleP = Cel::db()->proteger($cheminMotCle);
Line 70... Line 71...
70
		$idUtilisateurP = Cel::db()->proteger($user_id);
71
		$idUtilisateurP = Cel::db()->proteger($user_id);
71
 
72
 
72
		$requete = "SELECT {$this->id_mot_cle} ".
73
		$requete = "SELECT {$this->id_mot_cle} ".
73
			"FROM {$this->table_mots_cles} ".
74
			"FROM {$this->table_mots_cles} ".
74
			"WHERE path = $cheminMotCleP ".
75
			"WHERE path = $cheminMotCleP AND name = $motCleP".
75
			"AND user_id = $idUtilisateurP ".
76
			"AND user_id = $idUtilisateurP ".
Line 76... Line 77...
76
			' -- '.__FILE__.':'.__LINE__;
77
			' -- '.__FILE__.':'.__LINE__;
Line 397... Line 398...
397
		}
398
		}
398
		return $cmp;
399
		return $cmp;
399
	}
400
	}
Line 400... Line 401...
400
 
401
 
401
	static public function getCheminHarmonise($chemin_parent, $mot_cle) {
402
	static public function getCheminHarmonise($chemin_parent, $mot_cle) {
402
		return self::harmoniserChemin($chemin_parent.'/'.self::simplifier($mot_cle).'/');
403
		return self::harmoniserChemin($chemin_parent.'/');
Line 403... Line 404...
403
	}
404
	}
404
 
405
 
405
	static public function harmoniserChemin($chemin) {
406
	static public function harmoniserChemin($chemin) {