Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 1792 → 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) ".
/trunk/services/modules/0.1/syndication/SyndicationTagsParProtocole.php
25,7 → 25,7
private $masque = array();
private $mappingFiltre = array();
private $conteneur = null;
private $gestionBdd = null;
private $bdd = null;
private $navigation = null;
private $type_rss = null;
 
38,7 → 38,7
$this->conteneur->chargerConfiguration('config_syndication_tagsparprotocole.ini');
$this->mappingFiltre = $this->conteneur->getParametre('mapping_masque');
$this->masque = $conteneur->getMasque();
$this->gestionBdd = $conteneur->getGestionBdd();
$this->bdd = $conteneur->getBdd();
$this->navigation = $conteneur->getNavigation();
}
 
286,7 → 286,7
$this->chargerClauseWhere().' '.
'ORDER BY date DESC '.
'LIMIT '.$this->navigation->getDepart().','.$this->navigation->getLimite();
$elements = $this->gestionBdd->getBdd()->recupererTous($requete);
$elements = $this->bdd->recupererTous($requete);
return $elements;
}
 
300,7 → 300,7
foreach ($tableauMasque as $idMasque => $valeurMasque) {
$idMasque = str_replace('masque.', '', $idMasque);
$champMasque = $this->mappingFiltre[$idMasque];
$masqueMotif = $this->gestionBdd->getBdd()->proteger($valeurMasque);
$masqueMotif = $this->bdd->proteger($valeurMasque);
 
switch ($idMasque) {
case 'image':
/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;