Subversion Repositories eFlore/Applications.del

Rev

Rev 1642 | Rev 1652 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1642 Rev 1643
Line 70... Line 70...
70
                  $compte = $this->bdd->recuperer('SELECT FOUND_ROWS() AS nbre');
70
                  $compte = $this->bdd->recuperer('SELECT FOUND_ROWS() AS nbre');
71
                  $total = (int) $compte['nbre'];
71
                  $total = (int) $compte['nbre'];
Line 72... Line 72...
72
                  
72
                  
73
                  $obs = $this->regrouperObs($liaisons);
73
                  $obs = $this->regrouperObs($liaisons);
-
 
74
                  $obs = $this->chargerPropositionPlusProbable($obs);
74
                  $obs = $this->chargerPropositionPlusProbable($obs);
75
                  $obs = $this->orderArray($obs);
Line 75... Line 76...
75
		}
76
		}
Line 76... Line 77...
76
		
77
		
Line 82... Line 83...
82
                $resultat->corps = array('entete' => $this->conteneur->getEntete(), 'resultats' => $obs);
83
                $resultat->corps = array('entete' => $this->conteneur->getEntete(), 'resultats' => $obs);
Line 83... Line 84...
83
                
84
                
84
		return $resultat;
85
		return $resultat;
Line 85... Line 86...
85
	}
86
	}
-
 
87
	
-
 
88
        
-
 
89
        private function orderArray(&$obs) {
-
 
90
 
-
 
91
          $ret = array();
-
 
92
 
-
 
93
          foreach ($obs as $o) {
-
 
94
            $ret[] = $o;
-
 
95
          }
-
 
96
 
-
 
97
          function cmp($a, $b) {
-
 
98
            return ($a['date_changement'] < $b['date_changement']) ? 1 : -1;
-
 
99
          }
-
 
100
          
-
 
101
          usort($ret, 'cmp');
86
	
102
          return $ret;
87
	
103
        }
88
	/*-------------------------------------------------------------------------------
104
	/*-------------------------------------------------------------------------------
89
								CHARGEMENT DES IMAGES 
105
								CHARGEMENT DES IMAGES 
Line 135... Line 151...
135
            '       MAX(del_commentaire.date) >= '.$date_debut.' or '.
151
            '       MAX(del_commentaire.date) >= '.$date_debut.' or '.
136
            '       MAX(del_commentaire_vote.date) >= '.$date_debut.' '.
152
            '       MAX(del_commentaire_vote.date) >= '.$date_debut.' '.
137
            'order by modif_date DESC '.
153
            'order by modif_date DESC '.
138
            'limit '.$depart.', '.$limite.' -- '.__FILE__.':'.__LINE__;
154
            'limit '.$depart.', '.$limite.' -- '.__FILE__.':'.__LINE__;
Line -... Line 155...
-
 
155
 
-
 
156
          //echo $requete_sql; exit;
139
 
157
 
Line 140... Line 158...
140
          return $this->bdd->recupererTous($requete_sql);
158
          return $this->bdd->recupererTous($requete_sql);