contribution_to_moderate(); } public function contribution_to_moderate(){ //on recherche les contributions à moderer $store = new contribution_area_store(); $dataStore = $store->get_datastore(); $query = "SELECT * WHERE { ?s ?contributor . optional { ?s ?draft . } }"; $dataStore->query($query); $results = $dataStore->get_result(); $nb_contrib = 0; foreach ($results as $contrib) { if (!$contrib->draft) { $nb_contrib++; } } //si on a des contributions on affiche l'alerte if($nb_contrib){ $this->add_data('contribution_area', 'alert_contribution_to_moderate'); } } }