Changeset 575
- Timestamp:
- 09/07/07 15:29:38 (1 year ago)
- Files:
-
- trunk/build/manifests/jelix-dev.mn (modified) (2 diffs)
- trunk/build/manifests/jelix-dev.mn (modified) (2 diffs)
- trunk/lib/jelix-scripts/commands/createdao.cmd.php (modified) (3 diffs)
- trunk/lib/jelix-scripts/commands/createdao.cmd.php (modified) (3 diffs)
- trunk/lib/jelix-scripts/commands/createdaocrud.cmd.php (added)
- trunk/lib/jelix-scripts/commands/createdaocrud.cmd.php (added)
- trunk/lib/jelix-scripts/commands/createform.cmd.php (added)
- trunk/lib/jelix-scripts/commands/createform.cmd.php (added)
- trunk/lib/jelix-scripts/commands/createzone.cmd.php (modified) (1 diff)
- trunk/lib/jelix-scripts/commands/createzone.cmd.php (modified) (1 diff)
- trunk/lib/jelix-scripts/includes/command.class.php (modified) (2 diffs)
- trunk/lib/jelix-scripts/includes/command.class.php (modified) (2 diffs)
- trunk/lib/jelix-scripts/includes/utils.lib.php (modified) (2 diffs)
- trunk/lib/jelix-scripts/includes/utils.lib.php (modified) (2 diffs)
- trunk/lib/jelix-scripts/templates/controller.daocrud.tpl (added)
- trunk/lib/jelix-scripts/templates/controller.daocrud.tpl (added)
- trunk/lib/jelix-scripts/templates/form.xml.tpl (added)
- trunk/lib/jelix-scripts/templates/form.xml.tpl (added)
- trunk/lib/jelix/dao/jDaoParser.class.php (modified) (1 diff)
- trunk/lib/jelix/dao/jDaoParser.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/build/manifests/jelix-dev.mn
r545 r575 100 100 CREDITS 101 101 cd lib/jelix-scripts/commands 102 createapp.cmd.php103 createdao.cmd.php104 help.cmd.php105 createmodule.cmd.php106 createctrl.cmd.php107 createzone.cmd.php108 createaction.cmd.php109 cleartemp.cmd.php110 aclvalue.cmd.php111 102 aclgroup.cmd.php 112 103 aclright.cmd.php 104 aclvalue.cmd.php 105 cleartemp.cmd.php 106 createaction.cmd.php 107 createapp.cmd.php 108 createctrl.cmd.php 109 createdao.cmd.php 110 createdaocrud.cmd.php 111 createform.cmd.php 112 createmodule.cmd.php 113 createzone.cmd.php 114 help.cmd.php 113 115 cd lib/jelix-scripts/includes 114 116 command.class.php … … 117 119 module.xml.tpl 118 120 dao.xml.tpl 121 form.xml.tpl 119 122 dao_empty.xml.tpl 120 123 controller.tpl 124 controller.cmdline.tpl 125 controller.daocrud.tpl 121 126 template.tpl 122 127 zone.tpl 123 128 project.xml.tpl 124 129 application.init.php.tpl 125 controller.cmdline.tpl126 130 cd lib/jelix-scripts/templates/www 127 131 xmlrpc.php.tpl trunk/build/manifests/jelix-dev.mn
r545 r575 100 100 CREDITS 101 101 cd lib/jelix-scripts/commands 102 createapp.cmd.php103 createdao.cmd.php104 help.cmd.php105 createmodule.cmd.php106 createctrl.cmd.php107 createzone.cmd.php108 createaction.cmd.php109 cleartemp.cmd.php110 aclvalue.cmd.php111 102 aclgroup.cmd.php 112 103 aclright.cmd.php 104 aclvalue.cmd.php 105 cleartemp.cmd.php 106 createaction.cmd.php 107 createapp.cmd.php 108 createctrl.cmd.php 109 createdao.cmd.php 110 createdaocrud.cmd.php 111 createform.cmd.php 112 createmodule.cmd.php 113 createzone.cmd.php 114 help.cmd.php 113 115 cd lib/jelix-scripts/includes 114 116 command.class.php … … 117 119 module.xml.tpl 118 120 dao.xml.tpl 121 form.xml.tpl 119 122 dao_empty.xml.tpl 120 123 controller.tpl 124 controller.cmdline.tpl 125 controller.daocrud.tpl 121 126 template.tpl 122 127 zone.tpl 123 128 project.xml.tpl 124 129 application.init.php.tpl 125 controller.cmdline.tpl126 130 cd lib/jelix-scripts/templates/www 127 131 xmlrpc.php.tpl trunk/lib/jelix-scripts/commands/createdao.cmd.php
r413 r575 74 74 switch($prop->type){ 75 75 76 case 'varchar':77 76 case 'text': 78 77 case 'mediumtext': 79 78 case 'longtext': 80 79 case 'tinytext': 80 $type='text'; 81 break; 82 case 'varchar': 81 83 case 'char': 82 84 case 'enum': … … 112 114 113 115 case 'date': 116 $type='date'; 117 break; 118 case 'timestamp': 114 119 case 'datetime': 115 case 'timestamp': 120 $type='datetime'; 121 break; 116 122 case 'time': 117 $type=' date';123 $type='time'; 118 124 break; 119 125 default: … … 131 137 } 132 138 if($prop->not_null && $type != 'autoincrement') 133 $properties.=' required=" yes"';139 $properties.=' required="true"'; 134 140 $properties.='/>'; 135 141 } trunk/lib/jelix-scripts/commands/createdao.cmd.php
r413 r575 74 74 switch($prop->type){ 75 75 76 case 'varchar':77 76 case 'text': 78 77 case 'mediumtext': 79 78 case 'longtext': 80 79 case 'tinytext': 80 $type='text'; 81 break; 82 case 'varchar': 81 83 case 'char': 82 84 case 'enum': … … 112 114 113 115 case 'date': 116 $type='date'; 117 break; 118 case 'timestamp': 114 119 case 'datetime': 115 case 'timestamp': 120 $type='datetime'; 121 break; 116 122 case 'time': 117 $type=' date';123 $type='time'; 118 124 break; 119 125 default: … … 131 137 } 132 138 if($prop->not_null && $type != 'autoincrement') 133 $properties.=' required=" yes"';139 $properties.=' required="true"'; 134 140 $properties.='/>'; 135 141 } trunk/lib/jelix-scripts/commands/createzone.cmd.php
r413 r575 23 23 MODULE : le nom du module concerné. 24 24 ZONE : nom de la zone à créer. 25 TEMPLATE (facultatif) : nom du template associé à créer (par defaut, à25 TEMPLATE (facultatif) : nom du template associé à créer (par defaut, il a 26 26 le nom de la zone).", 27 27 'en'=>" trunk/lib/jelix-scripts/commands/createzone.cmd.php
r413 r575 23 23 MODULE : le nom du module concerné. 24 24 ZONE : nom de la zone à créer. 25 TEMPLATE (facultatif) : nom du template associé à créer (par defaut, à25 TEMPLATE (facultatif) : nom du template associé à créer (par defaut, il a 26 26 le nom de la zone).", 27 27 'en'=>" trunk/lib/jelix-scripts/includes/command.class.php
r10 r575 2 2 /** 3 3 * @package jelix-scripts 4 * @version $Id$5 4 * @author Jouanneau Laurent 6 5 * @contributor 7 * @copyright 2005-200 6Jouanneau laurent6 * @copyright 2005-2007 Jouanneau laurent 8 7 * @link http://www.jelix.org 9 8 * @licence GNU General Public Licence see LICENCE file or http://www.gnu.org/licenses/gpl.html … … 17 16 18 17 public $name; 18 19 /** 20 * options available for the command 21 * the array contains items like : 22 * key = name of the option '-foo' 23 * value = boolean: true if the option need a value after it 24 * @var array 25 */ 19 26 public $allowed_options=array(); 27 28 /** 29 * parameters needed for the command 30 * the array contains items like : 31 * key = name of the variable which will contains the parameter value 32 * value = boolean: false if the parameter is optional 33 * Optional parameters should be declared at the end of the array 34 * The last parameter declaration could have '...' as name, so it will contains 35 * in an array any additional values given in the command line 36 * @var array 37 */ 20 38 public $allowed_parameters=array(); 21 39 trunk/lib/jelix-scripts/includes/command.class.php
r10 r575 2 2 /** 3 3 * @package jelix-scripts 4 * @version $Id$5 4 * @author Jouanneau Laurent 6 5 * @contributor 7 * @copyright 2005-200 6Jouanneau laurent6 * @copyright 2005-2007 Jouanneau laurent 8 7 * @link http://www.jelix.org 9 8 * @licence GNU General Public Licence see LICENCE file or http://www.gnu.org/licenses/gpl.html … … 17 16 18 17 public $name; 18 19 /** 20 * options available for the command 21 * the array contains items like : 22 * key = name of the option '-foo' 23 * value = boolean: true if the option need a value after it 24 * @var array 25 */ 19 26 public $allowed_options=array(); 27 28 /** 29 * parameters needed for the command 30 * the array contains items like : 31 * key = name of the variable which will contains the parameter value 32 * value = boolean: false if the parameter is optional 33 * Optional parameters should be declared at the end of the array 34 * The last parameter declaration could have '...' as name, so it will contains 35 * in an array any additional values given in the command line 36 * @var array 37 */ 20 38 public $allowed_parameters=array(); 21 39 trunk/lib/jelix-scripts/includes/utils.lib.php
r413 r575 2 2 /** 3 3 * @package jelix-scripts 4 * @version $Id$5 4 * @author Jouanneau Laurent 6 5 * @contributor 7 * @copyright 2005-200 6Jouanneau laurent6 * @copyright 2005-2007 Jouanneau laurent 8 7 * @link http://www.jelix.org 9 8 * @licence GNU General Public Licence see LICENCE file or http://www.gnu.org/licenses/gpl.html … … 139 138 140 139 function jxs_init_jelix_env(){ 141 global $gJConfig; 142 143 $gJConfig = jConfig::load(JELIXS_APP_CONFIG_FILE); 144 145 140 global $gJConfig; 141 if(!$gJConfig) 142 $gJConfig = jConfig::load(JELIXS_APP_CONFIG_FILE); 146 143 } 147 144 trunk/lib/jelix-scripts/includes/utils.lib.php
r413 r575 2 2 /** 3 3 * @package jelix-scripts 4 * @version $Id$5 4 * @author Jouanneau Laurent 6 5 * @contributor 7 * @copyright 2005-200 6Jouanneau laurent6 * @copyright 2005-2007 Jouanneau laurent 8 7 * @link http://www.jelix.org 9 8 * @licence GNU General Public Licence see LICENCE file or http://www.gnu.org/licenses/gpl.html … … 139 138 140 139 function jxs_init_jelix_env(){ 141 global $gJConfig; 142 143 $gJConfig = jConfig::load(JELIXS_APP_CONFIG_FILE); 144 145 140 global $gJConfig; 141 if(!$gJConfig) 142 $gJConfig = jConfig::load(JELIXS_APP_CONFIG_FILE); 146 143 } 147 144 trunk/lib/jelix/dao/jDaoParser.class.php
r450 r575 305 305 } 306 306 $params['datatype']=trim(strtolower($params['datatype'])); 307 $this->needsQuotes = in_array ($params['datatype'], array ('string', ' date', 'datetime', 'time'));307 $this->needsQuotes = in_array ($params['datatype'], array ('string', 'varchar', 'text', 'date', 'datetime', 'time')); 308 308 309 309 if (!in_array ($params['datatype'], array ('autoincrement', 'bigautoincrement', 'int', 'datetime', 'time', 310 'integer', 'varchar', 'string', ' varchardate', 'date', 'numeric', 'double', 'float'))){310 'integer', 'varchar', 'string', 'text', 'varchardate', 'date', 'numeric', 'double', 'float'))){ 311 311 throw new jDaoXmlException ('wrong.attr', array($params['datatype'], $this->fieldName,'property')); 312 312 } trunk/lib/jelix/dao/jDaoParser.class.php
r450 r575 305 305 } 306 306 $params['datatype']=trim(strtolower($params['datatype'])); 307 $this->needsQuotes = in_array ($params['datatype'], array ('string', ' date', 'datetime', 'time'));307 $this->needsQuotes = in_array ($params['datatype'], array ('string', 'varchar', 'text', 'date', 'datetime', 'time')); 308 308 309 309 if (!in_array ($params['datatype'], array ('autoincrement', 'bigautoincrement', 'int', 'datetime', 'time', 310 'integer', 'varchar', 'string', ' varchardate', 'date', 'numeric', 'double', 'float'))){310 'integer', 'varchar', 'string', 'text', 'varchardate', 'date', 'numeric', 'double', 'float'))){ 311 311 throw new jDaoXmlException ('wrong.attr', array($params['datatype'], $this->fieldName,'property')); 312 312 }
