diff --git a/inc-calcul-squel.php3 b/inc-calcul-squel.php3 index 0996fa0c4ae2d25de918ea44c32be4d9dbce2e0f..2d6848333ff48b8e5240ab3db70827ec8dc65aaf 100644 --- a/inc-calcul-squel.php3 +++ b/inc-calcul-squel.php3 @@ -450,7 +450,7 @@ function parser_boucle($texte, $id_parent) { else if ($tri == 'points'){ // par points $req_order= " ORDER BY points"; } - else if (ereg("^num[[:space:]]+([^,]*)(,.*)",$tri, $match2)) { // par num champ + else if (ereg("^num[[:space:]]+([^,]*)(,.*)?",$tri, $match2)) { // par num champ $req_select[] = "0+$table.".$match2[1]." AS num"; $req_order = " ORDER BY num".$match2[2]; } diff --git a/inc-stats.php3 b/inc-stats.php3 index 4754ad8d25822deaa06f79c3eb98a37d83d02896..4b12bb5764e54e14acfd71a143182b7ae48ff641 100644 --- a/inc-stats.php3 +++ b/inc-stats.php3 @@ -113,7 +113,7 @@ function afficher_raccourci_stats($id_article) { $result = spip_query($query); if ($row = mysql_fetch_array($result)) { $visites = intval($row['visites']); - $popularite = ceil(min(100,100 * $row['popularite'] / max(1,lire_meta('popularite_max')))); + $popularite = ceil(min(100,100 * $row['popularite'] / max(1,(double) lire_meta('popularite_max')))); if ($visites > 0) bouton_admin("Evolution des visites", "./ecrire/statistiques_visites.php3?id_article=$id_article");