Changeset 94568 in spip-zone
- Timestamp:
- Jan 13, 2016, 1:23:29 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/polyhierarchie/trunk/formulaires/editer_polyhierarchie.php
r80684 r94568 10 10 11 11 function formulaires_editer_polyhierarchie_charger($objet, $id_objet, $retour=''){ 12 12 $id_parent = null; 13 13 $valeurs['objet'] = $objet; 14 14 $valeurs['id_objet'] = intval($id_objet); … … 17 17 $id_table_objet = id_table_objet($objet); 18 18 19 if ($objet =='article')19 if ($objet == 'article') { 20 20 $id_parent = sql_getfetsel('id_rubrique',$table_objet,$id_table_objet.'='.intval($id_objet)); 21 22 if ($objet=='rubrique')21 } 22 elseif ($objet=='rubrique') { 23 23 $id_parent = sql_getfetsel('id_parent',$table_objet,$id_table_objet.'='.intval($id_objet)); 24 } 24 25 25 26 // On ne fait rien si l'id_parent principal est incoherent (exemple : compat pages uniques) … … 31 32 // on met en tete l'id_parent principal 32 33 // pour unifier la saisie 33 $valeurs['parents'] = array("rubrique|".$id_parent); 34 if (!is_null($id_parent)) { 35 $valeurs['parents'] = array("rubrique|".$id_parent); 36 } 34 37 35 38 include_spip('inc/polyhier');
Note: See TracChangeset
for help on using the changeset viewer.