* @author Jean-Pascal MILCENT * @author Aurelien PERONNET * @license GPL v3 * @license CECILL v2 * @copyright 1999-2014 Tela Botanica */ class InventoryImageCount extends Cel { /** * Renvoie le nombre d'images correspondant aux criteres * uid[0] : utilisateur obligatoire */ public function getElement($uid) { // Controle detournement utilisateur $this->controleUtilisateur($uid[0]); $chercheurImages = new RechercheImage($this->config); $retour = $chercheurImages->compterImages($uid[0], $_GET); $retour_encode = json_encode($retour); $retour_encode = $this->nettoyerCaracteresNuls($retour_encode); header('content-type: application/json'); print $retour_encode ; exit() ; } private function nettoyerCaracteresNuls($chaine) { return str_replace('\u0000','',$chaine); } }