@@ -75,8 +75,8 @@ discard block |
||
| 75 | 75 | * @return mixed|string |
| 76 | 76 | */ |
| 77 | 77 | function objet_modifier($objet, $id, $set = null) { |
| 78 | - if (include_spip('action/editer_' . $objet) |
|
| 79 | - and function_exists($modifier = $objet . "_modifier") |
|
| 78 | + if (include_spip('action/editer_'.$objet) |
|
| 79 | + and function_exists($modifier = $objet."_modifier") |
|
| 80 | 80 | ) { |
| 81 | 81 | return $modifier($id, $set); |
| 82 | 82 | } |
@@ -159,8 +159,8 @@ discard block |
||
| 159 | 159 | * @return bool|int |
| 160 | 160 | */ |
| 161 | 161 | function objet_inserer($objet, $id_parent = null, $set = null) { |
| 162 | - if (include_spip('action/editer_' . $objet) |
|
| 163 | - and function_exists($inserer = $objet . "_inserer") |
|
| 162 | + if (include_spip('action/editer_'.$objet) |
|
| 163 | + and function_exists($inserer = $objet."_inserer") |
|
| 164 | 164 | ) { |
| 165 | 165 | return $inserer($id_parent, $set); |
| 166 | 166 | } |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $row = sql_fetsel("id_rubrique, id_secteur, lang", "spip_rubriques", "id_parent=0", '', '0+titre,titre', "1"); |
| 182 | 182 | $id_rubrique = $row['id_rubrique']; |
| 183 | 183 | } else { |
| 184 | - $row = sql_fetsel("lang, id_secteur", "spip_rubriques", "id_rubrique=" . intval($id_rubrique)); |
|
| 184 | + $row = sql_fetsel("lang, id_secteur", "spip_rubriques", "id_rubrique=".intval($id_rubrique)); |
|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | $champs['id_rubrique'] = $id_rubrique; |
@@ -289,8 +289,8 @@ discard block |
||
| 289 | 289 | * @return string |
| 290 | 290 | */ |
| 291 | 291 | function objet_instituer($objet, $id, $c, $calcul_rub = true) { |
| 292 | - if (include_spip('action/editer_' . $objet) |
|
| 293 | - and function_exists($instituer = $objet . "_instituer") |
|
| 292 | + if (include_spip('action/editer_'.$objet) |
|
| 293 | + and function_exists($instituer = $objet."_instituer") |
|
| 294 | 294 | ) { |
| 295 | 295 | return $instituer($id, $c, $calcul_rub); |
| 296 | 296 | } |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | $sel[] = ($champ_date ? "$champ_date as date" : "'' as date"); |
| 320 | 320 | $sel[] = (isset($desc['field']['id_rubrique']) ? 'id_rubrique' : "0 as id_rubrique"); |
| 321 | 321 | |
| 322 | - $row = sql_fetsel($sel, $table_sql, id_table_objet($objet) . '=' . intval($id)); |
|
| 322 | + $row = sql_fetsel($sel, $table_sql, id_table_objet($objet).'='.intval($id)); |
|
| 323 | 323 | |
| 324 | 324 | $id_rubrique = $row['id_rubrique']; |
| 325 | 325 | $statut_ancien = $statut = $row['statut']; |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | if ($s != 'publie' and autoriser('modifier', $objet, $id)) { |
| 342 | 342 | $statut = $champs['statut'] = $s; |
| 343 | 343 | } else { |
| 344 | - spip_log("editer_objet $id refus " . join(' ', $c)); |
|
| 344 | + spip_log("editer_objet $id refus ".join(' ', $c)); |
|
| 345 | 345 | } |
| 346 | 346 | } |
| 347 | 347 | |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | and isset($c['id_parent']) |
| 370 | 370 | and $id_parent = $c['id_parent'] |
| 371 | 371 | and $id_parent != $id_rubrique |
| 372 | - and (sql_fetsel('1', "spip_rubriques", "id_rubrique=" . intval($id_parent))) |
|
| 372 | + and (sql_fetsel('1', "spip_rubriques", "id_rubrique=".intval($id_parent))) |
|
| 373 | 373 | ) { |
| 374 | 374 | $champs['id_rubrique'] = $id_parent; |
| 375 | 375 | |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | // changer aussi son secteur et sa langue (si heritee) |
| 465 | 465 | if (isset($champs['id_rubrique'])) { |
| 466 | 466 | |
| 467 | - $row_rub = sql_fetsel("id_secteur, lang", "spip_rubriques", "id_rubrique=" . sql_quote($champs['id_rubrique'])); |
|
| 467 | + $row_rub = sql_fetsel("id_secteur, lang", "spip_rubriques", "id_rubrique=".sql_quote($champs['id_rubrique'])); |
|
| 468 | 468 | $langue = $row_rub['lang']; |
| 469 | 469 | |
| 470 | 470 | if (isset($desc['field']['id_secteur'])) { |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | |
| 474 | 474 | if (isset($desc['field']['lang']) and isset($desc['field']['langue_choisie'])) { |
| 475 | 475 | if (sql_fetsel('1', $table_sql, |
| 476 | - id_table_objet($objet) . "=" . intval($id) . " AND langue_choisie<>'oui' AND lang<>" . sql_quote($langue))) { |
|
| 476 | + id_table_objet($objet)."=".intval($id)." AND langue_choisie<>'oui' AND lang<>".sql_quote($langue))) { |
|
| 477 | 477 | $champs['lang'] = $langue; |
| 478 | 478 | } |
| 479 | 479 | } |
@@ -482,7 +482,7 @@ discard block |
||
| 482 | 482 | if (!$champs) { |
| 483 | 483 | return; |
| 484 | 484 | } |
| 485 | - sql_updateq($table_sql, $champs, id_table_objet($objet) . '=' . intval($id)); |
|
| 485 | + sql_updateq($table_sql, $champs, id_table_objet($objet).'='.intval($id)); |
|
| 486 | 486 | |
| 487 | 487 | // Changer le statut des rubriques concernees |
| 488 | 488 | if ($cond) { |
@@ -545,7 +545,7 @@ discard block |
||
| 545 | 545 | if (!$description) { |
| 546 | 546 | // Il est possible pour un type d'objet de fournir une fonction de lecture de tous les champs d'un objet. |
| 547 | 547 | if ( |
| 548 | - include_spip('action/editer_' . $objet) |
|
| 548 | + include_spip('action/editer_'.$objet) |
|
| 549 | 549 | and function_exists($lire = "${objet}_lire_champs") |
| 550 | 550 | ) { |
| 551 | 551 | $description = $lire($objet, $valeur_id, $champ_id); |
@@ -556,8 +556,8 @@ discard block |
||
| 556 | 556 | // La condition est appliquée sur le champ désigné par l'utilisateur. Si ce champ n'est pas l'id objet |
| 557 | 557 | // on considère qu'il est de type chaine. |
| 558 | 558 | $where = ($champ_id != $table_id) |
| 559 | - ? array("${champ_id}=" . sql_quote($valeur_id)) |
|
| 560 | - : array("${champ_id}=" . intval($valeur_id)); |
|
| 559 | + ? array("${champ_id}=".sql_quote($valeur_id)) |
|
| 560 | + : array("${champ_id}=".intval($valeur_id)); |
|
| 561 | 561 | |
| 562 | 562 | // Acquisition de tous les champs de l'objet : si l'accès SQL retourne une erreur on renvoie un tableau vide. |
| 563 | 563 | if (!$description = sql_fetsel('*', $table, $where)) { |