Line 19... |
Line 19... |
19 |
// | |
|
19 |
// | |
|
20 |
// | You should have received a copy of the GNU General Public License |
|
20 |
// | You should have received a copy of the GNU General Public License |
|
21 |
// | along with Foobar; if not, write to the Free Software |
|
21 |
// | along with Foobar; if not, write to the Free Software |
|
22 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
22 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
// +------------------------------------------------------------------------------------------------------+
|
23 |
// +------------------------------------------------------------------------------------------------------+
|
24 |
// CVS : $Id: more_recherche.class.php,v 1.12 2007-10-29 18:29:30 jp_milcent Exp $
|
24 |
// CVS : $Id: more_recherche.class.php,v 1.12.2.1 2008-10-22 07:45:46 aperonnet Exp $
|
25 |
/**
|
25 |
/**
|
26 |
* Classe permettant d'effectuer des recherches sur les métas informations des menus.
|
26 |
* Classe permettant d'effectuer des recherches sur les métas informations des menus.
|
27 |
*
|
27 |
*
|
28 |
* Permet de rechercher et classer les menus en fonction d'une chaine.
|
28 |
* Permet de rechercher et classer les menus en fonction d'une chaine.
|
29 |
*
|
29 |
*
|
Line 32... |
Line 32... |
32 |
//Auteur original :
|
32 |
//Auteur original :
|
33 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
33 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
34 |
//Autres auteurs :
|
34 |
//Autres auteurs :
|
35 |
*@author aucun
|
35 |
*@author aucun
|
36 |
*@copyright Tela-Botanica 2000-2004
|
36 |
*@copyright Tela-Botanica 2000-2004
|
37 |
*@version $Revision: 1.12 $ $Date: 2007-10-29 18:29:30 $
|
37 |
*@version $Revision: 1.12.2.1 $ $Date: 2008-10-22 07:45:46 $
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
39 |
*/
|
39 |
*/
|
Line 40... |
Line 40... |
40 |
|
40 |
|
41 |
// +------------------------------------------------------------------------------------------------------+
|
41 |
// +------------------------------------------------------------------------------------------------------+
|
Line 94... |
Line 94... |
94 |
function rechercherMotif() {
|
94 |
function rechercherMotif() {
|
95 |
foreach ($this->getMoteurs() as $cle => $val) {
|
95 |
foreach ($this->getMoteurs() as $cle => $val) {
|
96 |
$this->setResultats(array_merge((array)$this->getResultats(),(array)$val->rechercherMotif($this->getMotif())));
|
96 |
$this->setResultats(array_merge((array)$this->getResultats(),(array)$val->rechercherMotif($this->getMotif())));
|
97 |
}
|
97 |
}
|
98 |
$aso_resultats = $this->getResultats();
|
98 |
$aso_resultats = $this->getResultats();
|
- |
|
99 |
if(!function_exists('comparer'))
|
- |
|
100 |
{
|
99 |
function comparer($a, $b) {
|
101 |
function comparer($a, $b) {
|
100 |
if ($a['poids'] > $b['poids']) {
|
102 |
if ($a['poids'] > $b['poids']) {
|
101 |
return -1;
|
103 |
return -1;
|
102 |
}
|
104 |
}
|
103 |
if ($a['poids'] < $b['poids']) {
|
105 |
if ($a['poids'] < $b['poids']) {
|
104 |
return +1;
|
106 |
return +1;
|
105 |
}
|
107 |
}
|
106 |
if ($a['poids'] = $b['poids']) {
|
108 |
if ($a['poids'] = $b['poids']) {
|
107 |
return 0;
|
109 |
return 0;
|
108 |
}
|
110 |
}
|
- |
|
111 |
}
|
109 |
}
|
112 |
}
|
110 |
usort($aso_resultats, 'comparer');
|
113 |
usort($aso_resultats, 'comparer');
|
111 |
$pds_max = 0;
|
114 |
$pds_max = 0;
|
112 |
if (isset($aso_resultats[0]['poids'])) {
|
115 |
if (isset($aso_resultats[0]['poids'])) {
|
113 |
$pds_max = $aso_resultats[0]['poids'];
|
116 |
$pds_max = $aso_resultats[0]['poids'];
|
Line 225... |
Line 228... |
225 |
}
|
228 |
}
|
Line 226... |
Line 229... |
226 |
|
229 |
|
227 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
230 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
228 |
*
|
231 |
*
|
- |
|
232 |
* $Log: not supported by cvs2svn $
|
- |
|
233 |
* Revision 1.12 2007-10-29 18:29:30 jp_milcent
|
- |
|
234 |
* Ajout d'un préfixe devant les classes de l'applette pour éviter les conflits avec d'autres classes provenant des applis clientes.
|
229 |
* $Log: not supported by cvs2svn $
|
235 |
*
|
230 |
* Revision 1.11 2007-01-02 18:49:22 jp_milcent
|
236 |
* Revision 1.11 2007-01-02 18:49:22 jp_milcent
|
231 |
* Amélioration de la gestion du motif.
|
237 |
* Amélioration de la gestion du motif.
|
232 |
* Ajout de la gestion des expressions complête via l'utilisation de guillemets.
|
238 |
* Ajout de la gestion des expressions complête via l'utilisation de guillemets.
|
233 |
*
|
239 |
*
|