[PLUGINS] ~maj Crayons
[lhc/web/www.git] / www / plugins / crayons / controleurs / article_intro3.php
index 491cb70..557f676 100644 (file)
@@ -1,39 +1,38 @@
 <?php
 
-if (!defined("_ECRIRE_INC_VERSION")) return;
+if (!defined('_ECRIRE_INC_VERSION')) {
+       return;
+}
 
 // un controleur qui n'utilise que php et les inputs défauts
 function controleurs_article_intro3_dist($regs) {
-    list(,$crayon,$type,$champ,$id) = $regs;
-    $valeur = valeur_colonne_table($type, array('descriptif', 'chapo', 'texte'), $id);
-    if ($valeur === false) {
-           return array("$type $id $champ: " . _U('crayons:pas_de_valeur'), 6);
-    }
+       list(,$crayon,$type,$champ,$id) = $regs;
+       $valeur = valeur_colonne_table($type, array('descriptif', 'chapo', 'texte'), $id);
+       if ($valeur === false) {
+               return array("$type $id $champ: " . _U('crayons:pas_de_valeur'), 6);
+       }
+
+       $n = new Crayon('article-intro3-' . $id, $valeur, array('hauteurMini' => 234));
 
-       $n = new Crayon('article-intro3-' . $id, $valeur,
-                       array('hauteurMini' => 234));
-    
-    $return = array(
-       // html
-           $n->formulaire(
-               // champs et attributs propres
-               array(
-               'descriptif' => array('type' => 'texte', 'attrs' => array(
-                       'style' => 'height:' . ceil($n->hauteur*2/13) . 'px;' .
-                                               'width:' . $n->largeur . 'px;')),
+       $return = array(
+               // html
+               $n->formulaire(
+                       // champs et attributs propres
+                       array(
+                       'descriptif' => array('type' => 'texte', 'attrs' => array(
+                               'style' => 'height:' . ceil($n->hauteur*2/13) . 'px;' .
+                                                       'width:' . $n->largeur . 'px;')),
                        'chapo' =>  array('type' => 'texte', 'attrs' => array(
-                       'style' => 'height:' . ceil($n->hauteur*4/13) . 'px;' .
-                                               'width:' . $n->largeur . 'px;')),
+                               'style' => 'height:' . ceil($n->hauteur*4/13) . 'px;' .
+                                                       'width:' . $n->largeur . 'px;')),
                        'texte' =>  array('type' => 'texte', 'attrs' => array(
-                       'style' => 'height:' . ceil($n->hauteur*4/13) . 'px;' .
-                                               'width:' . $n->largeur . 'px;'))) //,
-                   // attributs communs :( marche pas pour style , pas 2 fois ?
-//             array('style' => 'width:' . $n->largeur . 'px;')
-       ),
-       // status
-       null);
+                               'style' => 'height:' . ceil($n->hauteur*4/13) . 'px;' .
+                                                       'width:' . $n->largeur . 'px;'))) //,
+                       // attributs communs :( marche pas pour style , pas 2 fois ?
+                       // array('style' => 'width:' . $n->largeur . 'px;')
+               ),
+               // status
+               null);
 
        return $return;
 }
-
-?>