Changeset 314
- Timestamp:
- 11/27/06 14:16:55 (2 years ago)
- Files:
-
- trunk/build/buildjelix.php (modified) (2 diffs)
- trunk/build/config/jelix-dist-dev.ini (modified) (1 diff)
- trunk/build/config/jelix-dist-opt.ini (modified) (1 diff)
- trunk/build/config/jelix-test.ini (modified) (1 diff)
- trunk/build/manifests/jelix-lib.mn (modified) (3 diffs)
- trunk/build/manifests/jelix-no-opt.mn (modified) (1 diff)
- trunk/lib/jelix/core/defaultconfig.ini.php (modified) (1 diff)
- trunk/lib/jelix/core/jCoordinator.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/jSelector.class.php (modified) (1 diff)
- trunk/lib/jelix/core/url/jUrlEngine.significant.class.php (modified) (1 diff)
- trunk/lib/jelix/events/jEventListenerFactory.class.php (modified) (1 diff)
- trunk/lib/jelix/utils/jZone.class.php (modified) (1 diff)
- trunk/testapp/modules/testapp/controllers/forms.classic.php (modified) (2 diffs)
- trunk/testapp/modules/testapp/controllers/main.classic.php (modified) (1 diff)
- trunk/testapp/modules/testapp/controllers/sampleform.classic.php (modified) (1 diff)
- trunk/testapp/modules/testapp/controllers/syndication.classic.php (modified) (1 diff)
- trunk/testapp/modules/testapp/zones/sommaire.zone.php (modified) (1 diff)
- trunk/testapp/modules/testapp/zones/test.zone.php (modified) (1 diff)
- trunk/testapp/modules/unittest/classes/testevents.listener.php (modified) (1 diff)
- trunk/testapp/modules/unittest/classes/urlsig.urlhandler.php (modified) (1 diff)
- trunk/testapp/modules/unittest/controllers/dao.classic.php (modified) (1 diff)
- trunk/testapp/modules/unittest/controllers/default.classic.php (modified) (1 diff)
- trunk/testapp/modules/unittest/controllers/urlsig.classic.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/build/buildjelix.php
r303 r314 24 24 )); 25 25 26 if(!isset($GLOBALS['ENABLE_OLD_CLASS_NAMING'])) //TODO �nlever pour la 1.0 finale 27 $GLOBALS['ENABLE_OLD_CLASS_NAMING']= '1'; 28 26 29 Env::initBool(array( 27 30 'ENABLE_OPTIMIZE', // indique que l'on veut une version optimis�pour un serveur de production … … 38 41 'STRIP_COMMENT', 39 42 'NIGHTLY_NAME', 43 44 'ENABLE_OLD_CLASS_NAMING', // indique si on veut activer l'ancien nommage de certaines classes dans 45 // jelix < 1.0beta1 40 46 )); 41 47 trunk/build/config/jelix-dist-dev.ini
r292 r314 9 9 ENABLE_PHP_JSON = 10 10 ENABLE_PHP_XMLRPC = 11 ENABLE_OLD_CLASS_NAMING = 1 trunk/build/config/jelix-dist-opt.ini
r292 r314 9 9 STRIP_COMMENT = 1 10 10 ENABLE_OPTIMIZE = 1 11 ENABLE_OLD_CLASS_NAMING = 1 trunk/build/config/jelix-test.ini
r292 r314 9 9 STRIP_COMMENT = 10 10 ENABLE_OPTIMIZE = 11 ENABLE_OLD_CLASS_NAMING = 1 trunk/build/manifests/jelix-lib.mn
r300 r314 61 61 cd lib/jelix/core/url 62 62 jUrlCompiler.significant.class.php 63 jUrlEngine.significant.class.php63 * jUrlEngine.significant.class.php 64 64 jUrlEngine.simple.class.php 65 65 … … 99 99 jEventCompiler.class.php 100 100 jEventListener.class.php 101 jEventListenerFactory.class.php101 * jEventListenerFactory.class.php 102 102 103 103 cd lib/jelix/forms … … 169 169 jXmlRpc.class.php 170 170 jZipCreator.class.php 171 jZone.class.php171 * jZone.class.php 172 172 jAppManager.class.php 173 173 jRss20Item.class.php trunk/build/manifests/jelix-no-opt.mn
r297 r314 11 11 jRequest.class.php 12 12 jResponse.class.php 13 jSelector.class.php13 * jSelector.class.php 14 14 15 15 cd lib/jelix/core/url trunk/lib/jelix/core/defaultconfig.ini.php
r300 r314 22 22 use_error_handler = on 23 23 shared_session = off 24 25 enableOldClassNaming = on 24 26 25 27 [plugins] trunk/lib/jelix/core/jCoordinator.class.php
r263 r314 228 228 229 229 $ctrlpath = $selector->getPath(); 230 $class = $selector->getClass();231 230 232 231 if(!file_exists($ctrlpath)){ … … 234 233 } 235 234 require_once($ctrlpath); 235 $class = $selector->getClass(); 236 236 if(!class_exists($class,false)){ 237 237 throw new jException('jelix~errors.ad.controller.class.unknow',array($this->actionName,$class, $ctrlpath)); trunk/lib/jelix/core/jSelector.class.php
r311 r314 244 244 245 245 public function getClass(){ 246 return 'CT'.$this->controller; 246 #ifdef ENABLE_OLD_CLASS_NAMING 247 $className = $this->controller.'Ctrl'; 248 if($GLOBALS['gJConfig']->enableOldClassNaming && !class_exists($className,false)){ 249 $className = 'CT'.$this->controller; 250 } 251 #else 252 $className = $this->controller.'Ctrl'; 253 #endif 254 return $className; 247 255 } 248 256 trunk/lib/jelix/core/url/jUrlEngine.significant.class.php
r267 r314 157 157 // array( 0=> 'module', 1=>'action', 2=>'handler', 3=>array('actions','secondaires')) 158 158 $s = new jSelectorUrlHandler($infoparsing[2]); 159 $c ='URLS'.$s->resource; 159 #ifdef ENABLE_OLD_CLASS_NAMING 160 $c =$s->resource.'UrlsHandler'; 161 if($gJConfig->enableOldClassNaming && !class_exists($c,false)){ 162 $c ='URLS'.$s->resource; 163 } 164 #else 165 $c =$s->resource.'UrlsHandler'; 166 #endif 160 167 $handler =new $c(); 161 168 trunk/lib/jelix/events/jEventListenerFactory.class.php
r248 r314 88 88 global $gJConfig; 89 89 require_once ($gJConfig->_modulesPathList[$module].'classes/'.strtolower ($listenerName).'.listener.php'); 90 $className = 'Listener'.$listenerName; 90 #ifdef ENABLE_OLD_CLASS_NAMING 91 $className = $listenerName.'Listener'; 92 if($gJConfig->enableOldClassNaming && !class_exists($className,false)){ 93 $className = 'Listener'.$listenerName; 94 } 95 #else 96 $className = $listenerName.'Listener'; 97 #endif 91 98 self::$_listenersSingleton[$module][$listenerName] = new $className (); 92 99 } trunk/lib/jelix/utils/jZone.class.php
r312 r314 243 243 $fileName = $sel->getPath(); 244 244 require_once($fileName); 245 246 $objName = 'Zone'.$sel->resource; 247 $zone = new $objName ($params); 245 #ifdef ENABLE_OLD_CLASS_NAMING 246 $className = $sel->resource.'Zone'; 247 if($GLOBALS['gJConfig']->enableOldClassNaming && !class_exists($className,false)){ 248 $className = 'Zone'.$sel->resource; 249 } 250 #else 251 $className = $sel->resource.'Zone'; 252 #endif 253 $zone = new $className ($params); 248 254 $toReturn = $zone->$method (); 249 255 trunk/testapp/modules/testapp/controllers/forms.classic.php
r310 r314 11 11 */ 12 12 13 class CTFormsextends jController {13 class formsCtrl extends jController { 14 14 15 15 function listform(){ … … 20 20 $tpl = new jTpl(); 21 21 // on triche ici, il n'y a pas d'api car inutile en temps normal 22 $tpl->assign('liste', $_SESSION['JFORMS']['sample']); 22 if(isset($_SESSION['JFORMS']['sample'])) 23 $tpl->assign('liste', $_SESSION['JFORMS']['sample']); 24 else 25 $tpl->assign('liste', array()); 23 26 $rep->body->assign('MAIN',$tpl->fetch('forms_liste')); 24 27 return $rep; trunk/testapp/modules/testapp/controllers/main.classic.php
r192 r314 11 11 */ 12 12 13 class CTMainextends jController {13 class mainCtrl extends jController { 14 14 15 15 function index(){ trunk/testapp/modules/testapp/controllers/sampleform.classic.php
r310 r314 11 11 */ 12 12 13 class CTSampleFormextends jController {13 class sampleFormCtrl extends jController { 14 14 15 15 function newform(){ trunk/testapp/modules/testapp/controllers/syndication.classic.php
r300 r314 10 10 */ 11 11 12 class CTSyndicationextends jController {12 class syndicationCtrl extends jController { 13 13 14 14 function rss(){ trunk/testapp/modules/testapp/zones/sommaire.zone.php
r126 r314 11 11 */ 12 12 13 class ZoneSommaire extends jZone {13 class sommaireZone extends jZone { 14 14 protected $_tplname='sommaire'; 15 15 trunk/testapp/modules/testapp/zones/test.zone.php
r192 r314 11 11 */ 12 12 13 class ZoneTestextends jZone {13 class testZone extends jZone { 14 14 protected $_tplname='testzone'; 15 15 trunk/testapp/modules/unittest/classes/testevents.listener.php
r55 r314 11 11 */ 12 12 13 class ListenerTesteventsextends jEventListener{13 class testeventsListener extends jEventListener{ 14 14 15 15 /** trunk/testapp/modules/unittest/classes/urlsig.urlhandler.php
r247 r314 1 1 <?php 2 2 3 class URLSurlsigimplements jIUrlSignificantHandler {3 class urlsigUrlsHandler implements jIUrlSignificantHandler { 4 4 5 5 // exemple de handler. trunk/testapp/modules/unittest/controllers/dao.classic.php
r276 r314 11 11 */ 12 12 13 class CTDaoextends jController {13 class daoCtrl extends jController { 14 14 15 15 function parser() { trunk/testapp/modules/unittest/controllers/default.classic.php
r289 r314 11 11 */ 12 12 13 class CTDefaultextends jController {13 class defaultCtrl extends jController { 14 14 15 15 function index() { trunk/testapp/modules/unittest/controllers/urlsig.classic.php
r101 r314 12 12 13 13 14 class CTUrlsigextends jController {14 class urlsigCtrl extends jController { 15 15 16 16 function url1() {
