protected function filter_sections($datas)
 {
     $valid_datas = array();
     //on initialise un arbre avec les sections
     if (!count(self::$sections_tree)) {
         self::$sections_tree = $this->get_sections_tree(0, "", self::$sections_path);
     }
     foreach ($datas as $id_section) {
         if (isset(self::$sections_path[$id_section])) {
             $section_path_ids = explode("/", self::$sections_path[$id_section]);
             $current_tree = self::$sections_tree[$section_path_ids[0]];
             if ($current_tree['valid'] == 1) {
                 $valid = true;
                 for ($i = 1; $i < count($section_path_ids); $i++) {
                     $current_tree = $current_tree['children'][$section_path_ids[$i]];
                     if ($current_tree['valid'] == 0) {
                         $valid = false;
                         break;
                     }
                 }
                 if ($valid) {
                     $valid_datas[] = $id_section;
                 }
             }
         } else {
             continue;
         }
     }
     return $valid_datas;
 }