Ticket #468: ticket468-1.0.x.diff

File ticket468-1.0.x.diff, 25.8 kB (added by bastnic, 7 months ago)
  • 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.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'), 
  • 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  
    1111*/ 
    1212 
    1313/** 
    14  * a block to display an html form, with datas from a jforms 
     14 * a block to display an html form, with data from a jforms 
    1515 * 
    1616 * usage : {form $theformobject,'submit_action', $submit_action_params} here form content {/form} 
    1717 * 
  • lib/jelix/plugins/tpl/html/block.formdatas.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 * 
    1414 * usage : {formdatas $theformobject} here the form content {/formdatas} 
    1515 * 
  • lib/jelix/plugins/tpl/html/function.formdatasfull.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 
  • 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  
    6565    protected $_uploads = array(); 
    6666 
    6767    /** 
    68      * the datas container 
     68     * the data container 
    6969     * @var jFormsDataContainer 
    7070     */ 
    7171    protected $_container=null; 
     
    8484 
    8585    /** 
    8686     * @param string $sel the form selector 
    87      * @param jFormsDataContainer $container the datas container 
    88      * @param boolean $reset says if the datas should be reset 
     87     * @param jFormsDataContainer $container the data container 
     88     * @param boolean $reset says if the data should be reset 
    8989     */ 
    9090    public function __construct($sel, &$container, $reset = false){ 
    9191        $this->_container = & $container; 
     
    9696    } 
    9797 
    9898    /** 
    99      * set form datas from request parameters 
     99     * set form data from request parameters 
    100100     */ 
    101101    public function initFromRequest(){ 
    102102        $req = $GLOBALS['gJCoord']->request; 
     
    134134    } 
    135135 
    136136    /** 
    137      * check validity of all datas form 
     137     * check validity of all data form 
    138138     * @return boolean true if all is ok 
    139139     */ 
    140140    public function check(){ 
     
    148148    } 
    149149 
    150150    /** 
    151      * set form datas from a DAO 
     151     * set form data from a DAO 
    152152     * @param string $daoSelector the selector of a dao file 
    153153     * @param string $key the primary key for the dao. if null, takes the form ID as primary key 
    154154     * @param string $dbProfil the jDb profil to use with the dao 
     
    201201    } 
    202202 
    203203    /** 
    204      * save datas using a dao. 
     204     * save data using a dao. 
    205205     * it call insert or update depending the value of the formId stored in the container 
    206206     * @param string $daoSelector the selector of a dao file 
    207207     * @param string $key the primary key for the dao. if null, takes the form ID as primary key 
     
    275275    } 
    276276 
    277277    /** 
    278      * set datas from a DAO, in a control 
     278     * set data from a DAO, in a control 
    279279     * 
    280280     * The control must be a container like checkboxes or listbox with multiple attribute. 
    281281     * The form should contain a formId 
     
    331331 
    332332 
    333333    /** 
    334      * save datas of a control using a dao. 
     334     * save data of a control using a dao. 
    335335     * 
    336336     * The control must be a container like checkboxes or listbox with multiple attribute. 
    337337     * If the form contain a new record (no formId), you should call saveToDao before 
     
    450450    } 
    451451 
    452452    /** 
    453      * @return array form datas 
     453     * @return array form data 
    454454     */ 
    455455    public function getDatas(){ return $this->_container->datas; } 
    456456    /** 
  • lib/jelix/forms/jFormsCompiler.class.php

    old new  
    226226            case 'radiobuttons': 
    227227            case 'menulist': 
    228228            case 'listbox': 
    229                 // support of static datas or daos 
     229                // support of static data or daos 
    230230                if(isset($control['selectedvalue']) && isset($control->selectedvalues)){ 
    231231                    throw new jException('jelix~formserr.attribute.not.allowed',array('selectedvalue',$controltype,$this->sourceFile)); 
    232232                } 
  • lib/jelix/forms/jFormsDatasource.class.php

    old new  
    1919    /** 
    2020     * load and returns data to fill a control. The returned array should be  
    2121     * an associative array  key => label 
    22      * @return array the datas 
     22     * @return array the data 
    2323     */ 
    2424    public function getDatas(); 
    2525 
  • lib/jelix/forms/jFormsDataContainer.class.php

    old new  
    1010*/ 
    1111 
    1212/** 
    13  * this object is a container for form datas 
     13 * this object is a container for form data 
    1414 * @package     jelix 
    1515 * @subpackage  forms 
    1616 */ 
     
    3131    public $formSelector; 
    3232 
    3333    /** 
    34      * list of errors detected in datas 
     34     * list of errors detected in data 
    3535     * @var array 
    3636     */ 
    3737    public $errors = array(); 
  • lib/jelix/forms/jForms.class.php

    old new  
    3434    private function __construct(){ } 
    3535 
    3636    /** 
    37      * Create a new form with empty datas 
     37     * Create a new form with empty data 
    3838     * 
    3939     * Call it to create a new form, before to display it. 
    40      * Datas of the form are stored in the php session in a jFormsDataContainer object. 
    41      * If a form with same id exists, datas are erased. 
     40     * Data of the form are stored in the php session in a jFormsDataContainer object. 
     41     * If a form with same id exists, data are erased. 
    4242     * 
    4343     * @param string $formSel the selector of the xml jform file 
    4444     * @param string $formId  the id of the new instance (an id of a record for example) 
     
    6161    /** 
    6262     * get an existing instance of a form 
    6363     * 
    64      * In your controller, call it before to re-display a form with existing datas
     64     * In your controller, call it before to re-display a form with existing data
    6565     * 
    6666     * @param string $formSel the selector of the xml jform file 
    6767     * @param string $formId  the id of the form (if you use multiple instance of a form) 
     
    8686    } 
    8787 
    8888    /** 
    89      * get an existing instance of a form, and fill it with datas provided by the request 
     89     * get an existing instance of a form, and fill it with data provided by the request 
    9090     * 
    9191     * use it in the action called to submit a webform. 
    9292     * 
     
    104104    /** 
    105105     * destroy a form in the session 
    106106     * 
    107      * use it after saving datas of a form, and if you don't want to re-display the form. 
     107     * use it after saving data of a form, and if you don't want to re-display the form. 
    108108     * 
    109109     * @param string $formSel the selector of the xml jform file 
    110110     * @param string $formId  the id of the form (if you use multiple instance of a form) 
  • lib/jelix/core/response/jResponseXmlrpc.class.php

    old new  
    2424    protected $_acceptSeveralErrors=false; 
    2525 
    2626    /** 
    27      * PHP Datas to send into the response 
     27     * PHP Data to send into the response 
    2828     */ 
    2929    public $response = null; 
    3030 
  • lib/jelix/core/response/jResponseJson.class.php

    old new  
    2929    protected $_acceptSeveralErrors=false; 
    3030 
    3131    /** 
    32      * datas in PHP you want to send 
     32     * data in PHP you want to send 
    3333     * @var mixed 
    3434     */ 
    3535    public $datas = null; 
  • lib/jelix/core/response/jResponseRdf.class.php

    old new  
    44* @subpackage  core_response 
    55* @author      Laurent Jouanneau 
    66* @contributor 
    7 * @copyright   2006-2007 Laurent Jouanneau 
     7* @copyright   2006-2008 Laurent Jouanneau 
    88* @link        http://www.jelix.org 
    99* @licence     GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
    1010*/ 
     
    1313/** 
    1414* output RDF content. 
    1515* This is a basic RDF generator, which generates content from 
    16 * an array of datas
     16* an array of data
    1717* @package  jelix 
    1818* @subpackage core_response 
    1919* @see jResponse 
     
    3737     * keep empty if you have a simple array of array in $datas : 
    3838     * RDF content will be generated by a simple generator. 
    3939     * if you specify a template, you don't have to fill other 
    40      * properties (except datas
     40     * properties (except data
    4141     * @var string 
    4242     */ 
    4343    public $template; 
    4444 
    4545    /** 
    46      * namespace of the attributes and elements that will content your datas
     46     * namespace of the attributes and elements that will content your data
    4747     * @var string 
    4848     */ 
    4949    public $resNs="http://dummy/rdf#"; 
  • lib/jelix/core/response/jResponseJsonrpc.class.php

    old new  
    2626    protected $_acceptSeveralErrors=false; 
    2727 
    2828    /** 
    29      * PHP datas you want to return 
     29     * PHP data you want to return 
    3030     * @var mixed 
    3131     */ 
    3232    public $response = null; 
  • lib/jelix/core/jUrl.class.php

    old new  
    3333    public function parse($scriptNamePath, $pathinfo, $params ); 
    3434 
    3535    /** 
    36     * Create a jurl object with the given action datas 
     36    * Create a jurl object with the given action data 
    3737    * @param jUrlAction $url  information about the action 
    3838    * @return jUrl the url correspondant to the action 
    3939    */ 
     
    110110} 
    111111 
    112112/** 
    113  * A container to store url datas for an action 
     113 * A container to store url data for an action 
    114114 * @package  jelix 
    115115 * @subpackage core_url 
    116116 * @author      Laurent Jouanneau 
     
    155155 
    156156 
    157157/** 
    158  * Object that contains url datas, and which provides static method helpers 
     158 * Object that contains url data, and which provides static method helpers 
    159159 * @package  jelix 
    160160 * @subpackage core_url 
    161161 * @author      Laurent Jouanneau (for the original code from Copix and enhancement for jelix) 
  • lib/jelix/acl/jAcl.class.php

    old new  
    2525    public function getRight($subject, $resource=null); 
    2626 
    2727    /** 
    28      * clear some cached datas, it a cache exists in the driver.. 
     28     * clear some cached data, it a cache exists in the driver.. 
    2929     */ 
    3030    public function clearCache(); 
    3131 
  • lib/jelix/utils/jIniFile.class.php

    old new  
    3131    } 
    3232 
    3333    /** 
    34      * write some datas in an ini file 
    35      * the datas array should follow the same structure returned by 
     34     * write some data in an ini file 
     35     * the data array should follow the same structure returned by 
    3636     * the read method (or parse_ini_file) 
    3737     * @param array $array the content of an ini file 
    3838     * @param string $filename the path and the name of the file use to store the content 
  • lib/jelix/utils/jXmlRpc.class.php

    old new  
    7373    /** 
    7474     * decode an xmlrpc response 
    7575     * @param string $xmlcontent the content of the response, in xmlrpc format 
    76      * @return mixed datas stored into the response 
     76     * @return mixed data stored into the response 
    7777     */ 
    7878    public static function decodeResponse($xmlcontent){ 
    7979        $xml = simplexml_load_string($xmlcontent); 
  • lib/jelix/auth/jAuth.class.php

    old new  
    2727    function __construct($params); 
    2828 
    2929    /** 
    30      * creates a new user object, with some first datas.. 
     30     * creates a new user object, with some first data.. 
    3131     * Careful : it doesn't create a user in a database for example. Just an object. 
    3232     * @param string $login the user login 
    3333     * @param string $password the user password 
     
    4545    public function saveNewUser($user); 
    4646 
    4747    /** 
    48      * Erase user datas of the user $login 
     48     * Erase user data of the user $login 
    4949     * @param string $login the login of the user to remove 
    5050     */ 
    5151    public function removeUser($login); 
    5252 
    5353    /** 
    54     * save updated datas of a user 
     54    * save updated data of a user 
    5555    * warning : should not save the password ! 
    5656    * @param object $user the user data container 
    5757    */ 
     
    148148    } 
    149149 
    150150    /** 
    151      * load user datas 
     151     * load user data 
    152152     * 
    153153     * This method returns an object, generated by the driver, and which contains 
    154      * datas corresponding to the given login. This method should be called if you want 
    155      * to update datas of a user. see updateUser method. 
     154     * data corresponding to the given login. This method should be called if you want 
     155     * to update data of a user. see updateUser method. 
    156156     * 
    157157     * @param string $login 
    158158     * @return object the user 
     
    194194     *  the type of $user depends of the driver, so it can have other properties. 
    195195     * 
    196196     * @param  object $user the user data 
    197      * @return object the user (eventually, with additional datas
     197     * @return object the user (eventually, with additional data
    198198     */ 
    199199    public static function saveNewUser($user){ 
    200200        $dr = self::_getDriver(); 
     
    205205    } 
    206206 
    207207    /** 
    208      * update user datas 
     208     * update user data 
    209209     *  
    210210     * It send a AuthUpdateUser event if the saving has succeed. If you want 
    211211     * to change the user password, you must use jAuth::changePassword method 
     
    220220     *  </pre> 
    221221     *  the type of $user depends of the driver, so it can have other properties. 
    222222     *  
    223      * @param object $user  user datas 
     223     * @param object $user  user data 
    224224     */ 
    225225    public static function updateUser($user){ 
    226226        $dr = self::_getDriver(); 
     
    363363 
    364364   /** 
    365365    * return the user stored in the php session 
    366     * @return object the user datas 
     366    * @return object the user data 
    367367    */ 
    368368    public static function getUserSession (){ 
    369369        $config = self::_getConfig(); 
  • lib/jelix/dao/jDaoParser.class.php

    old new  
    1515*/ 
    1616 
    1717/** 
    18  * extract datas from a dao xml content 
     18 * extract data from a dao xml content 
    1919 * @package  jelix 
    2020 * @subpackage dao 
    2121 * @see jDaoCompiler 
  • lib/jelix/dao/jDaoGenerator.class.php

    old new  
    686686 
    687687    /** 
    688688     * build 'where' clause from conditions declared with condition tag in a user method 
    689      * @param jDaoConditions $cond the condition object which contains conditions datas 
     689     * @param jDaoConditions $cond the condition object which contains conditions data 
    690690     * @param array $fields  array of jDaoProperty 
    691691     * @param array $params  list of parameters name of the method 
    692692     * @param boolean $withPrefix true if the field name should be preceded by the table name/table alias 
     
    744744    /** 
    745745     * build SQL WHERE clause  
    746746     * Used by _buildConditions. And this method call itself recursively 
    747      * @param jDaoCondition $cond a condition object which contains conditions datas 
     747     * @param jDaoCondition $cond a condition object which contains conditions data 
    748748     * @param array $fields  array of jDaoProperty 
    749749     * @param array $params  list of parameters name of the method 
    750750     * @param boolean $withPrefix true if the field name should be preceded by the table name/table alias 
  • lib/jelix/events/jEvent.class.php

    old new  
    7979    } 
    8080 
    8181    /** 
    82     * adds datas in the responses list 
     82    * adds data in the responses list 
    8383    * @param array $response a single response 
    8484    */ 
    8585    public function add ($response) { 
  • lib/jelix/controllers/jControllerDaoCrud.class.php

    old new  
    123123    } 
    124124 
    125125    /** 
    126      * you can do your own datas check of a form by overloading this method. 
     126     * you can do your own data check of a form by overloading this method. 
    127127     * You can also do some other things. It is called only if the $form->check() is ok. 
    128      * and before the save of the datas
     128     * and before the save of the data
    129129     * @param jFormsBase $form the current form 
    130130     * @param boolean $calltype   true for an update, false for a create 
    131131     * @return boolean true if it is ok. 
     
    247247    } 
    248248 
    249249    /** 
    250      * save datas of a form in a new record 
     250     * save data of a form in a new record 
    251251     */ 
    252252    function savecreate(){ 
    253253        $form = jForms::fill($this->form); 
     
    347347    } 
    348348 
    349349    /** 
    350      * save datas of a form in a new record 
     350     * save data of a form in a new record 
    351351     */ 
    352352    function saveupdate(){ 
    353353        $rep = $this->getResponse('redirect'); 
Download in other formats: Original Format