Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 1661 → Rev 1793

/trunk/services/modules/0.1/syndication/SyndicationCommentaires.php
21,7 → 21,7
private $masque = array();
private $mappingFiltre = array();
private $conteneur = null;
private $gestionBdd = null;
private $bdd = null;
private $navigation = null;
 
public function __construct(Conteneur $conteneur = null) {
29,7 → 29,7
$this->conteneur->chargerConfiguration('config_syndication_commentaires.ini');
$this->mappingFiltre = $this->conteneur->getParametre('mapping_masque');
$this->masque = $conteneur->getMasque();
$this->gestionBdd = $conteneur->getGestionBdd();
$this->bdd = $conteneur->getBdd();
$this->navigation = $conteneur->getNavigation();
}
 
245,7 → 245,7
'ORDER BY dc.date DESC '.
'LIMIT '.$this->navigation->getDepart().','.$this->navigation->getLimite().' ';
 
$elements = $this->gestionBdd->getBdd()->recupererTous($requete);
$elements = $this->bdd->recupererTous($requete);
return $elements;
}
 
260,8 → 260,8
foreach ($tableauMasque as $idMasque => $valeurMasque) {
$idMasque = str_replace('masque.', '', $idMasque);
$champ = $this->mappingFiltre[$idMasque];
$valeurMasquePattern = $this->gestionBdd->getBdd()->proteger($valeurMasque.'%');
$valeurMasqueProtegee = $this->gestionBdd->getBdd()->proteger($valeurMasque);
$valeurMasquePattern = $this->bdd->proteger($valeurMasque.'%');
$valeurMasqueProtegee = $this->bdd->proteger($valeurMasque);
 
switch ($idMasque) {
case 'espece':
288,14 → 288,14
if (is_numeric($auteurId)) {
$whereAuteur = " dc.ce_utilisateur = $auteurId ";
} else {
$auteurIdMotif = $this->gestionBdd->getBdd()->proteger($auteurId.'%');
$auteurIdMotif = $this->bdd->proteger($auteurId.'%');
 
if (strpos($auteurId, '@') === false) {
$tableauNomPrenom = explode(' ', $auteurId, 2);
if (count($tableauNomPrenom) == 2) {
// on teste potentiellement un nom prenom ou bien un prénom nom
$nomMotif = $this->gestionBdd->getBdd()->proteger($tableauNomPrenom[0].'%');
$prenomMotif = $this->gestionBdd->getBdd()->proteger($tableauNomPrenom[1].'%');
$nomMotif = $this->bdd->proteger($tableauNomPrenom[0].'%');
$prenomMotif = $this->bdd->proteger($tableauNomPrenom[1].'%');
 
$whereAuteur = ' ('.
"(dc.utilisateur_nom LIKE $nomMotif AND dc.utilisateur_prenom LIKE $prenomMotif) ".