Ticket #468: ticket468.diff

File ticket468.diff, 87.1 kB (added by laurentj, 10 months ago)

work in progress

  • build/manifests/jelix-lib.mn

    old new  
    8787cd lib/jelix/core-modules/jelix/install/sql 
    8888  delete.mysql.sql 
    8989  install_jacl.schema.mysql.sql 
    90   install_jacl.datas.mysql.sql 
     90  install_jacl.data.mysql.sql 
    9191  install_jsession.schema.mysql.sql 
    9292  delete.pgsql.sql 
    9393  install_jacl.schema.pgsql.sql 
    94   install_jacl.datas.pgsql.sql 
     94  install_jacl.data.pgsql.sql 
    9595  install_jsession.schema.pgsql.sql 
    9696 
    9797cd lib/jelix/core-modules/jelix/locales/en_US 
     
    445445  modifier.nl2br.php 
    446446  meta.html.php 
    447447  cfunction.formfull.php 
    448   function.formdatasfull.php 
     448  function.formdatafull.php 
    449449  function.formurl.php 
    450450  function.formurlparam.php 
    451451  function.diff.php 
    452452  block.form.php 
    453453  block.formcontrols.php 
    454   block.formdatas.php 
     454  block.formdata.php 
    455455  block.formsubmits.php 
    456456  function.ctrl_control.php 
    457457  function.ctrl_label.php 
  • testapp/modules/testapp/templates/forms_liste.tpl

    old new  
    66{foreach $liste as $id=>$form} 
    77    <tr> 
    88    <td>{$id}</td> 
    9     <td>{$form->datas['nom']}</td> 
    10     <td>{$form->datas['prenom']}</td> 
     9    <td>{$form->data['nom']}</td> 
     10    <td>{$form->data['prenom']}</td> 
    1111    <td> 
    1212        <a href="{jurl 'forms:view',array('id'=>$id)}">voir</a> 
    1313        <a href="{jurl 'forms:showform',array('id'=>$id)}">éditer</a> 
  • testapp/modules/testapp/templates/forms_edit.tpl

    old new  
    44<form action="{jurl 'forms:save'}" method="POST"> 
    55<fieldset> 
    66   <legend>Votre identité</legend> 
    7     <p><label for="nom">Nom :</label> <input type="text" name="nom" id="nom" value="{$form->datas['nom']}"/></p> 
    8     <p><label for="prenom">Prenom :</label> <input type="text" name="prenom" id="prenom" value="{$form->datas['prenom']}" /></p> 
     7    <p><label for="nom">Nom :</label> <input type="text" name="nom" id="nom" value="{$form->data['nom']}"/></p> 
     8    <p><label for="prenom">Prenom :</label> <input type="text" name="prenom" id="prenom" value="{$form->data['prenom']}" /></p> 
    99 
    1010</fieldset> 
    1111<p>id form : <input type="text" name="newid" value="{$id}"  
  • testapp/modules/jelix_tests/tests/core.selectors_action.html.php

    old new  
    131131                && $s->method == $res[2] 
    132132                && $s->request == $res[3]; 
    133133                if(!$ok) 
    134                     $msg=' contains unexpected datas ('.$s->module.', '.$s->controller.', '.$s->method.', '.$s->request.')'; 
     134                    $msg=' contains unexpected data ('.$s->module.', '.$s->controller.', '.$s->method.', '.$s->request.')'; 
    135135            } 
    136136 
    137137            $this->assertTrue($ok , ' test of '.$sel. ' (should be '.($res === false ? 'invalid':'valid').')'); 
     
    182182                && $s->method == $res[2] 
    183183                && $s->request == $res[3]; 
    184184                if(!$valid) 
    185                     $msg=' contains unexpected datas ('.$s->module.', '.$s->controller.', '.$s->method.', '.$s->request.')'; 
     185                    $msg=' contains unexpected data ('.$s->module.', '.$s->controller.', '.$s->method.', '.$s->request.')'; 
    186186            } 
    187187 
    188188            $this->assertTrue($valid , ' test of '.$sel. ' (should be '.($res === false ? 'invalid':'valid').')'); 
  • testapp/modules/jelix_tests/tests/jforms.html_cli.php

    old new  
    2424    <object method="getContainer()" class="jFormsDataContainer"> 
    2525        <integer property="formId" value="'.jForms::DEFAULT_ID.'" /> 
    2626        <string property="formSelector" value="product" /> 
    27         <array property="datas"> 
     27        <array property="data"> 
    2828            <string key="name" value="" /> 
    2929            <string key="price" value="" /> 
    3030        </array> 
    3131        <array property="errors">array()</array> 
    3232    </object> 
    33     <array method="getDatas()"> 
     33    <array method="getAllData()"> 
    3434        <string key="name" value="" /> 
    3535        <string key="price" value="" /> 
    3636    </array> 
     
    5959    <object method="getContainer()" class="jFormsDataContainer"> 
    6060        <string property="formId" value="akey" /> 
    6161        <string property="formSelector" value="product" /> 
    62         <array property="datas"> 
     62        <array property="data"> 
    6363            <string key="name" value="" /> 
    6464            <string key="price" value="" /> 
    6565        </array> 
    6666        <array property="errors">array()</array> 
    6767    </object> 
    68     <array method="getDatas()"> 
     68    <array method="getAllData()"> 
    6969        <string key="name" value="" /> 
    7070        <string key="price" value="" /> 
    7171    </array> 
     
    9393    <object method="getContainer()" class="jFormsDataContainer"> 
    9494        <array property="formId">array(1,\'fr\')</array> 
    9595        <string property="formSelector" value="label" /> 
    96         <array property="datas"> 
     96        <array property="data"> 
    9797            <string key="label" value="" /> 
    9898        </array> 
    9999        <array property="errors">array()</array> 
    100100    </object> 
    101     <array method="getDatas()"> 
     101    <array method="getAllData()"> 
    102102        <string key="label" value="" /> 
    103103    </array> 
    104104    <array method="id()">array(1,\'fr\')</array> 
     
    124124        <object key="'.jForms::DEFAULT_ID.'" class="jFormsDataContainer"> 
    125125            <integer property="formId" value="'.jForms::DEFAULT_ID.'" /> 
    126126            <string property="formSelector" value="product" /> 
    127             <array property="datas"> 
     127            <array property="data"> 
    128128                <string key="name" value="" /> 
    129129                <string key="price" value="" /> 
    130130            </array> 
     
    142142        <object key="'.jForms::DEFAULT_ID.'" class="jFormsDataContainer"> 
    143143            <integer property="formId" value="'.jForms::DEFAULT_ID.'" /> 
    144144            <string property="formSelector" value="product" /> 
    145             <array property="datas"> 
     145            <array property="data"> 
    146146                <string key="name" value="" /> 
    147147                <string key="price" value="" /> 
    148148            </array> 
     
    151151        <object key="akey" class="jFormsDataContainer"> 
    152152            <string property="formId" value="akey" /> 
    153153            <string property="formSelector" value="product" /> 
    154             <array property="datas"> 
     154            <array property="data"> 
    155155                <string key="name" value="" /> 
    156156                <string key="price" value="" /> 
    157157            </array> 
     
    170170        <object key="'.jForms::DEFAULT_ID.'" class="jFormsDataContainer"> 
    171171            <integer property="formId" value="'.jForms::DEFAULT_ID.'" /> 
    172172            <string property="formSelector" value="product" /> 
    173             <array property="datas"> 
     173            <array property="data"> 
    174174                <string key="name" value="" /> 
    175175                <string key="price" value="" /> 
    176176            </array> 
     
    179179        <object key="akey" class="jFormsDataContainer"> 
    180180            <string property="formId" value="akey" /> 
    181181            <string property="formSelector" value="product" /> 
    182             <array property="datas"> 
     182            <array property="data"> 
    183183                <string key="name" value="" /> 
    184184                <string key="price" value="" /> 
    185185            </array> 
     
    190190        <object key="a:2:{i:0;i:1;i:1;s:2:&quot;fr&quot;;}" class="jFormsDataContainer"> 
    191191            <array property="formId">array(1,\'fr\')</array> 
    192192            <string property="formSelector" value="label" /> 
    193             <array property="datas"> 
     193            <array property="data"> 
    194194                <string key="label" value="" /> 
    195195            </array> 
    196196            <array property="errors">array()</array> 
     
    234234    <object method="getContainer()" class="jFormsDataContainer"> 
    235235        <integer property="formId" value="'.jForms::DEFAULT_ID.'" /> 
    236236        <string property="formSelector" value="product" /> 
    237         <array property="datas"> 
     237        <array property="data"> 
    238238            <string key="name" value="phone" /> 
    239239            <string key="price" value="45" /> 
    240240        </array> 
    241241        <array property="errors">array()</array> 
    242242    </object> 
    243     <array method="getDatas()"> 
     243    <array method="getAllData()"> 
    244244        <string key="name" value="phone" /> 
    245245        <string key="price" value="45" /> 
    246246    </array> 
     
    274274    <object method="getContainer()" class="jFormsDataContainer"> 
    275275        <integer property="formId" value="akey" /> 
    276276        <string property="formSelector" value="product" /> 
    277         <array property="datas"> 
     277        <array property="data"> 
    278278            <string key="name" value="phone" /> 
    279279            <string key="price" value="45" /> 
    280280        </array> 
    281281        <array property="errors">array()</array> 
    282282    </object> 
    283     <array method="getDatas()"> 
     283    <array method="getAllData()"> 
    284284        <string key="name" value="phone" /> 
    285285        <string key="price" value="45" /> 
    286286    </array> 
     
    316316        <object key="akey" class="jFormsDataContainer"> 
    317317            <string property="formId" value="akey" /> 
    318318            <string property="formSelector" value="product" /> 
    319             <array property="datas"> 
     319            <array property="data"> 
    320320                <string key="name" value="phone" /> 
    321321                <string key="price" value="45" /> 
    322322            </array> 
     
    327327        <object key="a:2:{i:0;i:1;i:1;s:2:&quot;fr&quot;;}" class="jFormsDataContainer"> 
    328328            <array property="formId">array(1,\'fr\')</array> 
    329329            <string property="formSelector" value="label" /> 
    330             <array property="datas"> 
     330            <array property="data"> 
    331331                <string key="label" value="" /> 
    332332            </array> 
    333333            <array property="errors">array()</array> 
     
    344344        <object key="a:2:{i:0;i:1;i:1;s:2:&quot;fr&quot;;}" class="jFormsDataContainer"> 
    345345            <array property="formId">array(1,\'fr\')</array> 
    346346            <string property="formSelector" value="label" /> 
    347             <array property="datas"> 
     347            <array property="data"> 
    348348                <string key="label" value="" /> 
    349349            </array> 
    350350            <array property="errors">array()</array> 
  • testapp/modules/jelix_tests/tests/jforms.compiler.html_cli.php

    old new  
    39739728=>'$ctrl= new jFormsControlcheckboxes(\'nom\'); 
    398398$ctrl->label=\'Votre nom\'; 
    399399$ctrl->datasource= new jFormStaticDatasource(); 
    400 $ctrl->datasource->datas = array( 
     400$ctrl->datasource->data = array( 
    401401\'aaa\'=>\'1aa\', 
    402402\'bbb\'=>jLocale::get(\'locb\'), 
    403403\'ccc\'=>\'ccc\', 
     
    41041030=>'$ctrl= new jFormsControlradiobuttons(\'nom\'); 
    411411$ctrl->label=\'Votre nom\'; 
    412412$ctrl->datasource= new jFormStaticDatasource(); 
    413 $ctrl->datasource->datas = array( 
     413$ctrl->datasource->data = array( 
    414414\'aaa\'=>\'1aa\', 
    415415\'bbb\'=>jLocale::get(\'locb\'), 
    416416\'ccc\'=>\'ccc\', 
     
    424424$ctrl->label=\'Votre nom\'; 
    425425$ctrl->size=8; 
    426426$ctrl->datasource= new jFormStaticDatasource(); 
    427 $ctrl->datasource->datas = array( 
     427$ctrl->datasource->data = array( 
    428428\'aaa\'=>\'1aa\', 
    429429\'bbb\'=>jLocale::get(\'locb\'), 
    430430\'ccc\'=>\'ccc\', 
     
    43743734=>'$ctrl= new jFormsControlmenulist(\'nom\'); 
    438438$ctrl->label=\'Votre nom\'; 
    439439$ctrl->datasource= new jFormStaticDatasource(); 
    440 $ctrl->datasource->datas = array( 
     440$ctrl->datasource->data = array( 
    441441\'aaa\'=>\'1aa\', 
    442442\'bbb\'=>jLocale::get(\'locb\'), 
    443443\'ccc\'=>\'ccc\', 
     
    45145136=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    452452$ctrl->label=\'Votre nom\'; 
    453453$ctrl->datasource= new jFormStaticDatasource(); 
    454 $ctrl->datasource->datas = array( 
     454$ctrl->datasource->data = array( 
    455455\'aaa\'=>\'1aa\', 
    456456\'bbb\'=>jLocale::get(\'locb\'), 
    457457\'ccc\'=>\'ccc\', 
     
    46446438=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    465465$ctrl->label=\'Votre nom\'; 
    466466$ctrl->datasource= new jFormStaticDatasource(); 
    467 $ctrl->datasource->datas = array( 
     467$ctrl->datasource->data = array( 
    468468\'aaa\'=>\'1aa\', 
    469469\'bbb\'=>jLocale::get(\'locb\'), 
    470470\'ccc\'=>\'ccc\', 
     
    47647639=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    477477$ctrl->label=\'Votre nom\'; 
    478478$ctrl->datasource= new jFormStaticDatasource(); 
    479 $ctrl->datasource->datas = array( 
     479$ctrl->datasource->data = array( 
    480480\'aaa\'=>\'1aa\', 
    481481\'bbb\'=>jLocale::get(\'locb\'), 
    482482\'ccc\'=>\'ccc\', 
     
    491491$ctrl->label=\'Votre nom\'; 
    492492$ctrl->defaultValue=array(\'aaa\'); 
    493493$ctrl->datasource= new jFormStaticDatasource(); 
    494 $ctrl->datasource->datas = array( 
     494$ctrl->datasource->data = array( 
    495495\'aaa\'=>\'1aa\', 
    496496\'bbb\'=>jLocale::get(\'locb\'), 
    497497\'ccc\'=>\'ccc\', 
     
    502502$ctrl->label=\'Votre nom\'; 
    503503$ctrl->defaultValue= array(\'bbb\',\'aaa\',); 
    504504$ctrl->datasource= new jFormStaticDatasource(); 
    505 $ctrl->datasource->datas = array( 
     505$ctrl->datasource->data = array( 
    506506\'aaa\'=>\'1aa\', 
    507507\'bbb\'=>jLocale::get(\'locb\'), 
    508508\'ccc\'=>\'ccc\', 
     
    571571$ctrl->label=\'Type de validation\'; 
    572572$ctrl->standalone=false; 
    573573$ctrl->datasource= new jFormStaticDatasource(); 
    574 $ctrl->datasource->datas = array( 
     574$ctrl->datasource->data = array( 
    575575\'aaa\'=>\'1aa\', 
    576576\'bbb\'=>jLocale::get(\'locb\'), 
    577577\'ccc\'=>\'ccc\', 
  • testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html_cli.php

    old new  
    2424    public $reset= null; 
    2525    public $container; 
    2626 
    27     protected $datas =  array( 'chk'=>'1', 'chk2'=>'', 'choixsimple'=>'11', 'choixmultiple'=>array('10','23')); 
     27    protected $data =  array( 'chk'=>'1', 'chk2'=>'', 'choixsimple'=>'11', 'choixmultiple'=>array('10','23')); 
    2828    function __construct(){ 
    2929        $this->container = new jFormsDataContainer('',''); 
    3030    } 
    3131 
    3232    function getData($name) { 
    33         if(isset($this->datas[$name])) 
    34             return $this->datas[$name]; 
     33        if(isset($this->data[$name])) 
     34            return $this->data[$name]; 
    3535        else 
    3636            return null; 
    3737    } 
    3838    function setData($name,$value) { 
    39         $this->datas[$name]=$value; 
     39        $this->data[$name]=$value; 
    4040    } 
    4141    function getControls() { 
    4242        return $this->controls; 
     
    6060            $this->reset = $control; 
    6161        else if($control->type =='hidden') 
    6262            $this->_hiddens [$control->ref] = $control; 
    63         $this->datas[$control->ref] = $control->defaultValue; 
     63        $this->data[$control->ref] = $control->defaultValue; 
    6464    } 
    6565} 
    6666 
     
    240240        $ctrl->datatype= new jDatatypeString(); 
    241241        $ctrl->label='Vos choix'; 
    242242        $ctrl->datasource= new jFormStaticDatasource(); 
    243         $ctrl->datasource->datas = array( 
     243        $ctrl->datasource->data = array( 
    244244            '10'=>'foo', 
    245245            '11'=>'bar', 
    246246            '23'=>'baz', 
     
    283283        $this->assertEqualOrDiff($result, $out); 
    284284 
    285285        $ctrl->datasource= new jFormStaticDatasource(); 
    286         $ctrl->datasource->datas = array( 
     286        $ctrl->datasource->data = array( 
    287287            '10'=>'foo', 
    288288            '11'=>'bar', 
    289289            '23'=>'baz', 
     
    325325        $this->assertEqualOrDiff($result, $out); 
    326326 
    327327        $ctrl->datasource= new jFormStaticDatasource(); 
    328         $ctrl->datasource->datas = array( 
     328        $ctrl->datasource->data = array( 
    329329            '10'=>'foo', 
    330330            '11'=>'bar', 
    331331            '23'=>'baz', 
     
    389389        $this->assertEqualOrDiff($result, $out); 
    390390 
    391391        $ctrl->datasource= new jFormStaticDatasource(); 
    392         $ctrl->datasource->datas = array( 
     392        $ctrl->datasource->data = array( 
    393393            '10'=>'foo', 
    394394            '11'=>'bar', 
    395395            '23'=>'baz', 
     
    626626 
    627627        $ctrl->standalone=false; 
    628628        $ctrl->datasource= new jFormStaticDatasource(); 
    629         $ctrl->datasource->datas = array('svg'=>'Sauvegarde','prev'=>'Preview'); 
     629        $ctrl->datasource->data = array('svg'=>'Sauvegarde','prev'=>'Preview'); 
    630630 
    631631        ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 
    632632        $output = '<input type="submit" name="nom" id="'.$this->formname.'_nom_svg" title="ceci est un tooltip" class="jforms-submit" value="Sauvegarde"/> '; 
  • testapp/modules/jelix_tests/tests/jforms.check_datas.html_cli.php

    old new  
    1919    function addCtrl($control, $reset=true){ 
    2020        if($reset){ 
    2121            $this->_controls = array(); 
    22             $this->_container->datas = array(); 
     22            $this->_container->data = array(); 
    2323        } 
    2424        $this->addControl($control); 
    2525    } 
  • testapp/modules/jelix_tests/tests/jforms.with_dao.html_cli.php

    old new  
    3333        $gJCoord->request->params['tag'] = array('professionnal','book'); 
    3434        $form = jForms::fill('product'); 
    3535 
    36         // save main datas 
     36        // save main data 
    3737        $this->id = $form->saveToDao('products'); 
    3838        $records = array( 
    3939            array('id'=>$this->id, 'name'=>'phone', 'price'=>45), 
    4040        ); 
    4141        $this->assertTableContainsRecords('product_test', $records); 
    4242 
    43         // save datas of the tags control which is a container 
     43        // save data of the tags control which is a container 
    4444        $form->saveControlToDao('tag','product_tags',$this->id); 
    4545        $records = array( 
    4646            array('product_id'=>$this->id, 'tag'=>'professionnal'), 
     
    6161        ); 
    6262        $this->assertTableContainsRecords('product_test', $records); 
    6363 
    64         // save datas of the tags control which is a container 
     64        // save data of the tags control which is a container 
    6565        $form->saveControlToDao('tag','product_tags',$this->id2); 
    6666        $records = array( 
    6767            array('product_id'=>$this->id, 'tag'=>'professionnal'), 
     
    7878        $gJCoord->request->params['label'] = 'bonjour'; 
    7979        $form = jForms::fill('label', array(1,'fr')); 
    8080 
    81         // save main datas 
     81        // save main data 
    8282        $form->saveToDao('labels'); 
    8383        $records = array( 
    8484            array('key'=>1, 'lang'=>'fr', 'label'=>'bonjour'), 
     
    120120        ); 
    121121        $this->assertTableContainsRecords('product_test', $records); 
    122122 
    123         // save datas of the tags control which is a container 
     123        // save data of the tags control which is a container 
    124124        $form->saveControlToDao('tag','product_tags',$this->id); 
    125125        $records = array( 
    126126            array('product_id'=>$this->id2, 'tag'=>'professionnal'), 
     
    149149        <object key="'.$this->id.'" class="jFormsDataContainer"> 
    150150            <integer property="formId" value="'.$this->id.'" /> 
    151151            <string property="formSelector" value="product" /> 
    152             <array property="datas"> 
     152            <array property="data"> 
    153153                <string key="name" value="" /> 
    154154                <string key="price" value="" /> 
    155155                <array key="tag">array()</array> 
     
    168168        <object key="'.$this->id.'" class="jFormsDataContainer"> 
    169169            <integer property="formId" value="'.$this->id.'" /> 
    170170            <string property="formSelector" value="product" /> 
    171             <array property="datas"> 
     171            <array property="data"> 
    172172                <string key="name" value="other phone" /> 
    173173                <string key="price" value="68" /> 
    174174                <array key="tag">array()</array> 
     
    189189        <object key="'.$this->id.'" class="jFormsDataContainer"> 
    190190            <integer property="formId" value="'.$this->id.'" /> 
    191191            <string property="formSelector" value="product" /> 
    192             <array property="datas"> 
     192            <array property="data"> 
    193193                <string key="name" value="other phone" /> 
    194194                <string key="price" value="68" /> 
    195195                <array key="tag">array(\'best seller\', \'high tech\')</array> 
  • lib/jelix-modules/jauth/install/var/config/auth.coord.ini.php

    old new  
    6464; key to use to crypt the password in the cookie. replace it by your own words ! 
    6565persistant_crypt_key= exampleOfCryptKey 
    6666 
    67 ; the name of the cookie which is used to store datas for the authentification 
     67; the name of the cookie which is used to store data for the authentification 
    6868persistant_cookie_name=jelixAuthentificationCookie 
    6969 
    7070; duration of the validity of the cookie (in days). default is 1 day. 
     
    7474 
    7575;------- parameters for the "Db" driver 
    7676[Db] 
    77 ; name of the dao to get user datas 
     77; name of the dao to get user data 
    7878dao = "" 
    7979 
    8080; profil to use for jDb  
  • lib/jelix/plugins/tpl/html/block.form.php

    old new  
    99*/ 
    1010 
    1111/** 
    12  * a block to display an html form, with datas from a jforms 
     12 * a block to display an html form, with data from a jforms 
    1313 * 
    1414 * usage : {form $theformobject,'submit_action', $submit_action_params} here form content {/form} 
    1515 * 
  • lib/jelix/plugins/tpl/html/function.formdatafull.php

    old new  
    1010*/ 
    1111 
    1212/** 
    13  * Display all datas of a form without the use of other plugins. 
     13 * Display all data of a form without the use of other plugins. 
    1414 * 
    1515 * @param jTpl $tpl template engine 
    1616 * @param jFormsBase $form  the form to display 
    1717 */ 
    18 function jtpl_function_html_formdatasfull($tpl, $form) 
     18function jtpl_function_html_formdatafull($tpl, $form) 
    1919{ 
    2020 
    2121    //$formBuilder = $form->getBuilder('html', $action, $params); 
  • lib/jelix/plugins/tpl/html/block.formdatas.php

    old new  
    1 <?php 
    2 /** 
    3 * @package     jelix 
    4 * @subpackage  jtpl_plugin 
    5 * @author      Jouanneau Laurent 
    6 * @copyright   2006-2008 Jouanneau laurent 
    7 * @link        http://www.jelix.org 
    8 * @licence     GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
    9 */ 
    10  
    11 /** 
    12  * a block to display only datas of a form 
    13  * 
    14  * usage : {formdatas $theformobject} here the form content {/formdatas} 
    15  * 
    16  * @param jTplCompiler $compiler the template compiler 
    17  * @param boolean $begin true if it is the begin of block, else false 
    18  * @param array $param 0=>form object  
    19  * @return string the php code corresponding to the begin or end of the block 
    20  * @see jForms 
    21  * @since 1.0.1 
    22  */ 
    23 function jtpl_block_html_formdatas($compiler, $begin, $param=array()) 
    24 { 
    25  
    26     if(!$begin){ 
    27         return ' 
    28 unset($t->_privateVars[\'__form\']);  
    29 unset($t->_privateVars[\'__displayed_ctrl\']);'; 
    30     } 
    31  
    32     if(count($param) != 1) { 
    33         $compiler->doError2('errors.tplplugin.block.bad.argument.number','formdatas',1); 
    34         return ''; 
    35     } 
    36  
    37     $content = ' $t->_privateVars[\'__form\'] = '.$param[0].'; 
    38 $t->_privateVars[\'__displayed_ctrl\'] = array(); 
    39 '; 
    40     return $content; 
    41 } 
    42  
    43 ?> 
  • lib/jelix/plugins/tpl/html/block.formdata.php

    old new  
    99*/ 
    1010 
    1111/** 
    12  * a block to display only datas of a form 
     12 * a block to display only data of a form 
    1313 * 
    14  * usage : {formdatas $theformobject} here the form content {/formdatas
     14 * usage : {formdata $theformobject} here the form content {/formdata
    1515 * 
    1616 * @param jTplCompiler $compiler the template compiler 
    1717 * @param boolean $begin true if it is the begin of block, else false 
     
    2020 * @see jForms 
    2121 * @since 1.0.1 
    2222 */ 
    23 function jtpl_block_html_formdatas($compiler, $begin, $param=array()) 
     23function jtpl_block_html_formdata($compiler, $begin, $param=array()) 
    2424{ 
    2525 
    2626    if(!$begin){ 
     
    3030    } 
    3131 
    3232    if(count($param) != 1) { 
    33         $compiler->doError2('errors.tplplugin.block.bad.argument.number','formdatas',1); 
     33        $compiler->doError2('errors.tplplugin.block.bad.argument.number','formdata',1); 
    3434        return ''; 
    3535    } 
    3636 
  • lib/jelix/plugins/tpl/html/function.formdatasfull.php

    old new  
    1 <?php 
    2 /** 
    3 * @package      jelix 
    4 * @subpackage   jtpl_plugin 
    5 * @author       Laurent Jouanneau 
    6 * @contributor  Dominique Papin 
    7 * @copyright    2007-2008 Laurent Jouanneau, 2007 Dominique Papin 
    8 * @link         http://www.jelix.org 
    9 * @licence      GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
    10 */ 
    11  
    12 /** 
    13  * Display all datas of a form without the use of other plugins. 
    14  * 
    15  * @param jTpl $tpl template engine 
    16  * @param jFormsBase $form  the form to display 
    17  */ 
    18 function jtpl_function_html_formdatasfull($tpl, $form) 
    19 { 
    20  
    21     //$formBuilder = $form->getBuilder('html', $action, $params); 
    22  
    23     echo '<table class="jforms-table" border="0">'; 
    24  
    25  
    26     foreach( $form->getControls() as $ctrlref=>$ctrl){ 
    27         if($ctrl->type == 'submit' || $ctrl->type == 'reset' || $ctrl->type == 'hidden') continue; 
    28  
    29         echo '<tr><th scope="row">'; 
    30         echo htmlspecialchars($ctrl->label); 
    31         echo '</th><td>'; 
    32         $value = $ctrl->getDisplayValue($form->getData($ctrlref)); 
    33         if(is_array($value)){ 
    34             $s =''; 
    35             foreach($value as $v){ 
    36                 $s.=','.htmlspecialchars($v); 
    37             } 
    38             echo substr($s, 1); 
    39         }else 
    40             echo htmlspecialchars($value); 
    41  
    42         echo '</td></tr>'; 
    43  
    44     } 
    45  
    46     echo '</table>'; 
    47 } 
    48  
    49 ?> 
  • lib/jelix/plugins/jforms/html/html.jformsbuilder.php

    old new  
    121121            $span ='<span class="jforms-chkbox jforms-ctl-'.$ctrl->ref.'"><input type="checkbox"'; 
    122122 
    123123            if(is_array($value)){ 
    124                 foreach($ctrl->datasource->getDatas() as $v=>$label){ 
     124                foreach($ctrl->datasource->getData() as $v=>$label){ 
    125125                    echo $span,$attrs,$i,'" value="',htmlspecialchars($v),'"'; 
    126126                    if(in_array($v,$value)) 
    127127                        echo ' checked="checked"'; 
     
    129129                    $i++; 
    130130                } 
    131131            }else{ 
    132                 foreach($ctrl->datasource->getDatas() as $v=>$label){ 
     132                foreach($ctrl->datasource->getData() as $v=>$label){ 
    133133                    echo $span,$attrs,$i,'" value="',htmlspecialchars($v),'"'; 
    134134                    if($v == $value) 
    135135                        echo ' checked="checked"'; 
     
    149149                    $value=''; 
    150150            } 
    151151            $span ='<span class="jforms-radio jforms-ctl-'.$ctrl->ref.'"><input type="radio"'; 
    152             foreach($ctrl->datasource->getDatas() as $v=>$label){ 
     152            foreach($ctrl->datasource->getData() as $v=>$label){ 
    153153                echo $span,$id,$i,'" value="',htmlspecialchars($v),'"',($v==$value?' checked="checked"':''),$readonly,$class,$this->_endt; 
    154154                echo '<label for="',$this->_name,'_',$ctrl->ref,'_',$i,'">',htmlspecialchars($label),'</label></span>'; 
    155155                $i++; 
     
    167167            if (!$ctrl->required) { 
    168168                echo '<option value=""',($value==''?' selected="selected"':''),'></option>'; 
    169169            } 
    170             foreach($ctrl->datasource->getDatas() as $v=>$label){ 
     170            foreach($ctrl->datasource->getData() as $v=>$label){ 
    171171                echo '<option value="',htmlspecialchars($v),'"',($v==$value?' selected="selected"':''),'>',htmlspecialchars($label),'</option>'; 
    172172            } 
    173173            echo '</select>'; 
     
    181181                    $value = $value[0]; 
    182182 
    183183                if(is_array($value)){ 
    184                     foreach($ctrl->datasource->getDatas() as $v=>$label){ 
     184                    foreach($ctrl->datasource->getData() as $v=>$label){ 
    185185                        echo '<option value="',htmlspecialchars($v),'"',(in_array($v,$value)?' selected="selected"':''),'>',htmlspecialchars($label),'</option>'; 
    186186                    } 
    187187                }else{ 
    188                     foreach($ctrl->datasource->getDatas() as $v=>$label){ 
     188                    foreach($ctrl->datasource->getData() as $v=>$label){ 
    189189                        echo '<option value="',htmlspecialchars($v),'"',($v==$value?' selected="selected"':''),'>',htmlspecialchars($label),'</option>'; 
    190190                    } 
    191191                } 
     
    201201                } 
    202202 
    203203                echo '<select',$id,$readonly,$hint,$class,' size="',$ctrl->size,'">'; 
    204                 foreach($ctrl->datasource->getDatas() as $v=>$label){ 
     204                foreach($ctrl->datasource->getData() as $v=>$label){ 
    205205                    echo '<option value="',htmlspecialchars($v),'"',($v==$value?' selected="selected"':''),'>',htmlspecialchars($label),'</option>'; 
    206206                } 
    207207                echo '</select>'; 
     
    232232            if($ctrl->standalone){ 
    233233                echo '<input type="submit"',$id,$hint,' class="jforms-submit" value="',htmlspecialchars($ctrl->label),'"/>'; 
    234234            }else{ 
    235                 foreach($ctrl->datasource->getDatas() as $v=>$label){ 
     235                foreach($ctrl->datasource->getData() as $v=>$label){ 
    236236                    // because IE6 sucks with <button type=submit> (see ticket #431), we must use input :-( 
    237237                    echo '<input type="submit" name="',$ctrl->ref,'" id="',$this->_name,'_',$ctrl->ref,'_',htmlspecialchars($v),'"', 
    238238                        $hint,' class="jforms-submit" value="',htmlspecialchars($label),'"/> '; 
  • lib/jelix/plugins/db/pgsql/pgsql.daobuilder.php

    old new  
    3737 
    3838    protected function _getAutoIncrementPKField ($using = null){ 
    3939        if ($using === null){ 
    40             $using = $this->_datasParser->getProperties (); 
     40            $using = $this->_dataParser->getProperties (); 
    4141        } 
    4242 
    43         $tb = $this->_datasParser->getTables(); 
    44         $tb = $tb[$this->_datasParser->getPrimaryTable()]['realname']; 
     43        $tb = $this->_dataParser->getTables(); 
     44        $tb = $tb[$this->_dataParser->getPrimaryTable()]['realname']; 
    4545 
    4646        foreach ($using as $id=>$field) { 
    4747            if(!$field->isPK) 
  • lib/jelix/plugins/db/oci/oci.daobuilder.php

    old new  
    2626    protected function genOuterJoins(&$tables, $primaryTableName){ 
    2727        $sqlFrom = ''; 
    2828        $sqlWhere =''; 
    29         foreach($this->_datasParser->getOuterJoins() as $tablejoin){ 
     29        foreach($this->_dataParser->getOuterJoins() as $tablejoin){ 
    3030            $table= $tables[$tablejoin[0]]; 
    3131            $tablename = $this->_encloseName($table['name']); 
    3232 
  • lib/jelix/plugins/urls/simple/simple.urls.php

    old new  
    3737 
    3838 
    3939    /** 
    40     * Create a jurl object with the given action datas 
     40    * Create a jurl object with the given action data 
    4141    * @param jUrlAction $url  information about the action 
    4242    * @return jUrl the url correspondant to the action 
    4343    */ 
  • lib/jelix/plugins/urls/significant/significant.urls.php

    old new  
    7272class significantUrlEngine implements jIUrlEngine { 
    7373 
    7474    /** 
    75     * datas to create significant url 
     75    * data to create significant url 
    7676    * @var array 
    7777    */ 
    7878    protected $dataCreateUrl = null; 
    7979 
    8080    /** 
    81     * datas to parse and anaylise significant url, and to determine action, module etc.. 
     81    * data to parse and anaylise significant url, and to determine action, module etc.. 
    8282    * @var array 
    8383    */ 
    8484    protected $dataParseUrl =  null; 
     
    273273 
    274274 
    275275    /** 
    276     * Create a jurl object with the given action datas 
     276    * Create a jurl object with the given action data 
    277277    * @param jUrlAction $url  information about the action 
    278278    * @return jUrl the url correspondant to the action 
    279279    * @author      Laurent Jouanneau 
  • lib/jelix/plugins/coord/auth/auth.coord.ini.php.dist

    old new  
    6464; key to use to crypt the password in the cookie. replace it by your own words ! 
    6565persistant_crypt_key= exampleOfCryptKey 
    6666 
    67 ; the name of the cookie which is used to store datas for the authentification 
     67; the name of the cookie which is used to store data for the authentification 
    6868persistant_cookie_name=jelixAuthentificationCookie 
    6969 
    7070; duration of the validity of the cookie (in days). default is 1 day. 
     
    7777 
    7878;------- parameters for the "Db" driver 
    7979[Db] 
    80 ; name of the dao to get user datas 
     80; name of the dao to get user data 
    8181dao = "" 
    8282 
    8383; profil to use for jDb  
  • lib/jelix/forms/jFormsBase.class.php

    old new  
    7373    protected $_hiddens = array(); 
    7474 
    7575    /** 
    76      * the datas container 
     76     * the data container 
    7777     * @var jFormsDataContainer 
    7878     */ 
    7979    protected $_container=null; 
     
    9898 
    9999    /** 
    100100     * @param string $sel the form selector 
    101      * @param jFormsDataContainer $container the datas container 
    102      * @param boolean $reset says if the datas should be reset 
     101     * @param jFormsDataContainer $container the data container 
     102     * @param boolean $reset says if the data should be reset 
    103103     */ 
    104104    public function __construct($sel, &$container, $reset = false){ 
    105105        $this->_container = & $container; 
     
    110110    } 
    111111 
    112112    /** 
    113      * set form datas from request parameters 
     113     * set form data from request parameters 
    114114     */ 
    115115    public function initFromRequest(){ 
    116116        $req = $GLOBALS['gJCoord']->request; 
     
    134134                // because IE send the <button> content as value instead of the content of the 
    135135                // "value" attribute, we should verify it and get the real value 
    136136                // or when using <input type="submit">, we have only the label as value (in all browsers... 
    137                 $datas = $ctrl->datasource->getDatas(); 
    138                 if(!isset($datas[$value])) { 
    139                     $datas=array_flip($datas); 
    140                     if(isset($datas[$value])) { 
    141                         $value = $datas[$value]; 
     137                $data = $ctrl->datasource->getData(); 
     138                if(!isset($data[$value])) { 
     139                    $data=array_flip($data); 
     140                    if(isset($data[$value])) { 
     141                        $value = $data[$value]; 
    142142                    } 
    143143                } 
    144144            } 
    145             $this->_container->datas[$name] = $value; 
     145            $this->_container->data[$name] = $value; 
    146146        } 
    147147    } 
    148148 
    149149    /** 
    150      * check validity of all datas form 
     150     * check validity of all data form 
    151151     * @return boolean true if all is ok 
    152152     */ 
    153153    public function check(){ 
     
    161161    } 
    162162 
    163163    /** 
    164      * set form datas from a DAO 
     164     * set form data from a DAO 
    165165     * @param string $daoSelector the selector of a dao file 
    166166     * @param string $key the primary key for the dao. if null, takes the form ID as primary key 
    167167     * @param string $dbProfil the jDb profil to use with the dao 
     
    187187                    if($daorec->$name != '') { 
    188188                        $dt = new jDateTime(); 
    189189                        $dt->setFromString($daorec->$name, jDateTime::DB_DTFORMAT); 
    190                         $this->_container->datas[$name] = $dt->toString(jDateTime::LANG_DTFORMAT); 
     190                        $this->_container->data[$name] = $dt->toString(jDateTime::LANG_DTFORMAT); 
    191191                    } else { 
    192                         $this->_container->datas[$name] =''; 
     192                        $this->_container->data[$name] =''; 
    193193                    } 
    194194                }elseif($ctrl->datatype instanceof jDatatypeLocaleDate 
    195195                        && $prop[$name]['datatype'] == 'date') { 
    196196                    if($daorec->$name != '') { 
    197197                        $dt = new jDateTime(); 
    198198                        $dt->setFromString($daorec->$name, jDateTime::DB_DFORMAT); 
    199