Changeset 479
- Timestamp:
- 06/30/07 01:21:30 (2 years ago)
- Files:
-
- trunk/build/buildjelix.php (modified) (3 diffs)
- trunk/build/buildjelix.php (modified) (3 diffs)
- trunk/build/manifests/jelix-lib.mn (modified) (2 diffs)
- trunk/build/manifests/jelix-lib.mn (modified) (2 diffs)
- trunk/lib/jelix-modules/jxxulapp/install/var/config/config.classic.ini.php (modified) (1 diff)
- trunk/lib/jelix-modules/jxxulapp/install/var/config/config.classic.ini.php (modified) (1 diff)
- trunk/lib/jelix-modules/jxxulapp/install/var/config/config.jsonrpc.ini.php (modified) (1 diff)
- trunk/lib/jelix-modules/jxxulapp/install/var/config/config.jsonrpc.ini.php (modified) (1 diff)
- trunk/lib/jelix-modules/jxxulapp/install/var/config/config.rdf.ini.php (modified) (1 diff)
- trunk/lib/jelix-modules/jxxulapp/install/var/config/config.rdf.ini.php (modified) (1 diff)
- trunk/lib/jelix-modules/jxxulapp/install/var/config/configxul.classic.ini.php (modified) (1 diff)
- trunk/lib/jelix-modules/jxxulapp/install/var/config/configxul.classic.ini.php (modified) (1 diff)
- trunk/lib/jelix-plugins/wr_rules (added)
- trunk/lib/jelix-plugins/wr_rules (added)
- trunk/lib/jelix-scripts/commands/createapp.cmd.php (modified) (5 diffs)
- trunk/lib/jelix-scripts/commands/createapp.cmd.php (modified) (5 diffs)
- trunk/lib/jelix-scripts/commands/createmodule.cmd.php (modified) (1 diff)
- trunk/lib/jelix-scripts/commands/createmodule.cmd.php (modified) (1 diff)
- trunk/lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl (modified) (2 diffs)
- trunk/lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl (modified) (2 diffs)
- trunk/lib/jelix/core/jUrl.class.php (modified) (1 diff)
- trunk/lib/jelix/core/jUrl.class.php (modified) (1 diff)
- trunk/lib/jelix/db/jDb.class.php (modified) (2 diffs)
- trunk/lib/jelix/db/jDb.class.php (modified) (2 diffs)
- trunk/lib/jelix/utils/jWiki.class.php (modified) (2 diffs)
- trunk/lib/jelix/utils/jWiki.class.php (modified) (2 diffs)
- trunk/testapp/var/config/defaultconfig.ini.php.dist (modified) (1 diff)
- trunk/testapp/var/config/defaultconfig.ini.php.dist (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/build/buildjelix.php
r418 r479 53 53 ), 54 54 'STRIP_COMMENT'=>array( 55 "true if you want sources with PHP comments deleted (valid only if ENABLE_OPTIMIZE is true)",55 "true if you want sources with PHP comments deleted (valid only if ENABLE_OPTIMIZED_SOURCE is true)", 56 56 false, 57 57 ), … … 167 167 168 168 169 if( !$ENABLE_OPTIMIZED_SOURCE)169 if( ! $ENABLE_OPTIMIZED_SOURCE) 170 170 $STRIP_COMMENT=''; 171 171 … … 191 191 //... execution des manifests 192 192 jManifest::process('build/manifests/jelix-lib.mn', '.', $BUILD_TARGET_PATH, ENV::getAll(), $STRIP_COMMENT); 193 if( !$ENABLE_OPTIMIZED_SOURCE){193 if( ! $ENABLE_OPTIMIZED_SOURCE){ 194 194 jManifest::process('build/manifests/jelix-no-opt.mn', '.', $BUILD_TARGET_PATH , ENV::getAll(), $STRIP_COMMENT); 195 195 } 196 if( !$ENABLE_PHP_JELIX && !$ENABLE_OPTIMIZED_SOURCE){196 if( ! $ENABLE_PHP_JELIX && ! $ENABLE_OPTIMIZED_SOURCE){ 197 197 jManifest::process('build/manifests/jelix-no-ext.mn', '.', $BUILD_TARGET_PATH , ENV::getAll(), $STRIP_COMMENT); 198 198 } trunk/build/buildjelix.php
r418 r479 53 53 ), 54 54 'STRIP_COMMENT'=>array( 55 "true if you want sources with PHP comments deleted (valid only if ENABLE_OPTIMIZE is true)",55 "true if you want sources with PHP comments deleted (valid only if ENABLE_OPTIMIZED_SOURCE is true)", 56 56 false, 57 57 ), … … 167 167 168 168 169 if( !$ENABLE_OPTIMIZED_SOURCE)169 if( ! $ENABLE_OPTIMIZED_SOURCE) 170 170 $STRIP_COMMENT=''; 171 171 … … 191 191 //... execution des manifests 192 192 jManifest::process('build/manifests/jelix-lib.mn', '.', $BUILD_TARGET_PATH, ENV::getAll(), $STRIP_COMMENT); 193 if( !$ENABLE_OPTIMIZED_SOURCE){193 if( ! $ENABLE_OPTIMIZED_SOURCE){ 194 194 jManifest::process('build/manifests/jelix-no-opt.mn', '.', $BUILD_TARGET_PATH , ENV::getAll(), $STRIP_COMMENT); 195 195 } 196 if( !$ENABLE_PHP_JELIX && !$ENABLE_OPTIMIZED_SOURCE){196 if( ! $ENABLE_PHP_JELIX && ! $ENABLE_OPTIMIZED_SOURCE){ 197 197 jManifest::process('build/manifests/jelix-no-ext.mn', '.', $BUILD_TARGET_PATH , ENV::getAll(), $STRIP_COMMENT); 198 198 } trunk/build/manifests/jelix-lib.mn
r478 r479 193 193 * jJsonRpc.class.php 194 194 jLog.class.php 195 jWiki.class.php195 * jWiki.class.php 196 196 jXmlRpc.class.php 197 197 jZipCreator.class.php … … 244 244 cd lib/jelix-plugins/urls/ 245 245 cd lib/jelix-plugins/tpl/ 246 246 cd lib/jelix-plugins/wr_rules/ 247 247 248 248 cd lib/jelix/plugins/auth/db trunk/build/manifests/jelix-lib.mn
r478 r479 193 193 * jJsonRpc.class.php 194 194 jLog.class.php 195 jWiki.class.php195 * jWiki.class.php 196 196 jXmlRpc.class.php 197 197 jZipCreator.class.php … … 244 244 cd lib/jelix-plugins/urls/ 245 245 cd lib/jelix-plugins/tpl/ 246 246 cd lib/jelix-plugins/wr_rules/ 247 247 248 248 cd lib/jelix/plugins/auth/db trunk/lib/jelix-modules/jxxulapp/install/var/config/config.classic.ini.php
r386 r479 14 14 pluginsPath = lib:jelix-plugins/,app:plugins/,lib:jelix-modules/jxauth/plugins/ 15 15 modulesPath = lib:jelix-modules/,app:modules/ 16 tplpluginsPath = lib:jelix/tpl/plugins/ 16 17 17 18 18 dbProfils = dbprofils.ini.php trunk/lib/jelix-modules/jxxulapp/install/var/config/config.classic.ini.php
r386 r479 14 14 pluginsPath = lib:jelix-plugins/,app:plugins/,lib:jelix-modules/jxauth/plugins/ 15 15 modulesPath = lib:jelix-modules/,app:modules/ 16 tplpluginsPath = lib:jelix/tpl/plugins/ 16 17 17 18 18 dbProfils = dbprofils.ini.php trunk/lib/jelix-modules/jxxulapp/install/var/config/config.jsonrpc.ini.php
r386 r479 14 14 pluginsPath = lib:jelix-plugins/,app:plugins/,lib:jelix-modules/jxauth/plugins/ 15 15 modulesPath = lib:jelix-modules/,app:modules/ 16 tplpluginsPath = lib:jelix/tpl/plugins/17 16 18 17 dbProfils = dbprofils.ini.php trunk/lib/jelix-modules/jxxulapp/install/var/config/config.jsonrpc.ini.php
r386 r479 14 14 pluginsPath = lib:jelix-plugins/,app:plugins/,lib:jelix-modules/jxauth/plugins/ 15 15 modulesPath = lib:jelix-modules/,app:modules/ 16 tplpluginsPath = lib:jelix/tpl/plugins/17 16 18 17 dbProfils = dbprofils.ini.php trunk/lib/jelix-modules/jxxulapp/install/var/config/config.rdf.ini.php
r386 r479 14 14 pluginsPath = lib:jelix-plugins/,app:plugins/,lib:jelix-modules/jxauth/plugins/ 15 15 modulesPath = lib:jelix-modules/,app:modules/ 16 tplpluginsPath = lib:jelix/tpl/plugins/17 16 18 17 dbProfils = dbprofils.ini.php trunk/lib/jelix-modules/jxxulapp/install/var/config/config.rdf.ini.php
r386 r479 14 14 pluginsPath = lib:jelix-plugins/,app:plugins/,lib:jelix-modules/jxauth/plugins/ 15 15 modulesPath = lib:jelix-modules/,app:modules/ 16 tplpluginsPath = lib:jelix/tpl/plugins/17 16 18 17 dbProfils = dbprofils.ini.php trunk/lib/jelix-modules/jxxulapp/install/var/config/configxul.classic.ini.php
r386 r479 14 14 pluginsPath = lib:jelix-plugins/,app:plugins/,lib:jelix-modules/jxauth/plugins/ 15 15 modulesPath = lib:jelix-modules/,app:modules/ 16 tplpluginsPath = lib:jelix/tpl/plugins/17 16 18 17 dbProfils = dbprofils.ini.php trunk/lib/jelix-modules/jxxulapp/install/var/config/configxul.classic.ini.php
r386 r479 14 14 pluginsPath = lib:jelix-plugins/,app:plugins/,lib:jelix-modules/jxauth/plugins/ 15 15 modulesPath = lib:jelix-modules/,app:modules/ 16 tplpluginsPath = lib:jelix/tpl/plugins/17 16 18 17 dbProfils = dbprofils.ini.php trunk/lib/jelix-scripts/commands/createapp.cmd.php
r413 r479 17 17 public $allowed_parameters=array(); 18 18 19 public $syntaxhelp = "[-withdefaultmodule] [-withcmdline] ";19 public $syntaxhelp = "[-withdefaultmodule] [-withcmdline] [-withrpc]"; 20 20 public $help=''; 21 21 … … 72 72 $this->createDir(JELIX_APP_PATH.'modules'); 73 73 $this->createDir(JELIX_APP_PATH.'plugins'); 74 $this->createDir(JELIX_APP_PATH.'plugins/coord/'); 75 $this->createDir(JELIX_APP_PATH.'plugins/tpl/'); 76 $this->createDir(JELIX_APP_PATH.'plugins/db/'); 77 $this->createDir(JELIX_APP_PATH.'plugins/auth/'); 74 78 $this->createDir(JELIX_APP_PATH.'responses'); 75 79 … … 80 84 $this->createFile(JELIX_APP_CONFIG_PATH.'dbprofils.ini.php','var/config/dbprofils.ini.php.tpl',$param); 81 85 $this->createFile(JELIX_APP_CONFIG_PATH.'index/config.ini.php','var/config/index/config.ini.php.tpl',$param); 82 $this->createFile(JELIX_APP_CONFIG_PATH.'jsonrpc/config.ini.php','var/config/jsonrpc/config.ini.php.tpl',$param);83 $this->createFile(JELIX_APP_CONFIG_PATH.'xmlrpc/config.ini.php','var/config/xmlrpc/config.ini.php.tpl',$param);84 86 85 87 $param['rp_temp']=jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_TEMP_PATH,true); … … 97 99 98 100 $this->createFile(JELIX_APP_WWW_PATH.'index.php','www/index.php.tpl',$param); 99 $this->createFile(JELIX_APP_WWW_PATH.'jsonrpc.php','www/jsonrpc.php.tpl',$param); 100 $this->createFile(JELIX_APP_WWW_PATH.'xmlrpc.php','www/xmlrpc.php.tpl',$param); 101 101 102 102 if($this->getOption('-withdefaultmodule')){ 103 103 $cmd = jxs_load_command('createmodule'); … … 113 113 $this->createFile(JELIX_APP_CMD_PATH.'cmdline.php','scripts/cmdline.php.tpl',$param); 114 114 } 115 116 if($this->getOption('-withrpc')){ 117 $this->createFile(JELIX_APP_WWW_PATH.'jsonrpc.php','www/jsonrpc.php.tpl',$param); 118 $this->createFile(JELIX_APP_WWW_PATH.'xmlrpc.php','www/xmlrpc.php.tpl',$param); 119 $this->createFile(JELIX_APP_CONFIG_PATH.'jsonrpc/config.ini.php','var/config/jsonrpc/config.ini.php.tpl',$param); 120 $this->createFile(JELIX_APP_CONFIG_PATH.'xmlrpc/config.ini.php','var/config/xmlrpc/config.ini.php.tpl',$param); 121 } 115 122 } 116 123 } trunk/lib/jelix-scripts/commands/createapp.cmd.php
r413 r479 17 17 public $allowed_parameters=array(); 18 18 19 public $syntaxhelp = "[-withdefaultmodule] [-withcmdline] ";19 public $syntaxhelp = "[-withdefaultmodule] [-withcmdline] [-withrpc]"; 20 20 public $help=''; 21 21 … … 72 72 $this->createDir(JELIX_APP_PATH.'modules'); 73 73 $this->createDir(JELIX_APP_PATH.'plugins'); 74 $this->createDir(JELIX_APP_PATH.'plugins/coord/'); 75 $this->createDir(JELIX_APP_PATH.'plugins/tpl/'); 76 $this->createDir(JELIX_APP_PATH.'plugins/db/'); 77 $this->createDir(JELIX_APP_PATH.'plugins/auth/'); 74 78 $this->createDir(JELIX_APP_PATH.'responses'); 75 79 … … 80 84 $this->createFile(JELIX_APP_CONFIG_PATH.'dbprofils.ini.php','var/config/dbprofils.ini.php.tpl',$param); 81 85 $this->createFile(JELIX_APP_CONFIG_PATH.'index/config.ini.php','var/config/index/config.ini.php.tpl',$param); 82 $this->createFile(JELIX_APP_CONFIG_PATH.'jsonrpc/config.ini.php','var/config/jsonrpc/config.ini.php.tpl',$param);83 $this->createFile(JELIX_APP_CONFIG_PATH.'xmlrpc/config.ini.php','var/config/xmlrpc/config.ini.php.tpl',$param);84 86 85 87 $param['rp_temp']=jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_TEMP_PATH,true); … … 97 99 98 100 $this->createFile(JELIX_APP_WWW_PATH.'index.php','www/index.php.tpl',$param); 99 $this->createFile(JELIX_APP_WWW_PATH.'jsonrpc.php','www/jsonrpc.php.tpl',$param); 100 $this->createFile(JELIX_APP_WWW_PATH.'xmlrpc.php','www/xmlrpc.php.tpl',$param); 101 101 102 102 if($this->getOption('-withdefaultmodule')){ 103 103 $cmd = jxs_load_command('createmodule'); … … 113 113 $this->createFile(JELIX_APP_CMD_PATH.'cmdline.php','scripts/cmdline.php.tpl',$param); 114 114 } 115 116 if($this->getOption('-withrpc')){ 117 $this->createFile(JELIX_APP_WWW_PATH.'jsonrpc.php','www/jsonrpc.php.tpl',$param); 118 $this->createFile(JELIX_APP_WWW_PATH.'xmlrpc.php','www/xmlrpc.php.tpl',$param); 119 $this->createFile(JELIX_APP_CONFIG_PATH.'jsonrpc/config.ini.php','var/config/jsonrpc/config.ini.php.tpl',$param); 120 $this->createFile(JELIX_APP_CONFIG_PATH.'xmlrpc/config.ini.php','var/config/xmlrpc/config.ini.php.tpl',$param); 121 } 115 122 } 116 123 } trunk/lib/jelix-scripts/commands/createmodule.cmd.php
r413 r479 53 53 $this->createDir($path.'classes/'); 54 54 $this->createDir($path.'daos/'); 55 $this->createDir($path.'forms/'); 55 56 $this->createDir($path.'locales/'); 56 57 $this->createDir($path.'locales/en_EN/'); trunk/lib/jelix-scripts/commands/createmodule.cmd.php
r413 r479 53 53 $this->createDir($path.'classes/'); 54 54 $this->createDir($path.'daos/'); 55 $this->createDir($path.'forms/'); 55 56 $this->createDir($path.'locales/'); 56 57 $this->createDir($path.'locales/en_EN/'); trunk/lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl
r451 r479 17 17 pluginsPath = lib:jelix-plugins/,app:plugins/ 18 18 modulesPath = lib:jelix-modules/,app:modules/ 19 tplpluginsPath = lib:jelix/tpl/plugins/20 19 21 20 dbProfils = dbprofils.ini.php … … 40 39 error = ECHO EXIT 41 40 warning = ECHO 42 notice = 43 strict = 41 notice = ECHO 42 strict = ECHO 44 43 ; pour les exceptions, il y a implicitement un EXIT 45 44 exception = ECHO trunk/lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl
r451 r479 17 17 pluginsPath = lib:jelix-plugins/,app:plugins/ 18 18 modulesPath = lib:jelix-modules/,app:modules/ 19 tplpluginsPath = lib:jelix/tpl/plugins/20 19 21 20 dbProfils = dbprofils.ini.php … … 40 39 error = ECHO EXIT 41 40 warning = ECHO 42 notice = 43 strict = 41 notice = ECHO 42 strict = ECHO 44 43 ; pour les exceptions, il y a implicitement un EXIT 45 44 exception = ECHO trunk/lib/jelix/core/jUrl.class.php
r477 r479 345 345 global $gJConfig; 346 346 $name = $gJConfig->urlengine['engine']; 347 if(!isset($gJConfig->_pluginsPathList_urls) 348 ||!isset($gJConfig->_pluginsPathList_urls[$name])347 #ifnot ENABLE_OPTIMIZED_SOURCE 348 if( !isset($gJConfig->_pluginsPathList_urls[$name]) 349 349 || !file_exists($gJConfig->_pluginsPathList_urls[$name]) ){ 350 350 throw new jException('jelix~errors.urls.engine.notfound', $name); 351 351 } 352 $p = $gJConfig->_pluginsPathList_urls[$name]; 353 require_once($ p.$name.'.urls.php');352 #endif 353 require_once($gJConfig->_pluginsPathList_urls[$name].$name.'.urls.php'); 354 354 355 355 $cl=$name.'UrlEngine'; trunk/lib/jelix/core/jUrl.class.php
r477 r479 345 345 global $gJConfig; 346 346 $name = $gJConfig->urlengine['engine']; 347 if(!isset($gJConfig->_pluginsPathList_urls) 348 ||!isset($gJConfig->_pluginsPathList_urls[$name])347 #ifnot ENABLE_OPTIMIZED_SOURCE 348 if( !isset($gJConfig->_pluginsPathList_urls[$name]) 349 349 || !file_exists($gJConfig->_pluginsPathList_urls[$name]) ){ 350 350 throw new jException('jelix~errors.urls.engine.notfound', $name); 351 351 } 352 $p = $gJConfig->_pluginsPathList_urls[$name]; 353 require_once($ p.$name.'.urls.php');352 #endif 353 require_once($gJConfig->_pluginsPathList_urls[$name].$name.'.urls.php'); 354 354 355 355 $cl=$name.'UrlEngine'; trunk/lib/jelix/db/jDb.class.php
r477 r479 74 74 75 75 global $gJConfig; 76 if(!isset($gJConfig->_pluginsPathList_db) 77 ||!isset($gJConfig->_pluginsPathList_db[$profil['driver']])76 #ifnot ENABLE_OPTIMIZED_SOURCE 77 if(!isset($gJConfig->_pluginsPathList_db[$profil['driver']]) 78 78 || !file_exists($gJConfig->_pluginsPathList_db[$profil['driver']]) ){ 79 79 throw new jException('jelix~db.error.driver.notfound', $profil['driver']); 80 80 } 81 $p = $gJConfig->_pluginsPathList_db[$profil['driver']]; 82 require_once($ p.$profil['driver'].'.dbtools.php');81 #endif 82 require_once($gJConfig->_pluginsPathList_db[$profil['driver']].$profil['driver'].'.dbtools.php'); 83 83 $class = $profil['driver'].'DbTools'; 84 84 … … 161 161 }else{ 162 162 global $gJConfig; 163 if(!isset($gJConfig->_pluginsPathList_db) 164 ||!isset($gJConfig->_pluginsPathList_db[$profil['driver']])163 #ifnot ENABLE_OPTIMIZED_SOURCE 164 if(!isset($gJConfig->_pluginsPathList_db[$profil['driver']]) 165 165 || !file_exists($gJConfig->_pluginsPathList_db[$profil['driver']]) ){ 166 166 throw new jException('jelix~db.error.driver.notfound', $profil['driver']); 167 167 } 168 $p = $gJConfig->_pluginsPathList_db[$profil['driver']]; 169 require_once($p.$profil['driver'].'.dbconnection.php'); 170 require_once($p.$profil['driver'].'.dbresultset.php'); 168 #endif 169 $p = $gJConfig->_pluginsPathList_db[$profil['driver']].$profil['driver']; 170 require_once($p.'.dbconnection.php'); 171 require_once($p.'.dbresultset.php'); 171 172 172 173 //creating of the connection trunk/lib/jelix/db/jDb.class.php
r477 r479 74 74 75 75 global $gJConfig; 76 if(!isset($gJConfig->_pluginsPathList_db) 77 ||!isset($gJConfig->_pluginsPathList_db[$profil['driver']])76 #ifnot ENABLE_OPTIMIZED_SOURCE 77 if(!isset($gJConfig->_pluginsPathList_db[$profil['driver']]) 78 78 || !file_exists($gJConfig->_pluginsPathList_db[$profil['driver']]) ){ 79 79 throw new jException('jelix~db.error.driver.notfound', $profil['driver']); 80 80 } 81 $p = $gJConfig->_pluginsPathList_db[$profil['driver']]; 82 require_once($ p.$profil['driver'].'.dbtools.php');81 #endif 82 require_once($gJConfig->_pluginsPathList_db[$profil['driver']].$profil['driver'].'.dbtools.php'); 83 83 $class = $profil['driver'].'DbTools'; 84 84 … … 161 161 }else{ 162 162 global $gJConfig; 163 if(!isset($gJConfig->_pluginsPathList_db) 164 ||!isset($gJConfig->_pluginsPathList_db[$profil['driver']])163 #ifnot ENABLE_OPTIMIZED_SOURCE 164 if(!isset($gJConfig->_pluginsPathList_db[$profil['driver']]) 165 165 || !file_exists($gJConfig->_pluginsPathList_db[$profil['driver']]) ){ 166 166 throw new jException('jelix~db.error.driver.notfound', $profil['driver']); 167 167 } 168 $p = $gJConfig->_pluginsPathList_db[$profil['driver']]; 169 require_once($p.$profil['driver'].'.dbconnection.php'); 170 require_once($p.$profil['driver'].'.dbresultset.php'); 168 #endif 169 $p = $gJConfig->_pluginsPathList_db[$profil['driver']].$profil['driver']; 170 require_once($p.'.dbconnection.php'); 171 require_once($p.'.dbresultset.php'); 171 172 172 173 //creating of the connection trunk/lib/jelix/utils/jWiki.class.php
r386 r479 5 5 * @author Laurent Jouanneau 6 6 * @contributor 7 * @copyright 2006 Laurent Jouanneau7 * @copyright 2006-2007 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 … … 23 23 */ 24 24 class jWiki extends WikiRenderer { 25 // rien à surcharger pour le moment 26 // Profitons surtout de l'autoload :-) 25 26 function __construct( $config=null){ 27 28 if(is_string($config)){ 29 $f = WIKIRENDERER_PATH.'rules/'.basename($config).'.php'; 30 if(file_exists($f)){ 31 require_once($f); 32 $this->config= new $config(); 33 }else{ 34 35 global $gJConfig; 36 #ifnot ENABLE_OPTIMIZED_SOURCE 37 if(!isset($gJConfig->_pluginsPathList_wr_rules) 38 || !isset($gJConfig->_pluginsPathList_wr_rules[$config]) 39 || !file_exists($gJConfig->_pluginsPathList_wr_rules[$config]) ){ 40 throw new Exception('Rules "'.$config.'" not found for jWiki'); 41 } 42 #endif 43 require_once($gJConfig->_pluginsPathList_wr_rules[$config].$config.'.rule.php'); 44 $this->config = new $config (); 45 } 46 }elseif(is_object($config)){ 47 $this->config=$config; 48 }else{ 49 require_once(WIKIRENDERER_PATH . 'rules/wr3_to_xhtml.php'); 50 $this->config= new wr3_to_xhtml(); 51 } 52 53 $this->inlineParser = new WikiInlineParser($this->config); 54 55 foreach($this->config->bloctags as $name){ 56 $this->_blocList[]= new $name($this); 57 } 58 } 59 27 60 28 61 } trunk/lib/jelix/utils/jWiki.class.php
r386 r479 5 5 * @author Laurent Jouanneau 6 6 * @contributor 7 * @copyright 2006 Laurent Jouanneau7 * @copyright 2006-2007 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 … … 23 23 */ 24 24 class jWiki extends WikiRenderer { 25 // rien à surcharger pour le moment 26 // Profitons surtout de l'autoload :-) 25 26 function __construct( $config=null){ 27 28 if(is_string($config)){ 29 $f = WIKIRENDERER_PATH.'rules/'.basename($config).'.php'; 30 if(file_exists($f)){ 31 require_once($f); 32 $this->config= new $config(); 33 }else{ 34 35 global $gJConfig; 36 #ifnot ENABLE_OPTIMIZED_SOURCE 37 if(!isset($gJConfig->_pluginsPathList_wr_rules) 38 || !isset($gJConfig->_pluginsPathList_wr_rules[$config]) 39 || !file_exists($gJConfig->_pluginsPathList_wr_rules[$config]) ){ 40 throw new Exception('Rules "'.$config.'" not found for jWiki'); 41 } 42 #endif 43 require_once($gJConfig->_pluginsPathList_wr_rules[$config].$config.'.rule.php'); 44 $this->config = new $config (); 45 } 46 }elseif(is_object($config)){ 47 $this->config=$config; 48 }else{ 49 require_once(WIKIRENDERER_PATH . 'rules/wr3_to_xhtml.php'); 50 $this->config= new wr3_to_xhtml(); 51 } 52 53 $this->inlineParser = new WikiInlineParser($this->config); 54 55 foreach($this->config->bloctags as $name){ 56 $this->_blocList[]= new $name($this); 57 } 58 } 59 27 60 28 61 } trunk/testapp/var/config/defaultconfig.ini.php.dist
r468 r479 17 17 pluginsPath = lib:jelix-plugins/,app:plugins/ 18 18 modulesPath = lib:jelix-modules/,app:modules/ 19 tplpluginsPath = lib:jelix/tpl/plugins/20 19 21 20 dbProfils = dbprofils.ini.php trunk/testapp/var/config/defaultconfig.ini.php.dist
r468 r479 17 17 pluginsPath = lib:jelix-plugins/,app:plugins/ 18 18 modulesPath = lib:jelix-modules/,app:modules/ 19 tplpluginsPath = lib:jelix/tpl/plugins/20 19 21 20 dbProfils = dbprofils.ini.php
