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 131 131 && $s->method == $res[2] 132 132 && $s->request == $res[3]; 133 133 if(!$ok) 134 $msg=' contains unexpected data s('.$s->module.', '.$s->controller.', '.$s->method.', '.$s->request.')';134 $msg=' contains unexpected data ('.$s->module.', '.$s->controller.', '.$s->method.', '.$s->request.')'; 135 135 } 136 136 137 137 $this->assertTrue($ok , ' test of '.$sel. ' (should be '.($res === false ? 'invalid':'valid').')'); … … 182 182 && $s->method == $res[2] 183 183 && $s->request == $res[3]; 184 184 if(!$valid) 185 $msg=' contains unexpected data s('.$s->module.', '.$s->controller.', '.$s->method.', '.$s->request.')';185 $msg=' contains unexpected data ('.$s->module.', '.$s->controller.', '.$s->method.', '.$s->request.')'; 186 186 } 187 187 188 188 $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 33 33 $gJCoord->request->params['tag'] = array('professionnal','book'); 34 34 $form = jForms::fill('product'); 35 35 36 // save main data s36 // save main data 37 37 $this->id = $form->saveToDao('products'); 38 38 $records = array( 39 39 array('id'=>$this->id, 'name'=>'phone', 'price'=>45), 40 40 ); 41 41 $this->assertTableContainsRecords('product_test', $records); 42 42 43 // save data sof the tags control which is a container43 // save data of the tags control which is a container 44 44 $form->saveControlToDao('tag','product_tags',$this->id); 45 45 $records = array( 46 46 array('product_id'=>$this->id, 'tag'=>'professionnal'), … … 61 61 ); 62 62 $this->assertTableContainsRecords('product_test', $records); 63 63 64 // save data sof the tags control which is a container64 // save data of the tags control which is a container 65 65 $form->saveControlToDao('tag','product_tags',$this->id2); 66 66 $records = array( 67 67 array('product_id'=>$this->id, 'tag'=>'professionnal'), … … 78 78 $gJCoord->request->params['label'] = 'bonjour'; 79 79 $form = jForms::fill('label', array(1,'fr')); 80 80 81 // save main data s81 // save main data 82 82 $form->saveToDao('labels'); 83 83 $records = array( 84 84 array('key'=>1, 'lang'=>'fr', 'label'=>'bonjour'), … … 120 120 ); 121 121 $this->assertTableContainsRecords('product_test', $records); 122 122 123 // save data sof the tags control which is a container123 // save data of the tags control which is a container 124 124 $form->saveControlToDao('tag','product_tags',$this->id); 125 125 $records = array( 126 126 array('product_id'=>$this->id2, 'tag'=>'professionnal'), -
lib/jelix-modules/jauth/install/var/config/auth.coord.ini.php
old new 64 64 ; key to use to crypt the password in the cookie. replace it by your own words ! 65 65 persistant_crypt_key= exampleOfCryptKey 66 66 67 ; the name of the cookie which is used to store data sfor the authentification67 ; the name of the cookie which is used to store data for the authentification 68 68 persistant_cookie_name=jelixAuthentificationCookie 69 69 70 70 ; duration of the validity of the cookie (in days). default is 1 day. … … 74 74 75 75 ;------- parameters for the "Db" driver 76 76 [Db] 77 ; name of the dao to get user data s77 ; name of the dao to get user data 78 78 dao = "" 79 79 80 80 ; profil to use for jDb -
lib/jelix/plugins/tpl/html/block.form.php
old new 11 11 */ 12 12 13 13 /** 14 * a block to display an html form, with data sfrom a jforms14 * a block to display an html form, with data from a jforms 15 15 * 16 16 * usage : {form $theformobject,'submit_action', $submit_action_params} here form content {/form} 17 17 * -
lib/jelix/plugins/tpl/html/block.formdatas.php
old new 9 9 */ 10 10 11 11 /** 12 * a block to display only data sof a form12 * a block to display only data of a form 13 13 * 14 14 * usage : {formdatas $theformobject} here the form content {/formdatas} 15 15 * -
lib/jelix/plugins/tpl/html/function.formdatasfull.php
old new 10 10 */ 11 11 12 12 /** 13 * Display all data sof a form without the use of other plugins.13 * Display all data of a form without the use of other plugins. 14 14 * 15 15 * @param jTpl $tpl template engine 16 16 * @param jFormsBase $form the form to display -
lib/jelix/plugins/urls/simple/simple.urls.php
old new 37 37 38 38 39 39 /** 40 * Create a jurl object with the given action data s40 * Create a jurl object with the given action data 41 41 * @param jUrlAction $url information about the action 42 42 * @return jUrl the url correspondant to the action 43 43 */ -
lib/jelix/plugins/urls/significant/significant.urls.php
old new 72 72 class significantUrlEngine implements jIUrlEngine { 73 73 74 74 /** 75 * data sto create significant url75 * data to create significant url 76 76 * @var array 77 77 */ 78 78 protected $dataCreateUrl = null; 79 79 80 80 /** 81 * data sto 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.. 82 82 * @var array 83 83 */ 84 84 protected $dataParseUrl = null; … … 273 273 274 274 275 275 /** 276 * Create a jurl object with the given action data s276 * Create a jurl object with the given action data 277 277 * @param jUrlAction $url information about the action 278 278 * @return jUrl the url correspondant to the action 279 279 * @author Laurent Jouanneau -
lib/jelix/plugins/coord/auth/auth.coord.ini.php.dist
old new 64 64 ; key to use to crypt the password in the cookie. replace it by your own words ! 65 65 persistant_crypt_key= exampleOfCryptKey 66 66 67 ; the name of the cookie which is used to store data sfor the authentification67 ; the name of the cookie which is used to store data for the authentification 68 68 persistant_cookie_name=jelixAuthentificationCookie 69 69 70 70 ; duration of the validity of the cookie (in days). default is 1 day. … … 77 77 78 78 ;------- parameters for the "Db" driver 79 79 [Db] 80 ; name of the dao to get user data s80 ; name of the dao to get user data 81 81 dao = "" 82 82 83 83 ; profil to use for jDb -
lib/jelix/forms/jFormsBase.class.php
old new 65 65 protected $_uploads = array(); 66 66 67 67 /** 68 * the data scontainer68 * the data container 69 69 * @var jFormsDataContainer 70 70 */ 71 71 protected $_container=null; … … 84 84 85 85 /** 86 86 * @param string $sel the form selector 87 * @param jFormsDataContainer $container the data scontainer88 * @param boolean $reset says if the data sshould be reset87 * @param jFormsDataContainer $container the data container 88 * @param boolean $reset says if the data should be reset 89 89 */ 90 90 public function __construct($sel, &$container, $reset = false){ 91 91 $this->_container = & $container; … … 96 96 } 97 97 98 98 /** 99 * set form data sfrom request parameters99 * set form data from request parameters 100 100 */ 101 101 public function initFromRequest(){ 102 102 $req = $GLOBALS['gJCoord']->request; … … 134 134 } 135 135 136 136 /** 137 * check validity of all data sform137 * check validity of all data form 138 138 * @return boolean true if all is ok 139 139 */ 140 140 public function check(){ … … 148 148 } 149 149 150 150 /** 151 * set form data sfrom a DAO151 * set form data from a DAO 152 152 * @param string $daoSelector the selector of a dao file 153 153 * @param string $key the primary key for the dao. if null, takes the form ID as primary key 154 154 * @param string $dbProfil the jDb profil to use with the dao … … 201 201 } 202 202 203 203 /** 204 * save data susing a dao.204 * save data using a dao. 205 205 * it call insert or update depending the value of the formId stored in the container 206 206 * @param string $daoSelector the selector of a dao file 207 207 * @param string $key the primary key for the dao. if null, takes the form ID as primary key … … 275 275 } 276 276 277 277 /** 278 * set data sfrom a DAO, in a control278 * set data from a DAO, in a control 279 279 * 280 280 * The control must be a container like checkboxes or listbox with multiple attribute. 281 281 * The form should contain a formId … … 331 331 332 332 333 333 /** 334 * save data sof a control using a dao.334 * save data of a control using a dao. 335 335 * 336 336 * The control must be a container like checkboxes or listbox with multiple attribute. 337 337 * If the form contain a new record (no formId), you should call saveToDao before … … 450 450 } 451 451 452 452 /** 453 * @return array form data s453 * @return array form data 454 454 */ 455 455 public function getDatas(){ return $this->_container->datas; } 456 456 /** -
lib/jelix/forms/jFormsCompiler.class.php
old new 226 226 case 'radiobuttons': 227 227 case 'menulist': 228 228 case 'listbox': 229 // support of static data sor daos229 // support of static data or daos 230 230 if(isset($control['selectedvalue']) && isset($control->selectedvalues)){ 231 231 throw new jException('jelix~formserr.attribute.not.allowed',array('selectedvalue',$controltype,$this->sourceFile)); 232 232 } -
lib/jelix/forms/jFormsDatasource.class.php
old new 19 19 /** 20 20 * load and returns data to fill a control. The returned array should be 21 21 * an associative array key => label 22 * @return array the data s22 * @return array the data 23 23 */ 24 24 public function getDatas(); 25 25 -
lib/jelix/forms/jFormsDataContainer.class.php
old new 10 10 */ 11 11 12 12 /** 13 * this object is a container for form data s13 * this object is a container for form data 14 14 * @package jelix 15 15 * @subpackage forms 16 16 */ … … 31 31 public $formSelector; 32 32 33 33 /** 34 * list of errors detected in data s34 * list of errors detected in data 35 35 * @var array 36 36 */ 37 37 public $errors = array(); -
lib/jelix/forms/jForms.class.php
old new 34 34 private function __construct(){ } 35 35 36 36 /** 37 * Create a new form with empty data s37 * Create a new form with empty data 38 38 * 39 39 * Call it to create a new form, before to display it. 40 * Data sof the form are stored in the php session in a jFormsDataContainer object.41 * If a form with same id exists, data sare 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. 42 42 * 43 43 * @param string $formSel the selector of the xml jform file 44 44 * @param string $formId the id of the new instance (an id of a record for example) … … 61 61 /** 62 62 * get an existing instance of a form 63 63 * 64 * In your controller, call it before to re-display a form with existing data s.64 * In your controller, call it before to re-display a form with existing data. 65 65 * 66 66 * @param string $formSel the selector of the xml jform file 67 67 * @param string $formId the id of the form (if you use multiple instance of a form) … … 86 86 } 87 87 88 88 /** 89 * get an existing instance of a form, and fill it with data sprovided by the request89 * get an existing instance of a form, and fill it with data provided by the request 90 90 * 91 91 * use it in the action called to submit a webform. 92 92 * … … 104 104 /** 105 105 * destroy a form in the session 106 106 * 107 * use it after saving data sof 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. 108 108 * 109 109 * @param string $formSel the selector of the xml jform file 110 110 * @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 24 24 protected $_acceptSeveralErrors=false; 25 25 26 26 /** 27 * PHP Data sto send into the response27 * PHP Data to send into the response 28 28 */ 29 29 public $response = null; 30 30 -
lib/jelix/core/response/jResponseJson.class.php
old new 29 29 protected $_acceptSeveralErrors=false; 30 30 31 31 /** 32 * data sin PHP you want to send32 * data in PHP you want to send 33 33 * @var mixed 34 34 */ 35 35 public $datas = null; -
lib/jelix/core/response/jResponseRdf.class.php
old new 4 4 * @subpackage core_response 5 5 * @author Laurent Jouanneau 6 6 * @contributor 7 * @copyright 2006-200 7Laurent Jouanneau7 * @copyright 2006-2008 Laurent Jouanneau 8 8 * @link http://www.jelix.org 9 9 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 10 10 */ … … 13 13 /** 14 14 * output RDF content. 15 15 * This is a basic RDF generator, which generates content from 16 * an array of data s.16 * an array of data. 17 17 * @package jelix 18 18 * @subpackage core_response 19 19 * @see jResponse … … 37 37 * keep empty if you have a simple array of array in $datas : 38 38 * RDF content will be generated by a simple generator. 39 39 * if you specify a template, you don't have to fill other 40 * properties (except data s)40 * properties (except data) 41 41 * @var string 42 42 */ 43 43 public $template; 44 44 45 45 /** 46 * namespace of the attributes and elements that will content your data s.46 * namespace of the attributes and elements that will content your data. 47 47 * @var string 48 48 */ 49 49 public $resNs="http://dummy/rdf#"; -
lib/jelix/core/response/jResponseJsonrpc.class.php
old new 26 26 protected $_acceptSeveralErrors=false; 27 27 28 28 /** 29 * PHP data syou want to return29 * PHP data you want to return 30 30 * @var mixed 31 31 */ 32 32 public $response = null; -
lib/jelix/core/jUrl.class.php
old new 33 33 public function parse($scriptNamePath, $pathinfo, $params ); 34 34 35 35 /** 36 * Create a jurl object with the given action data s36 * Create a jurl object with the given action data 37 37 * @param jUrlAction $url information about the action 38 38 * @return jUrl the url correspondant to the action 39 39 */ … … 110 110 } 111 111 112 112 /** 113 * A container to store url data sfor an action113 * A container to store url data for an action 114 114 * @package jelix 115 115 * @subpackage core_url 116 116 * @author Laurent Jouanneau … … 155 155 156 156 157 157 /** 158 * Object that contains url data s, and which provides static method helpers158 * Object that contains url data, and which provides static method helpers 159 159 * @package jelix 160 160 * @subpackage core_url 161 161 * @author Laurent Jouanneau (for the original code from Copix and enhancement for jelix) -
lib/jelix/acl/jAcl.class.php
old new 25 25 public function getRight($subject, $resource=null); 26 26 27 27 /** 28 * clear some cached data s, it a cache exists in the driver..28 * clear some cached data, it a cache exists in the driver.. 29 29 */ 30 30 public function clearCache(); 31 31 -
lib/jelix/utils/jIniFile.class.php
old new 31 31 } 32 32 33 33 /** 34 * write some data sin an ini file35 * the data sarray should follow the same structure returned by34 * write some data in an ini file 35 * the data array should follow the same structure returned by 36 36 * the read method (or parse_ini_file) 37 37 * @param array $array the content of an ini file 38 38 * @param string $filename the path and the name of the file use to store the content -
lib/jelix/utils/jXmlRpc.class.php
old new 73 73 /** 74 74 * decode an xmlrpc response 75 75 * @param string $xmlcontent the content of the response, in xmlrpc format 76 * @return mixed data sstored into the response76 * @return mixed data stored into the response 77 77 */ 78 78 public static function decodeResponse($xmlcontent){ 79 79 $xml = simplexml_load_string($xmlcontent); -
lib/jelix/auth/jAuth.class.php
old new 27 27 function __construct($params); 28 28 29 29 /** 30 * creates a new user object, with some first data s..30 * creates a new user object, with some first data.. 31 31 * Careful : it doesn't create a user in a database for example. Just an object. 32 32 * @param string $login the user login 33 33 * @param string $password the user password … … 45 45 public function saveNewUser($user); 46 46 47 47 /** 48 * Erase user data sof the user $login48 * Erase user data of the user $login 49 49 * @param string $login the login of the user to remove 50 50 */ 51 51 public function removeUser($login); 52 52 53 53 /** 54 * save updated data sof a user54 * save updated data of a user 55 55 * warning : should not save the password ! 56 56 * @param object $user the user data container 57 57 */ … … 148 148 } 149 149 150 150 /** 151 * load user data s151 * load user data 152 152 * 153 153 * This method returns an object, generated by the driver, and which contains 154 * data scorresponding to the given login. This method should be called if you want155 * to update data sof 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. 156 156 * 157 157 * @param string $login 158 158 * @return object the user … … 194 194 * the type of $user depends of the driver, so it can have other properties. 195 195 * 196 196 * @param object $user the user data 197 * @return object the user (eventually, with additional data s)197 * @return object the user (eventually, with additional data) 198 198 */ 199 199 public static function saveNewUser($user){ 200 200 $dr = self::_getDriver(); … … 205 205 } 206 206 207 207 /** 208 * update user data s208 * update user data 209 209 * 210 210 * It send a AuthUpdateUser event if the saving has succeed. If you want 211 211 * to change the user password, you must use jAuth::changePassword method … … 220 220 * </pre> 221 221 * the type of $user depends of the driver, so it can have other properties. 222 222 * 223 * @param object $user user data s223 * @param object $user user data 224 224 */ 225 225 public static function updateUser($user){ 226 226 $dr = self::_getDriver(); … … 363 363 364 364 /** 365 365 * return the user stored in the php session 366 * @return object the user data s366 * @return object the user data 367 367 */ 368 368 public static function getUserSession (){ 369 369 $config = self::_getConfig(); -
lib/jelix/dao/jDaoParser.class.php
old new 15 15 */ 16 16 17 17 /** 18 * extract data sfrom a dao xml content18 * extract data from a dao xml content 19 19 * @package jelix 20 20 * @subpackage dao 21 21 * @see jDaoCompiler -
lib/jelix/dao/jDaoGenerator.class.php
old new 686 686 687 687 /** 688 688 * build 'where' clause from conditions declared with condition tag in a user method 689 * @param jDaoConditions $cond the condition object which contains conditions data s689 * @param jDaoConditions $cond the condition object which contains conditions data 690 690 * @param array $fields array of jDaoProperty 691 691 * @param array $params list of parameters name of the method 692 692 * @param boolean $withPrefix true if the field name should be preceded by the table name/table alias … … 744 744 /** 745 745 * build SQL WHERE clause 746 746 * Used by _buildConditions. And this method call itself recursively 747 * @param jDaoCondition $cond a condition object which contains conditions data s747 * @param jDaoCondition $cond a condition object which contains conditions data 748 748 * @param array $fields array of jDaoProperty 749 749 * @param array $params list of parameters name of the method 750 750 * @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 79 79 } 80 80 81 81 /** 82 * adds data sin the responses list82 * adds data in the responses list 83 83 * @param array $response a single response 84 84 */ 85 85 public function add ($response) { -
lib/jelix/controllers/jControllerDaoCrud.class.php
old new 123 123 } 124 124 125 125 /** 126 * you can do your own data scheck of a form by overloading this method.126 * you can do your own data check of a form by overloading this method. 127 127 * You can also do some other things. It is called only if the $form->check() is ok. 128 * and before the save of the data s.128 * and before the save of the data. 129 129 * @param jFormsBase $form the current form 130 130 * @param boolean $calltype true for an update, false for a create 131 131 * @return boolean true if it is ok. … … 247 247 } 248 248 249 249 /** 250 * save data sof a form in a new record250 * save data of a form in a new record 251 251 */ 252 252 function savecreate(){ 253 253 $form = jForms::fill($this->form); … … 347 347 } 348 348 349 349 /** 350 * save data sof a form in a new record350 * save data of a form in a new record 351 351 */ 352 352 function saveupdate(){ 353 353 $rep = $this->getResponse('redirect');
