Changeset 474

Show
Ignore:
Timestamp:
06/29/07 16:55:28 (2 years ago)
Author:
laurentj
Message:

worked on ticket #132 : reorganized directories and files for all plugins and drivers. here, moved coordinator plugins and jtpl plugins

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build/manifests/jelix-lib.mn

    r473 r474  
    120120*  jTpl.class.php 
    121121*  jTplCompiler.class.php 
    122  
    123  
    124 cd lib/jelix/tpl/plugins/common 
    125   block.ifacl.php 
    126   block.ifnotacl.php 
    127   block.ifuserconnected.php 
    128   block.ifusernotconnected.php 
    129   function.zone.php 
    130   modifier.cat.php 
    131   modifier.count_array.php 
    132   modifier.count_characters.php 
    133   modifier.count_paragraphs.php 
    134   modifier.count_sentences.php 
    135   modifier.count_words.php 
    136   modifier.date_format.php 
    137   modifier.indent.php 
    138   modifier.jdatetime.php 
    139   modifier.regex_replace.php 
    140   modifier.replace.php 
    141   modifier.spacify.php 
    142   modifier.sprintf.php 
    143   modifier.strip.php 
    144   modifier.truncate.php 
    145   modifier.wiki.php 
    146   modifier.wordwrap.php 
    147  
    148 cd lib/jelix/tpl/plugins/html 
    149   function.jlocale.php 
    150   function.jurl.php 
    151   function.urljsstring.php 
    152   modifier.nl2br.php 
    153   meta.html.php 
    154   function.formurl.php 
    155   function.formurlparam.php 
    156   function.diff.php 
    157   block.form.php 
    158   block.formcontrols.php 
    159   function.ctrl_control.php 
    160   function.ctrl_label.php 
    161   function.ctrl_value.php 
    162  
    163 cd lib/jelix/tpl/plugins/ltx2pdf 
    164   function.jlocale.php 
    165   function.jurl.php 
    166   modifier.latex.php 
    167   block.lenv.php 
    168   block.lcmd.php 
    169  
    170 cd lib/jelix/tpl/plugins/text 
    171   function.jlocale.php 
    172   function.jurl.php 
    173  
    174 cd lib/jelix/tpl/plugins/xul 
    175   function.jlocale.php 
    176   function.jurl.php 
    177   function.urljsstring.php 
    178   meta.xul.php 
    179122 
    180123cd lib/jelix/utils/ 
     
    318261! loginform.zone.php 
    319262 
     263 
    320264cd lib/jelix-plugins 
    321265  LICENCE 
    322266  INSTALL 
    323267  CREDITS 
    324 cd lib/jelix-plugins/magicquotes 
     268 
     269cd lib/jelix-plugins/coord/magicquotes 
    325270! magicquotes.plugin.php 
    326271  plugin.xml 
    327 cd lib/jelix-plugins/autolocale 
     272 
     273cd lib/jelix-plugins/coord/autolocale 
    328274  autolocale.plugin.ini.php.dist 
    329275! autolocale.plugin.php 
    330276  plugin.xml 
    331 cd lib/jelix-plugins/auth 
     277 
     278cd lib/jelix-plugins/coord/auth 
    332279! auth.plugin.php 
    333280  plugin.xml 
    334281  auth.plugin.ini.php.dist 
    335282 
     283cd lib/jelix-plugins/tpl/common 
     284  block.ifacl.php 
     285  block.ifnotacl.php 
     286  block.ifuserconnected.php 
     287  block.ifusernotconnected.php 
     288  function.zone.php 
     289  modifier.cat.php 
     290  modifier.count_array.php 
     291  modifier.count_characters.php 
     292  modifier.count_paragraphs.php 
     293  modifier.count_sentences.php 
     294  modifier.count_words.php 
     295  modifier.date_format.php 
     296  modifier.indent.php 
     297  modifier.jdatetime.php 
     298  modifier.regex_replace.php 
     299  modifier.replace.php 
     300  modifier.spacify.php 
     301  modifier.sprintf.php 
     302  modifier.strip.php 
     303  modifier.truncate.php 
     304  modifier.wiki.php 
     305  modifier.wordwrap.php 
     306 
     307cd lib/jelix-plugins/tpl/html 
     308  function.jlocale.php 
     309  function.jurl.php 
     310  function.urljsstring.php 
     311  modifier.nl2br.php 
     312  meta.html.php 
     313  function.formurl.php 
     314  function.formurlparam.php 
     315  function.diff.php 
     316  block.form.php 
     317  block.formcontrols.php 
     318  function.ctrl_control.php 
     319  function.ctrl_label.php 
     320  function.ctrl_value.php 
     321 
     322cd lib/jelix-plugins/tpl/ltx2pdf 
     323  function.jlocale.php 
     324  function.jurl.php 
     325  modifier.latex.php 
     326  block.lenv.php 
     327  block.lcmd.php 
     328 
     329cd lib/jelix-plugins/tpl/text 
     330  function.jlocale.php 
     331  function.jurl.php 
     332 
     333cd lib/jelix-plugins/tpl/xul 
     334  function.jlocale.php 
     335  function.jurl.php 
     336  function.urljsstring.php 
     337  meta.xul.php 
    336338 
    337339cd lib/jelix-www 
  • trunk/build/manifests/jelix-lib.mn

    r473 r474  
    120120*  jTpl.class.php 
    121121*  jTplCompiler.class.php 
    122  
    123  
    124 cd lib/jelix/tpl/plugins/common 
    125   block.ifacl.php 
    126   block.ifnotacl.php 
    127   block.ifuserconnected.php 
    128   block.ifusernotconnected.php 
    129   function.zone.php 
    130   modifier.cat.php 
    131   modifier.count_array.php 
    132   modifier.count_characters.php 
    133   modifier.count_paragraphs.php 
    134   modifier.count_sentences.php 
    135   modifier.count_words.php 
    136   modifier.date_format.php 
    137   modifier.indent.php 
    138   modifier.jdatetime.php 
    139   modifier.regex_replace.php 
    140   modifier.replace.php 
    141   modifier.spacify.php 
    142   modifier.sprintf.php 
    143   modifier.strip.php 
    144   modifier.truncate.php 
    145   modifier.wiki.php 
    146   modifier.wordwrap.php 
    147  
    148 cd lib/jelix/tpl/plugins/html 
    149   function.jlocale.php 
    150   function.jurl.php 
    151   function.urljsstring.php 
    152   modifier.nl2br.php 
    153   meta.html.php 
    154   function.formurl.php 
    155   function.formurlparam.php 
    156   function.diff.php 
    157   block.form.php 
    158   block.formcontrols.php 
    159   function.ctrl_control.php 
    160   function.ctrl_label.php 
    161   function.ctrl_value.php 
    162  
    163 cd lib/jelix/tpl/plugins/ltx2pdf 
    164   function.jlocale.php 
    165   function.jurl.php 
    166   modifier.latex.php 
    167   block.lenv.php 
    168   block.lcmd.php 
    169  
    170 cd lib/jelix/tpl/plugins/text 
    171   function.jlocale.php 
    172   function.jurl.php 
    173  
    174 cd lib/jelix/tpl/plugins/xul 
    175   function.jlocale.php 
    176   function.jurl.php 
    177   function.urljsstring.php 
    178   meta.xul.php 
    179122 
    180123cd lib/jelix/utils/ 
     
    318261! loginform.zone.php 
    319262 
     263 
    320264cd lib/jelix-plugins 
    321265  LICENCE 
    322266  INSTALL 
    323267  CREDITS 
    324 cd lib/jelix-plugins/magicquotes 
     268 
     269cd lib/jelix-plugins/coord/magicquotes 
    325270! magicquotes.plugin.php 
    326271  plugin.xml 
    327 cd lib/jelix-plugins/autolocale 
     272 
     273cd lib/jelix-plugins/coord/autolocale 
    328274  autolocale.plugin.ini.php.dist 
    329275! autolocale.plugin.php 
    330276  plugin.xml 
    331 cd lib/jelix-plugins/auth 
     277 
     278cd lib/jelix-plugins/coord/auth 
    332279! auth.plugin.php 
    333280  plugin.xml 
    334281  auth.plugin.ini.php.dist 
    335282 
     283cd lib/jelix-plugins/tpl/common 
     284  block.ifacl.php 
     285  block.ifnotacl.php 
     286  block.ifuserconnected.php 
     287  block.ifusernotconnected.php 
     288  function.zone.php 
     289  modifier.cat.php 
     290  modifier.count_array.php 
     291  modifier.count_characters.php 
     292  modifier.count_paragraphs.php 
     293  modifier.count_sentences.php 
     294  modifier.count_words.php 
     295  modifier.date_format.php 
     296  modifier.indent.php 
     297  modifier.jdatetime.php 
     298  modifier.regex_replace.php 
     299  modifier.replace.php 
     300  modifier.spacify.php 
     301  modifier.sprintf.php 
     302  modifier.strip.php 
     303  modifier.truncate.php 
     304  modifier.wiki.php 
     305  modifier.wordwrap.php 
     306 
     307cd lib/jelix-plugins/tpl/html 
     308  function.jlocale.php 
     309  function.jurl.php 
     310  function.urljsstring.php 
     311  modifier.nl2br.php 
     312  meta.html.php 
     313  function.formurl.php 
     314  function.formurlparam.php 
     315  function.diff.php 
     316  block.form.php 
     317  block.formcontrols.php 
     318  function.ctrl_control.php 
     319  function.ctrl_label.php 
     320  function.ctrl_value.php 
     321 
     322cd lib/jelix-plugins/tpl/ltx2pdf 
     323  function.jlocale.php 
     324  function.jurl.php 
     325  modifier.latex.php 
     326  block.lenv.php 
     327  block.lcmd.php 
     328 
     329cd lib/jelix-plugins/tpl/text 
     330  function.jlocale.php 
     331  function.jurl.php 
     332 
     333cd lib/jelix-plugins/tpl/xul 
     334  function.jlocale.php 
     335  function.jurl.php 
     336  function.urljsstring.php 
     337  meta.xul.php 
    336338 
    337339cd lib/jelix-www 
  • trunk/build/manifests/jtpl-standalone.mn

    r447 r474  
    88   LICENCE 
    99 
    10 sd lib/jelix/tpl/plugins/common 
     10sd lib/jelix-plugins/tpl/common 
    1111dd plugins/common 
    1212  function.include.php 
     
    2727  modifier.wordwrap.php 
    2828 
    29 sd lib/jelix/tpl/plugins/html 
     29sd lib/jelix-plugins/tpl/html 
    3030dd plugins/html 
    3131  modifier.nl2br.php 
    3232 
    33 sd lib/jelix/tpl/plugins/text 
     33sd lib/jelix-plugins/tpl/text 
    3434dd plugins/text 
    3535 
    36 sd lib/jelix/tpl/plugins/xul 
     36sd lib/jelix-plugins/tpl/xul 
    3737dd plugins/xul 
    3838 
  • trunk/build/manifests/jtpl-standalone.mn

    r447 r474  
    88   LICENCE 
    99 
    10 sd lib/jelix/tpl/plugins/common 
     10sd lib/jelix-plugins/tpl/common 
    1111dd plugins/common 
    1212  function.include.php 
     
    2727  modifier.wordwrap.php 
    2828 
    29 sd lib/jelix/tpl/plugins/html 
     29sd lib/jelix-plugins/tpl/html 
    3030dd plugins/html 
    3131  modifier.nl2br.php 
    3232 
    33 sd lib/jelix/tpl/plugins/text 
     33sd lib/jelix-plugins/tpl/text 
    3434dd plugins/text 
    3535 
    36 sd lib/jelix/tpl/plugins/xul 
     36sd lib/jelix-plugins/tpl/xul 
    3737dd plugins/xul 
    3838 
  • trunk/lib/jelix/core/defaultconfig.ini.php

    r451 r474  
    1515pluginsPath = lib:jelix-plugins/,app:plugins/ 
    1616modulesPath = lib:jelix-modules/,app:modules/ 
    17 tplpluginsPath = lib:jelix/tpl/plugins/ 
    1817 
    1918dbProfils = dbprofils.ini.php 
  • trunk/lib/jelix/core/defaultconfig.ini.php

    r451 r474  
    1515pluginsPath = lib:jelix-plugins/,app:plugins/ 
    1616modulesPath = lib:jelix-modules/,app:modules/ 
    17 tplpluginsPath = lib:jelix/tpl/plugins/ 
    1817 
    1918dbProfils = dbprofils.ini.php 
  • trunk/lib/jelix/core/jConfigCompiler.class.php

    r451 r474  
    4646        $config->_allBasePath = array(); 
    4747         
    48         $config->_pluginsPathList = self::_loadPathList($config->pluginsPath, $config->_allBasePath); 
    4948        $config->_modulesPathList = self::_loadPathList($config->modulesPath, $config->_allBasePath); 
    5049 
    51         self::_loadTplPathList($config, 'tplpluginsPath'); 
     50        self::_loadPluginsPathList($config); 
    5251 
    5352        if($config->checkTrustedModules){ 
     
    9291 
    9392        $config['_allBasePath'] = array(); 
    94         $config['_pluginsPathList'] = self::_loadPathList($config['pluginsPath'], $config['_allBasePath']); 
    9593        $config['_modulesPathList'] = self::_loadPathList($config['modulesPath'], $config['_allBasePath']); 
    9694 
    97         self::_loadTplPathList($config, 'tplpluginsPath'); 
     95        self::_loadPluginsPathList($config); 
    9896 
    9997        if($config['checkTrustedModules']){ 
     
    195193    } 
    196194 
    197     /** 
    198     * Analyse and check the "lib:" and "app:" path for plugins 
    199      * @param array $list list of "lib:*" and "app:*" path 
    200      * @return array list of full path 
    201      */ 
    202     static private function _loadTplPathList(&$config,  $var){ 
    203 #if ENABLE_PHP_JELIX 
    204         $list = split(' *, *',$config->$var); 
    205 #else 
    206         $list = split(' *, *',$config[$var]); 
     195 
     196    /** 
     197     * Analyse plugin paths 
     198     * @param array|object $config the config container 
     199     */ 
     200    static private function _loadPluginsPathList(&$config){ 
     201#if ENABLE_PHP_JELIX 
     202        $list = split(' *, *',$config->pluginsPath); 
     203#else 
     204        $list = split(' *, *',$config['pluginsPath']); 
    207205#endif 
    208206        foreach($list as $path){ 
    209207            $p = str_replace(array('lib:','app:'), array(LIB_PATH, JELIX_APP_PATH), $path); 
    210208            if(!file_exists($p)){ 
    211                 trigger_error('The path '.$path.' for tpl plugins, given in the jelix config, doesn\'t exists !',E_USER_ERROR); 
     209                trigger_error('The path, '.$path.' given in the jelix config, doesn\'t exists !',E_USER_ERROR); 
    212210                exit; 
    213211            } 
    214212            if(substr($p,-1) !='/') 
    215213                $p.='/'; 
    216 #if ENABLE_PHP_JELIX 
    217             $config->_allBasePath[]=$p; 
    218 #else 
    219             $config['_allBasePath'][]=$p; 
    220 #endif 
     214 
    221215            if ($handle = opendir($p)) { 
    222216                while (false !== ($f = readdir($handle))) { 
    223217                    if ($f{0} != '.' && is_dir($p.$f)) { 
    224 #if ENABLE_PHP_JELIX 
    225                         $prop = '_tplpluginsPathList_'.$f; 
    226                         $config->{$prop}[] = $p.$f.'/'; 
    227 #else 
    228                         $config['_tplpluginsPathList_'.$f][] = $p.$f.'/'; 
    229 #endif 
     218                        if($subdir = opendir($p.$f)){ 
     219#if ENABLE_PHP_JELIX 
     220                            $config->_allBasePath[]=$p.$f.'/'; 
     221#else 
     222                            $config['_allBasePath'][]=$p.$f.'/'; 
     223#endif 
     224                            $allBasePath[]=$p.$f.'/'; 
     225                            while (false !== ($subf = readdir($subdir))) { 
     226                                if ($subf{0} != '.' && is_dir($p.$f.'/'.$subf)) { 
     227                                    if($f == 'tpl'){ 
     228#if ENABLE_PHP_JELIX 
     229                                        $prop = '_tplpluginsPathList_'.$subf; 
     230                                        $config->{$prop}[] = $p.$f.'/'.$subf.'/'; 
     231                                    }else{ 
     232                                        $prop = '_pluginsPathList_'.$f; 
     233                                        $config->{$prop}[$subf] = $p.$f.'/'.$subf.'/'; 
     234#else 
     235                                        $config['_tplpluginsPathList_'.$subf][] = $p.$f.'/'.$subf.'/'; 
     236                                    }else{ 
     237                                        $config['_pluginsPathList_'.$f][$subf] =$p.$f.'/'.$subf.'/'; 
     238#endif 
     239                                    } 
     240                                } 
     241                            } 
     242                            closedir($subdir); 
     243                        } 
    230244                    } 
    231245                } 
     
    234248        } 
    235249    } 
     250 
    236251#ifnot ENABLE_PHP_JELIX 
    237252    /** 
  • trunk/lib/jelix/core/jConfigCompiler.class.php

    r451 r474  
    4646        $config->_allBasePath = array(); 
    4747         
    48         $config->_pluginsPathList = self::_loadPathList($config->pluginsPath, $config->_allBasePath); 
    4948        $config->_modulesPathList = self::_loadPathList($config->modulesPath, $config->_allBasePath); 
    5049 
    51         self::_loadTplPathList($config, 'tplpluginsPath'); 
     50        self::_loadPluginsPathList($config); 
    5251 
    5352        if($config->checkTrustedModules){ 
     
    9291 
    9392        $config['_allBasePath'] = array(); 
    94         $config['_pluginsPathList'] = self::_loadPathList($config['pluginsPath'], $config['_allBasePath']); 
    9593        $config['_modulesPathList'] = self::_loadPathList($config['modulesPath'], $config['_allBasePath']); 
    9694 
    97         self::_loadTplPathList($config, 'tplpluginsPath'); 
     95        self::_loadPluginsPathList($config); 
    9896 
    9997        if($config['checkTrustedModules']){ 
     
    195193    } 
    196194 
    197     /** 
    198     * Analyse and check the "lib:" and "app:" path for plugins 
    199      * @param array $list list of "lib:*" and "app:*" path 
    200      * @return array list of full path 
    201      */ 
    202     static private function _loadTplPathList(&$config,  $var){ 
    203 #if ENABLE_PHP_JELIX 
    204         $list = split(' *, *',$config->$var); 
    205 #else 
    206         $list = split(' *, *',$config[$var]); 
     195 
     196    /** 
     197     * Analyse plugin paths 
     198     * @param array|object $config the config container 
     199     */ 
     200    static private function _loadPluginsPathList(&$config){ 
     201#if ENABLE_PHP_JELIX 
     202        $list = split(' *, *',$config->pluginsPath); 
     203#else 
     204        $list = split(' *, *',$config['pluginsPath']); 
    207205#endif 
    208206        foreach($list as $path){ 
    209207            $p = str_replace(array('lib:','app:'), array(LIB_PATH, JELIX_APP_PATH), $path); 
    210208            if(!file_exists($p)){ 
    211                 trigger_error('The path '.$path.' for tpl plugins, given in the jelix config, doesn\'t exists !',E_USER_ERROR); 
     209                trigger_error('The path, '.$path.' given in the jelix config, doesn\'t exists !',E_USER_ERROR); 
    212210                exit; 
    213211            } 
    214212            if(substr($p,-1) !='/') 
    215213                $p.='/'; 
    216 #if ENABLE_PHP_JELIX 
    217             $config->_allBasePath[]=$p; 
    218 #else 
    219             $config['_allBasePath'][]=$p; 
    220 #endif 
     214 
    221215            if ($handle = opendir($p)) { 
    222216                while (false !== ($f = readdir($handle))) { 
    223217                    if ($f{0} != '.' && is_dir($p.$f)) { 
    224 #if ENABLE_PHP_JELIX 
    225                         $prop = '_tplpluginsPathList_'.$f; 
    226                         $config->{$prop}[] = $p.$f.'/'; 
    227 #else 
    228                         $config['_tplpluginsPathList_'.$f][] = $p.$f.'/'; 
    229 #endif 
     218                        if($subdir = opendir($p.$f)){ 
     219#if ENABLE_PHP_JELIX 
     220                            $config->_allBasePath[]=$p.$f.'/'; 
     221#else 
     222                            $config['_allBasePath'][]=$p.$f.'/'; 
     223#endif 
     224                            $allBasePath[]=$p.$f.'/'; 
     225                            while (false !== ($subf = readdir($subdir))) { 
     226                                if ($subf{0} != '.' && is_dir($p.$f.'/'.$subf)) { 
     227                                    if($f == 'tpl'){ 
     228#if ENABLE_PHP_JELIX 
     229                                        $prop = '_tplpluginsPathList_'.$subf; 
     230                                        $config->{$prop}[] = $p.$f.'/'.$subf.'/'; 
     231                                    }else{ 
     232                                        $prop = '_pluginsPathList_'.$f; 
     233                                        $config->{$prop}[$subf] = $p.$f.'/'.$subf.'/'; 
     234#else 
     235                                        $config['_tplpluginsPathList_'.$subf][] = $p.$f.'/'.$subf.'/'; 
     236                                    }else{ 
     237                                        $config['_pluginsPathList_'.$f][$subf] =$p.$f.'/'.$subf.'/'; 
     238#endif 
     239                                    } 
     240                                } 
     241                            } 
     242                            closedir($subdir); 
     243                        } 
    230244                    } 
    231245                } 
     
    234248        } 
    235249    } 
     250 
    236251#ifnot ENABLE_PHP_JELIX 
    237252    /** 
  • trunk/lib/jelix/core/jCoordinator.class.php

    r427 r474  
    107107 
    108108        foreach($gJConfig->plugins as $name=>$conf){ 
    109             if($conf && isset($gJConfig->_pluginsPathList[$name])){ 
     109            if($conf && isset($gJConfig->_pluginsPathList_coord[$name])){ 
    110110                $conff= $conf=='1' ? $name.'.plugin.ini.php': $conf; 
    111111                if(file_exists(JELIX_APP_CONFIG_PATH.$conff)){ 
     
    115115                    $conf = array(); 
    116116                } 
    117                 include( $gJConfig->_pluginsPathList[$name].$name.'.plugin.php'); 
     117                include( $gJConfig->_pluginsPathList_coord[$name].$name.'.plugin.php'); 
    118118                $class= $name.'Plugin'; 
    119119                $this->plugins[strtolower($name)] = new $class($conf); 
  • trunk/lib/jelix/core/jCoordinator.class.php

    r427 r474  
    107107 
    108108        foreach($gJConfig->plugins as $name=>$conf){ 
    109             if($conf && isset($gJConfig->_pluginsPathList[$name])){ 
     109            if($conf && isset($gJConfig->_pluginsPathList_coord[$name])){ 
    110110                $conff= $conf=='1' ? $name.'.plugin.ini.php': $conf; 
    111111                if(file_exists(JELIX_APP_CONFIG_PATH.$conff)){ 
     
    115115                    $conf = array(); 
    116116                } 
    117                 include( $gJConfig->_pluginsPathList[$name].$name.'.plugin.php'); 
     117                include( $gJConfig->_pluginsPathList_coord[$name].$name.'.plugin.php'); 
    118118                $class= $name.'Plugin'; 
    119119                $this->plugins[strtolower($name)] = new $class($conf); 
Download in other formats: Unified Diff Zip Archive