Changeset 479

Show
Ignore:
Timestamp:
06/30/07 01:21:30 (2 years ago)
Author:
laurentj
Message:

worked on ticket #132: rules for jwiki can be installed into a plugin dir; little change in jelix-scripts to reflect change on plugins dirs; little optimization

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build/buildjelix.php

    r418 r479  
    5353    ), 
    5454'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)", 
    5656    false, 
    5757    ), 
     
    167167 
    168168 
    169 if(!$ENABLE_OPTIMIZED_SOURCE) 
     169if( ! $ENABLE_OPTIMIZED_SOURCE) 
    170170    $STRIP_COMMENT=''; 
    171171 
     
    191191//... execution des manifests 
    192192jManifest::process('build/manifests/jelix-lib.mn', '.', $BUILD_TARGET_PATH, ENV::getAll(), $STRIP_COMMENT); 
    193 if(!$ENABLE_OPTIMIZED_SOURCE){ 
     193if( ! $ENABLE_OPTIMIZED_SOURCE){ 
    194194    jManifest::process('build/manifests/jelix-no-opt.mn', '.', $BUILD_TARGET_PATH , ENV::getAll(), $STRIP_COMMENT); 
    195195} 
    196 if(!$ENABLE_PHP_JELIX && !$ENABLE_OPTIMIZED_SOURCE){ 
     196if( ! $ENABLE_PHP_JELIX && ! $ENABLE_OPTIMIZED_SOURCE){ 
    197197    jManifest::process('build/manifests/jelix-no-ext.mn', '.', $BUILD_TARGET_PATH , ENV::getAll(), $STRIP_COMMENT); 
    198198} 
  • trunk/build/buildjelix.php

    r418 r479  
    5353    ), 
    5454'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)", 
    5656    false, 
    5757    ), 
     
    167167 
    168168 
    169 if(!$ENABLE_OPTIMIZED_SOURCE) 
     169if( ! $ENABLE_OPTIMIZED_SOURCE) 
    170170    $STRIP_COMMENT=''; 
    171171 
     
    191191//... execution des manifests 
    192192jManifest::process('build/manifests/jelix-lib.mn', '.', $BUILD_TARGET_PATH, ENV::getAll(), $STRIP_COMMENT); 
    193 if(!$ENABLE_OPTIMIZED_SOURCE){ 
     193if( ! $ENABLE_OPTIMIZED_SOURCE){ 
    194194    jManifest::process('build/manifests/jelix-no-opt.mn', '.', $BUILD_TARGET_PATH , ENV::getAll(), $STRIP_COMMENT); 
    195195} 
    196 if(!$ENABLE_PHP_JELIX && !$ENABLE_OPTIMIZED_SOURCE){ 
     196if( ! $ENABLE_PHP_JELIX && ! $ENABLE_OPTIMIZED_SOURCE){ 
    197197    jManifest::process('build/manifests/jelix-no-ext.mn', '.', $BUILD_TARGET_PATH , ENV::getAll(), $STRIP_COMMENT); 
    198198} 
  • trunk/build/manifests/jelix-lib.mn

    r478 r479  
    193193* jJsonRpc.class.php 
    194194  jLog.class.php 
    195  jWiki.class.php 
     195* jWiki.class.php 
    196196  jXmlRpc.class.php 
    197197  jZipCreator.class.php 
     
    244244cd lib/jelix-plugins/urls/ 
    245245cd lib/jelix-plugins/tpl/ 
    246  
     246cd lib/jelix-plugins/wr_rules/ 
    247247 
    248248cd lib/jelix/plugins/auth/db 
  • trunk/build/manifests/jelix-lib.mn

    r478 r479  
    193193* jJsonRpc.class.php 
    194194  jLog.class.php 
    195  jWiki.class.php 
     195* jWiki.class.php 
    196196  jXmlRpc.class.php 
    197197  jZipCreator.class.php 
     
    244244cd lib/jelix-plugins/urls/ 
    245245cd lib/jelix-plugins/tpl/ 
    246  
     246cd lib/jelix-plugins/wr_rules/ 
    247247 
    248248cd lib/jelix/plugins/auth/db 
  • trunk/lib/jelix-modules/jxxulapp/install/var/config/config.classic.ini.php

    r386 r479  
    1414pluginsPath = lib:jelix-plugins/,app:plugins/,lib:jelix-modules/jxauth/plugins/ 
    1515modulesPath = lib:jelix-modules/,app:modules/ 
    16 tplpluginsPath = lib:jelix/tpl/plugins/ 
     16 
    1717 
    1818dbProfils = dbprofils.ini.php 
  • trunk/lib/jelix-modules/jxxulapp/install/var/config/config.classic.ini.php

    r386 r479  
    1414pluginsPath = lib:jelix-plugins/,app:plugins/,lib:jelix-modules/jxauth/plugins/ 
    1515modulesPath = lib:jelix-modules/,app:modules/ 
    16 tplpluginsPath = lib:jelix/tpl/plugins/ 
     16 
    1717 
    1818dbProfils = dbprofils.ini.php 
  • trunk/lib/jelix-modules/jxxulapp/install/var/config/config.jsonrpc.ini.php

    r386 r479  
    1414pluginsPath = lib:jelix-plugins/,app:plugins/,lib:jelix-modules/jxauth/plugins/ 
    1515modulesPath = lib:jelix-modules/,app:modules/ 
    16 tplpluginsPath = lib:jelix/tpl/plugins/ 
    1716 
    1817dbProfils = dbprofils.ini.php 
  • trunk/lib/jelix-modules/jxxulapp/install/var/config/config.jsonrpc.ini.php

    r386 r479  
    1414pluginsPath = lib:jelix-plugins/,app:plugins/,lib:jelix-modules/jxauth/plugins/ 
    1515modulesPath = lib:jelix-modules/,app:modules/ 
    16 tplpluginsPath = lib:jelix/tpl/plugins/ 
    1716 
    1817dbProfils = dbprofils.ini.php 
  • trunk/lib/jelix-modules/jxxulapp/install/var/config/config.rdf.ini.php

    r386 r479  
    1414pluginsPath = lib:jelix-plugins/,app:plugins/,lib:jelix-modules/jxauth/plugins/ 
    1515modulesPath = lib:jelix-modules/,app:modules/ 
    16 tplpluginsPath = lib:jelix/tpl/plugins/ 
    1716 
    1817dbProfils = dbprofils.ini.php 
  • trunk/lib/jelix-modules/jxxulapp/install/var/config/config.rdf.ini.php

    r386 r479  
    1414pluginsPath = lib:jelix-plugins/,app:plugins/,lib:jelix-modules/jxauth/plugins/ 
    1515modulesPath = lib:jelix-modules/,app:modules/ 
    16 tplpluginsPath = lib:jelix/tpl/plugins/ 
    1716 
    1817dbProfils = dbprofils.ini.php 
  • trunk/lib/jelix-modules/jxxulapp/install/var/config/configxul.classic.ini.php

    r386 r479  
    1414pluginsPath = lib:jelix-plugins/,app:plugins/,lib:jelix-modules/jxauth/plugins/ 
    1515modulesPath = lib:jelix-modules/,app:modules/ 
    16 tplpluginsPath = lib:jelix/tpl/plugins/ 
    1716 
    1817dbProfils = dbprofils.ini.php 
  • trunk/lib/jelix-modules/jxxulapp/install/var/config/configxul.classic.ini.php

    r386 r479  
    1414pluginsPath = lib:jelix-plugins/,app:plugins/,lib:jelix-modules/jxauth/plugins/ 
    1515modulesPath = lib:jelix-modules/,app:modules/ 
    16 tplpluginsPath = lib:jelix/tpl/plugins/ 
    1716 
    1817dbProfils = dbprofils.ini.php 
  • trunk/lib/jelix-scripts/commands/createapp.cmd.php

    r413 r479  
    1717    public  $allowed_parameters=array(); 
    1818 
    19     public  $syntaxhelp = "[-withdefaultmodule] [-withcmdline]"; 
     19    public  $syntaxhelp = "[-withdefaultmodule] [-withcmdline] [-withrpc]"; 
    2020    public  $help=''; 
    2121 
     
    7272       $this->createDir(JELIX_APP_PATH.'modules'); 
    7373       $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/'); 
    7478       $this->createDir(JELIX_APP_PATH.'responses'); 
    7579 
     
    8084       $this->createFile(JELIX_APP_CONFIG_PATH.'dbprofils.ini.php','var/config/dbprofils.ini.php.tpl',$param); 
    8185       $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); 
    8486 
    8587       $param['rp_temp']=jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_TEMP_PATH,true); 
     
    9799 
    98100       $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        
    102102       if($this->getOption('-withdefaultmodule')){ 
    103103            $cmd = jxs_load_command('createmodule'); 
     
    113113            $this->createFile(JELIX_APP_CMD_PATH.'cmdline.php','scripts/cmdline.php.tpl',$param); 
    114114       } 
     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       } 
    115122    } 
    116123} 
  • trunk/lib/jelix-scripts/commands/createapp.cmd.php

    r413 r479  
    1717    public  $allowed_parameters=array(); 
    1818 
    19     public  $syntaxhelp = "[-withdefaultmodule] [-withcmdline]"; 
     19    public  $syntaxhelp = "[-withdefaultmodule] [-withcmdline] [-withrpc]"; 
    2020    public  $help=''; 
    2121 
     
    7272       $this->createDir(JELIX_APP_PATH.'modules'); 
    7373       $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/'); 
    7478       $this->createDir(JELIX_APP_PATH.'responses'); 
    7579 
     
    8084       $this->createFile(JELIX_APP_CONFIG_PATH.'dbprofils.ini.php','var/config/dbprofils.ini.php.tpl',$param); 
    8185       $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); 
    8486 
    8587       $param['rp_temp']=jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_TEMP_PATH,true); 
     
    9799 
    98100       $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        
    102102       if($this->getOption('-withdefaultmodule')){ 
    103103            $cmd = jxs_load_command('createmodule'); 
     
    113113            $this->createFile(JELIX_APP_CMD_PATH.'cmdline.php','scripts/cmdline.php.tpl',$param); 
    114114       } 
     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       } 
    115122    } 
    116123} 
  • trunk/lib/jelix-scripts/commands/createmodule.cmd.php

    r413 r479  
    5353          $this->createDir($path.'classes/'); 
    5454          $this->createDir($path.'daos/'); 
     55          $this->createDir($path.'forms/'); 
    5556          $this->createDir($path.'locales/'); 
    5657          $this->createDir($path.'locales/en_EN/'); 
  • trunk/lib/jelix-scripts/commands/createmodule.cmd.php

    r413 r479  
    5353          $this->createDir($path.'classes/'); 
    5454          $this->createDir($path.'daos/'); 
     55          $this->createDir($path.'forms/'); 
    5556          $this->createDir($path.'locales/'); 
    5657          $this->createDir($path.'locales/en_EN/'); 
  • trunk/lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl

    r451 r479  
    1717pluginsPath = lib:jelix-plugins/,app:plugins/ 
    1818modulesPath = lib:jelix-modules/,app:modules/ 
    19 tplpluginsPath = lib:jelix/tpl/plugins/ 
    2019 
    2120dbProfils = dbprofils.ini.php 
     
    4039error        = ECHO EXIT 
    4140warning      = ECHO 
    42 notice       = 
    43 strict       = 
     41notice       = ECHO 
     42strict       = ECHO 
    4443; pour les exceptions, il y a implicitement un EXIT 
    4544exception    = ECHO 
  • trunk/lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl

    r451 r479  
    1717pluginsPath = lib:jelix-plugins/,app:plugins/ 
    1818modulesPath = lib:jelix-modules/,app:modules/ 
    19 tplpluginsPath = lib:jelix/tpl/plugins/ 
    2019 
    2120dbProfils = dbprofils.ini.php 
     
    4039error        = ECHO EXIT 
    4140warning      = ECHO 
    42 notice       = 
    43 strict       = 
     41notice       = ECHO 
     42strict       = ECHO 
    4443; pour les exceptions, il y a implicitement un EXIT 
    4544exception    = ECHO 
  • trunk/lib/jelix/core/jUrl.class.php

    r477 r479  
    345345            global $gJConfig; 
    346346            $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]) 
    349349                || !file_exists($gJConfig->_pluginsPathList_urls[$name]) ){ 
    350350                    throw new jException('jelix~errors.urls.engine.notfound', $name); 
    351351            } 
    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'); 
    354354 
    355355            $cl=$name.'UrlEngine'; 
  • trunk/lib/jelix/core/jUrl.class.php

    r477 r479  
    345345            global $gJConfig; 
    346346            $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]) 
    349349                || !file_exists($gJConfig->_pluginsPathList_urls[$name]) ){ 
    350350                    throw new jException('jelix~errors.urls.engine.notfound', $name); 
    351351            } 
    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'); 
    354354 
    355355            $cl=$name.'UrlEngine'; 
  • trunk/lib/jelix/db/jDb.class.php

    r477 r479  
    7474 
    7575        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']]) 
    7878            || !file_exists($gJConfig->_pluginsPathList_db[$profil['driver']]) ){ 
    7979                throw new jException('jelix~db.error.driver.notfound', $profil['driver']); 
    8080        } 
    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'); 
    8383        $class = $profil['driver'].'DbTools'; 
    8484 
     
    161161        }else{ 
    162162            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']]) 
    165165                || !file_exists($gJConfig->_pluginsPathList_db[$profil['driver']]) ){ 
    166166                    throw new jException('jelix~db.error.driver.notfound', $profil['driver']); 
    167167            } 
    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'); 
    171172 
    172173            //creating of the connection 
  • trunk/lib/jelix/db/jDb.class.php

    r477 r479  
    7474 
    7575        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']]) 
    7878            || !file_exists($gJConfig->_pluginsPathList_db[$profil['driver']]) ){ 
    7979                throw new jException('jelix~db.error.driver.notfound', $profil['driver']); 
    8080        } 
    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'); 
    8383        $class = $profil['driver'].'DbTools'; 
    8484 
     
    161161        }else{ 
    162162            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']]) 
    165165                || !file_exists($gJConfig->_pluginsPathList_db[$profil['driver']]) ){ 
    166166                    throw new jException('jelix~db.error.driver.notfound', $profil['driver']); 
    167167            } 
    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'); 
    171172 
    172173            //creating of the connection 
  • trunk/lib/jelix/utils/jWiki.class.php

    r386 r479  
    55* @author     Laurent Jouanneau 
    66* @contributor 
    7 * @copyright  2006 Laurent Jouanneau 
     7* @copyright  2006-2007 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 
     
    2323 */ 
    2424class 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 
    2760 
    2861} 
  • trunk/lib/jelix/utils/jWiki.class.php

    r386 r479  
    55* @author     Laurent Jouanneau 
    66* @contributor 
    7 * @copyright  2006 Laurent Jouanneau 
     7* @copyright  2006-2007 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 
     
    2323 */ 
    2424class 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 
    2760 
    2861} 
  • trunk/testapp/var/config/defaultconfig.ini.php.dist

    r468 r479  
    1717pluginsPath = lib:jelix-plugins/,app:plugins/ 
    1818modulesPath = lib:jelix-modules/,app:modules/ 
    19 tplpluginsPath = lib:jelix/tpl/plugins/ 
    2019 
    2120dbProfils = dbprofils.ini.php 
  • trunk/testapp/var/config/defaultconfig.ini.php.dist

    r468 r479  
    1717pluginsPath = lib:jelix-plugins/,app:plugins/ 
    1818modulesPath = lib:jelix-modules/,app:modules/ 
    19 tplpluginsPath = lib:jelix/tpl/plugins/ 
    2019 
    2120dbProfils = dbprofils.ini.php 
Download in other formats: Unified Diff Zip Archive