Last change
on this file since 70480 was
70480,
checked in by abelass@…, 8 years ago
|
ouvrir la posibilité d'utiliser l'objet "selection_objet" sans liens vers un autre objet
|
File size:
752 bytes
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | if (!defined("_ECRIRE_INC_VERSION")) return; |
---|
4 | function inc_verifier_ordre_dist($where){ |
---|
5 | $sql = sql_select("id_selection_objet","spip_selection_objets", $where,'', "ordre,id_selection_objet"); |
---|
6 | $ordre = 0; |
---|
7 | |
---|
8 | // on vérifie l'ordre des objets déjà enregistrés et on corrige si beselection_objetin |
---|
9 | |
---|
10 | while ($row = sql_fetch($sql)) { |
---|
11 | $ordre++; |
---|
12 | $where = array( |
---|
13 | 'id_selection_objet='.$row['id_selection_objet'], |
---|
14 | ); |
---|
15 | |
---|
16 | sql_updateq("spip_selection_objets",array("ordre" => $ordre),$where) ; |
---|
17 | } |
---|
18 | |
---|
19 | include_spip('inc/invalideur'); |
---|
20 | suivre_invalideur("id='selection_objet/$id_selection_objet'"); |
---|
21 | return $ordre; |
---|
22 | } |
---|
23 | |
---|
24 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.