Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 1792 → Rev 1793

/trunk/services/modules/0.1/syndication/SyndicationVotesParProtocole.php
24,7 → 24,7
private $masque = array();
private $mappingFiltre = array();
private $conteneur = null;
private $gestionBdd = null;
private $bdd = null;
private $navigation = null;
private $type_rss = null;
 
37,7 → 37,7
$this->conteneur->chargerConfiguration('config_syndication_votesparprotocole.ini');
$this->mappingFiltre = $this->conteneur->getParametre('mapping_masque');
$this->masque = $conteneur->getMasque();
$this->gestionBdd = $conteneur->getGestionBdd();
$this->bdd = $conteneur->getBdd();
$this->navigation = $conteneur->getNavigation();
}
 
276,7 → 276,7
'ORDER BY divo.date DESC '.
'LIMIT '.$this->navigation->getDepart().','.$this->navigation->getLimite();
 
$elements = $this->gestionBdd->getBdd()->recupererTous($requete);
$elements = $this->bdd->recupererTous($requete);
return $elements;
}
 
291,13 → 291,13
$idMasque = str_replace('masque.', '', $idMasque);
switch ($idMasque) {
case 'image':
$where[] = ' '.$this->mappingFiltre[$idMasque].' = '.$this->gestionBdd->getBdd()->proteger($valeurMasque);
$where[] = ' '.$this->mappingFiltre[$idMasque].' = '.$this->bdd->proteger($valeurMasque);
break;
case 'protocole':
$where[] = ' '.$this->mappingFiltre[$idMasque].' = '.$this->gestionBdd->getBdd()->proteger($valeurMasque).' ';
$where[] = ' '.$this->mappingFiltre[$idMasque].' = '.$this->bdd->proteger($valeurMasque).' ';
break;
default:
$where[] = ' '.$this->mappingFiltre[$idMasque].' = '.$this->gestionBdd->getBdd()->proteger($valeurMasque);
$where[] = ' '.$this->mappingFiltre[$idMasque].' = '.$this->bdd->proteger($valeurMasque);
break;
}
}
320,19 → 320,19
if(count($tableauNomPrenom) == 2) {
// on teste potentiellement un nom prenom ou bien un prénom nom
$masque = '('.
'(dc.utilisateur_nom LIKE '.$this->gestionBdd->getBdd()->proteger($tableauNomPrenom[0].'%').' AND '.
'dc.utilisateur_prenom LIKE '.$this->gestionBdd->getBdd()->proteger($tableauNomPrenom[1].'%').') OR '.
'(dc.utilisateur_nom LIKE '.$this->gestionBdd->getBdd()->proteger($tableauNomPrenom[1].'%').' AND '.
'dc.utilisateur_prenom LIKE '.$this->gestionBdd->getBdd()->proteger($tableauNomPrenom[0].'%').')'.
'(dc.utilisateur_nom LIKE '.$this->bdd->proteger($tableauNomPrenom[0].'%').' AND '.
'dc.utilisateur_prenom LIKE '.$this->bdd->proteger($tableauNomPrenom[1].'%').') OR '.
'(dc.utilisateur_nom LIKE '.$this->bdd->proteger($tableauNomPrenom[1].'%').' AND '.
'dc.utilisateur_prenom LIKE '.$this->bdd->proteger($tableauNomPrenom[0].'%').')'.
')';
} else {
$masque = '(
(dc.utilisateur_nom LIKE '.$this->gestionBdd->getBdd()->proteger($auteurId.'%').' OR '.
'dc.utilisateur_prenom LIKE '.$this->gestionBdd->getBdd()->proteger($auteurId.'%').')'.
(dc.utilisateur_nom LIKE '.$this->bdd->proteger($auteurId.'%').' OR '.
'dc.utilisateur_prenom LIKE '.$this->bdd->proteger($auteurId.'%').')'.
')';
}
} else {
$masque = " do.utilisateur_courriel LIKE ".$this->gestionBdd->getBdd()->proteger($valeurMasque.'%')." ";
$masque = " do.utilisateur_courriel LIKE ".$this->bdd->proteger($valeurMasque.'%')." ";
}
}
return $masque;