get_selected_selector(); if($selector){ $section_id = $selector->get_value(); $section_ids = $this->filter_datas("sections",array($section_id)); if($section_ids[0]){ $sections = array(); $section_id = $section_ids[0]; $datas = array( 'sections' => array() ); $i=0; do { $i++; $query = "select id_section,section_num_parent from cms_sections where id_section = '".($section_id*1)."'"; $result = pmb_mysql_query($query); if(pmb_mysql_num_rows($result)){ $row = pmb_mysql_fetch_object($result); $section_id = $row->section_num_parent; $datas['sections'][] = $row->id_section; }else{ break; } //en théorie on sort toujours, mais comme c'est un pays formidable, on lock à 100 itérations... }while ($row->section_num_parent != 0 || $i>100); $datas['sections'] = array_reverse($datas['sections']); return $datas; } } return false; } }