Subversion Repositories eFlore/Applications.cel

Rev

Rev 2167 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2167 Rev 2187
Line 37... Line 37...
37
			"AND chemin LIKE $cheminP ".
37
			"AND chemin LIKE $cheminP ".
38
			'ORDER BY chemin '.
38
			'ORDER BY chemin '.
39
			' -- '.__FILE__.':'.__LINE__;
39
			' -- '.__FILE__.':'.__LINE__;
Line 40... Line 40...
40
 
40
 
-
 
41
		$arbre = Cel::db()->requeter($requete);
-
 
42
		foreach ($arbre as &$noeud) {
-
 
43
			$noeud['chemin'] = strtolower($noeud['chemin']);
41
		$arbre = Cel::db()->requeter($requete);
44
		}
42
		usort($arbre, array('GestionMotsClesChemin', 'comparerProfNoeuds'));
45
		usort($arbre, array('GestionMotsClesChemin', 'comparerProfNoeuds'));
43
		return $arbre;
46
		return $arbre;
Line 44... Line 47...
44
	}
47
	}
Line 532... Line 535...
532
		$nb_slashs_a = substr_count($a['chemin'], '/');
535
		$nb_slashs_a = substr_count($a['chemin'], '/');
533
		$nb_slashs_b = substr_count($a['chemin'], '/');
536
		$nb_slashs_b = substr_count($a['chemin'], '/');
534
		$cmp = 0;
537
		$cmp = 0;
Line 535... Line 538...
535
 
538
 
536
		if ($nb_slashs_a == $nb_slashs_b) {
539
		if ($nb_slashs_a == $nb_slashs_b) {
537
			$cmp = strcmp($a['chemin'], $b['chemin']);
540
			$cmp = strcasecmp($a['chemin'], $b['chemin']);
538
		} else {
541
		} else {
539
			$cmp = ($a['chemin'] > $b['chemin']) ? +1 : -1;
542
			$cmp = ($a['chemin'] > $b['chemin']) ? +1 : -1;
540
		}
543
		}
541
		return $cmp;
544
		return $cmp;