Changeset 474
- Timestamp:
- 06/29/07 16:55:28 (2 years ago)
- Files:
-
- trunk/build/manifests/jelix-lib.mn (modified) (2 diffs)
- trunk/build/manifests/jelix-lib.mn (modified) (2 diffs)
- trunk/build/manifests/jtpl-standalone.mn (modified) (2 diffs)
- trunk/build/manifests/jtpl-standalone.mn (modified) (2 diffs)
- trunk/lib/jelix-plugins/coord (added)
- trunk/lib/jelix-plugins/coord (added)
- trunk/lib/jelix-plugins/coord/auth (moved) (moved from trunk/lib/jelix-plugins/auth)
- trunk/lib/jelix-plugins/coord/auth (moved) (moved from trunk/lib/jelix-plugins/auth)
- trunk/lib/jelix-plugins/coord/autolocale (moved) (moved from trunk/lib/jelix-plugins/autolocale)
- trunk/lib/jelix-plugins/coord/autolocale (moved) (moved from trunk/lib/jelix-plugins/autolocale)
- trunk/lib/jelix-plugins/coord/magicquotes (moved) (moved from trunk/lib/jelix-plugins/magicquotes)
- trunk/lib/jelix-plugins/coord/magicquotes (moved) (moved from trunk/lib/jelix-plugins/magicquotes)
- trunk/lib/jelix-plugins/tpl (moved) (moved from trunk/lib/jelix/tpl/plugins)
- trunk/lib/jelix-plugins/tpl (moved) (moved from trunk/lib/jelix/tpl/plugins)
- trunk/lib/jelix-plugins/tpl/common (copied) (copied from trunk/lib/jelix/tpl/plugins/common)
- trunk/lib/jelix-plugins/tpl/common (copied) (copied from trunk/lib/jelix/tpl/plugins/common)
- trunk/lib/jelix-plugins/tpl/html (copied) (copied from trunk/lib/jelix/tpl/plugins/html)
- trunk/lib/jelix-plugins/tpl/html (copied) (copied from trunk/lib/jelix/tpl/plugins/html)
- trunk/lib/jelix/core/defaultconfig.ini.php (modified) (1 diff)
- trunk/lib/jelix/core/defaultconfig.ini.php (modified) (1 diff)
- trunk/lib/jelix/core/jConfigCompiler.class.php (modified) (4 diffs)
- trunk/lib/jelix/core/jConfigCompiler.class.php (modified) (4 diffs)
- trunk/lib/jelix/core/jCoordinator.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/jCoordinator.class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/build/manifests/jelix-lib.mn
r473 r474 120 120 * jTpl.class.php 121 121 * jTplCompiler.class.php 122 123 124 cd lib/jelix/tpl/plugins/common125 block.ifacl.php126 block.ifnotacl.php127 block.ifuserconnected.php128 block.ifusernotconnected.php129 function.zone.php130 modifier.cat.php131 modifier.count_array.php132 modifier.count_characters.php133 modifier.count_paragraphs.php134 modifier.count_sentences.php135 modifier.count_words.php136 modifier.date_format.php137 modifier.indent.php138 modifier.jdatetime.php139 modifier.regex_replace.php140 modifier.replace.php141 modifier.spacify.php142 modifier.sprintf.php143 modifier.strip.php144 modifier.truncate.php145 modifier.wiki.php146 modifier.wordwrap.php147 148 cd lib/jelix/tpl/plugins/html149 function.jlocale.php150 function.jurl.php151 function.urljsstring.php152 modifier.nl2br.php153 meta.html.php154 function.formurl.php155 function.formurlparam.php156 function.diff.php157 block.form.php158 block.formcontrols.php159 function.ctrl_control.php160 function.ctrl_label.php161 function.ctrl_value.php162 163 cd lib/jelix/tpl/plugins/ltx2pdf164 function.jlocale.php165 function.jurl.php166 modifier.latex.php167 block.lenv.php168 block.lcmd.php169 170 cd lib/jelix/tpl/plugins/text171 function.jlocale.php172 function.jurl.php173 174 cd lib/jelix/tpl/plugins/xul175 function.jlocale.php176 function.jurl.php177 function.urljsstring.php178 meta.xul.php179 122 180 123 cd lib/jelix/utils/ … … 318 261 ! loginform.zone.php 319 262 263 320 264 cd lib/jelix-plugins 321 265 LICENCE 322 266 INSTALL 323 267 CREDITS 324 cd lib/jelix-plugins/magicquotes 268 269 cd lib/jelix-plugins/coord/magicquotes 325 270 ! magicquotes.plugin.php 326 271 plugin.xml 327 cd lib/jelix-plugins/autolocale 272 273 cd lib/jelix-plugins/coord/autolocale 328 274 autolocale.plugin.ini.php.dist 329 275 ! autolocale.plugin.php 330 276 plugin.xml 331 cd lib/jelix-plugins/auth 277 278 cd lib/jelix-plugins/coord/auth 332 279 ! auth.plugin.php 333 280 plugin.xml 334 281 auth.plugin.ini.php.dist 335 282 283 cd 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 307 cd 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 322 cd 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 329 cd lib/jelix-plugins/tpl/text 330 function.jlocale.php 331 function.jurl.php 332 333 cd lib/jelix-plugins/tpl/xul 334 function.jlocale.php 335 function.jurl.php 336 function.urljsstring.php 337 meta.xul.php 336 338 337 339 cd lib/jelix-www trunk/build/manifests/jelix-lib.mn
r473 r474 120 120 * jTpl.class.php 121 121 * jTplCompiler.class.php 122 123 124 cd lib/jelix/tpl/plugins/common125 block.ifacl.php126 block.ifnotacl.php127 block.ifuserconnected.php128 block.ifusernotconnected.php129 function.zone.php130 modifier.cat.php131 modifier.count_array.php132 modifier.count_characters.php133 modifier.count_paragraphs.php134 modifier.count_sentences.php135 modifier.count_words.php136 modifier.date_format.php137 modifier.indent.php138 modifier.jdatetime.php139 modifier.regex_replace.php140 modifier.replace.php141 modifier.spacify.php142 modifier.sprintf.php143 modifier.strip.php144 modifier.truncate.php145 modifier.wiki.php146 modifier.wordwrap.php147 148 cd lib/jelix/tpl/plugins/html149 function.jlocale.php150 function.jurl.php151 function.urljsstring.php152 modifier.nl2br.php153 meta.html.php154 function.formurl.php155 function.formurlparam.php156 function.diff.php157 block.form.php158 block.formcontrols.php159 function.ctrl_control.php160 function.ctrl_label.php161 function.ctrl_value.php162 163 cd lib/jelix/tpl/plugins/ltx2pdf164 function.jlocale.php165 function.jurl.php166 modifier.latex.php167 block.lenv.php168 block.lcmd.php169 170 cd lib/jelix/tpl/plugins/text171 function.jlocale.php172 function.jurl.php173 174 cd lib/jelix/tpl/plugins/xul175 function.jlocale.php176 function.jurl.php177 function.urljsstring.php178 meta.xul.php179 122 180 123 cd lib/jelix/utils/ … … 318 261 ! loginform.zone.php 319 262 263 320 264 cd lib/jelix-plugins 321 265 LICENCE 322 266 INSTALL 323 267 CREDITS 324 cd lib/jelix-plugins/magicquotes 268 269 cd lib/jelix-plugins/coord/magicquotes 325 270 ! magicquotes.plugin.php 326 271 plugin.xml 327 cd lib/jelix-plugins/autolocale 272 273 cd lib/jelix-plugins/coord/autolocale 328 274 autolocale.plugin.ini.php.dist 329 275 ! autolocale.plugin.php 330 276 plugin.xml 331 cd lib/jelix-plugins/auth 277 278 cd lib/jelix-plugins/coord/auth 332 279 ! auth.plugin.php 333 280 plugin.xml 334 281 auth.plugin.ini.php.dist 335 282 283 cd 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 307 cd 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 322 cd 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 329 cd lib/jelix-plugins/tpl/text 330 function.jlocale.php 331 function.jurl.php 332 333 cd lib/jelix-plugins/tpl/xul 334 function.jlocale.php 335 function.jurl.php 336 function.urljsstring.php 337 meta.xul.php 336 338 337 339 cd lib/jelix-www trunk/build/manifests/jtpl-standalone.mn
r447 r474 8 8 LICENCE 9 9 10 sd lib/jelix /tpl/plugins/common10 sd lib/jelix-plugins/tpl/common 11 11 dd plugins/common 12 12 function.include.php … … 27 27 modifier.wordwrap.php 28 28 29 sd lib/jelix /tpl/plugins/html29 sd lib/jelix-plugins/tpl/html 30 30 dd plugins/html 31 31 modifier.nl2br.php 32 32 33 sd lib/jelix /tpl/plugins/text33 sd lib/jelix-plugins/tpl/text 34 34 dd plugins/text 35 35 36 sd lib/jelix /tpl/plugins/xul36 sd lib/jelix-plugins/tpl/xul 37 37 dd plugins/xul 38 38 trunk/build/manifests/jtpl-standalone.mn
r447 r474 8 8 LICENCE 9 9 10 sd lib/jelix /tpl/plugins/common10 sd lib/jelix-plugins/tpl/common 11 11 dd plugins/common 12 12 function.include.php … … 27 27 modifier.wordwrap.php 28 28 29 sd lib/jelix /tpl/plugins/html29 sd lib/jelix-plugins/tpl/html 30 30 dd plugins/html 31 31 modifier.nl2br.php 32 32 33 sd lib/jelix /tpl/plugins/text33 sd lib/jelix-plugins/tpl/text 34 34 dd plugins/text 35 35 36 sd lib/jelix /tpl/plugins/xul36 sd lib/jelix-plugins/tpl/xul 37 37 dd plugins/xul 38 38 trunk/lib/jelix/core/defaultconfig.ini.php
r451 r474 15 15 pluginsPath = lib:jelix-plugins/,app:plugins/ 16 16 modulesPath = lib:jelix-modules/,app:modules/ 17 tplpluginsPath = lib:jelix/tpl/plugins/18 17 19 18 dbProfils = dbprofils.ini.php trunk/lib/jelix/core/defaultconfig.ini.php
r451 r474 15 15 pluginsPath = lib:jelix-plugins/,app:plugins/ 16 16 modulesPath = lib:jelix-modules/,app:modules/ 17 tplpluginsPath = lib:jelix/tpl/plugins/18 17 19 18 dbProfils = dbprofils.ini.php trunk/lib/jelix/core/jConfigCompiler.class.php
r451 r474 46 46 $config->_allBasePath = array(); 47 47 48 $config->_pluginsPathList = self::_loadPathList($config->pluginsPath, $config->_allBasePath);49 48 $config->_modulesPathList = self::_loadPathList($config->modulesPath, $config->_allBasePath); 50 49 51 self::_load TplPathList($config, 'tplpluginsPath');50 self::_loadPluginsPathList($config); 52 51 53 52 if($config->checkTrustedModules){ … … 92 91 93 92 $config['_allBasePath'] = array(); 94 $config['_pluginsPathList'] = self::_loadPathList($config['pluginsPath'], $config['_allBasePath']);95 93 $config['_modulesPathList'] = self::_loadPathList($config['modulesPath'], $config['_allBasePath']); 96 94 97 self::_load TplPathList($config, 'tplpluginsPath');95 self::_loadPluginsPathList($config); 98 96 99 97 if($config['checkTrustedModules']){ … … 195 193 } 196 194 197 /** 198 * Analyse and check the "lib:" and "app:" path for plugins199 * @param array $list list of "lib:*" and "app:*" path200 * @ return array list of full path201 */ 202 static private function _load TplPathList(&$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']); 207 205 #endif 208 206 foreach($list as $path){ 209 207 $p = str_replace(array('lib:','app:'), array(LIB_PATH, JELIX_APP_PATH), $path); 210 208 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); 212 210 exit; 213 211 } 214 212 if(substr($p,-1) !='/') 215 213 $p.='/'; 216 #if ENABLE_PHP_JELIX 217 $config->_allBasePath[]=$p; 218 #else 219 $config['_allBasePath'][]=$p; 220 #endif 214 221 215 if ($handle = opendir($p)) { 222 216 while (false !== ($f = readdir($handle))) { 223 217 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 } 230 244 } 231 245 } … … 234 248 } 235 249 } 250 236 251 #ifnot ENABLE_PHP_JELIX 237 252 /** trunk/lib/jelix/core/jConfigCompiler.class.php
r451 r474 46 46 $config->_allBasePath = array(); 47 47 48 $config->_pluginsPathList = self::_loadPathList($config->pluginsPath, $config->_allBasePath);49 48 $config->_modulesPathList = self::_loadPathList($config->modulesPath, $config->_allBasePath); 50 49 51 self::_load TplPathList($config, 'tplpluginsPath');50 self::_loadPluginsPathList($config); 52 51 53 52 if($config->checkTrustedModules){ … … 92 91 93 92 $config['_allBasePath'] = array(); 94 $config['_pluginsPathList'] = self::_loadPathList($config['pluginsPath'], $config['_allBasePath']);95 93 $config['_modulesPathList'] = self::_loadPathList($config['modulesPath'], $config['_allBasePath']); 96 94 97 self::_load TplPathList($config, 'tplpluginsPath');95 self::_loadPluginsPathList($config); 98 96 99 97 if($config['checkTrustedModules']){ … … 195 193 } 196 194 197 /** 198 * Analyse and check the "lib:" and "app:" path for plugins199 * @param array $list list of "lib:*" and "app:*" path200 * @ return array list of full path201 */ 202 static private function _load TplPathList(&$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']); 207 205 #endif 208 206 foreach($list as $path){ 209 207 $p = str_replace(array('lib:','app:'), array(LIB_PATH, JELIX_APP_PATH), $path); 210 208 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); 212 210 exit; 213 211 } 214 212 if(substr($p,-1) !='/') 215 213 $p.='/'; 216 #if ENABLE_PHP_JELIX 217 $config->_allBasePath[]=$p; 218 #else 219 $config['_allBasePath'][]=$p; 220 #endif 214 221 215 if ($handle = opendir($p)) { 222 216 while (false !== ($f = readdir($handle))) { 223 217 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 } 230 244 } 231 245 } … … 234 248 } 235 249 } 250 236 251 #ifnot ENABLE_PHP_JELIX 237 252 /** trunk/lib/jelix/core/jCoordinator.class.php
r427 r474 107 107 108 108 foreach($gJConfig->plugins as $name=>$conf){ 109 if($conf && isset($gJConfig->_pluginsPathList [$name])){109 if($conf && isset($gJConfig->_pluginsPathList_coord[$name])){ 110 110 $conff= $conf=='1' ? $name.'.plugin.ini.php': $conf; 111 111 if(file_exists(JELIX_APP_CONFIG_PATH.$conff)){ … … 115 115 $conf = array(); 116 116 } 117 include( $gJConfig->_pluginsPathList [$name].$name.'.plugin.php');117 include( $gJConfig->_pluginsPathList_coord[$name].$name.'.plugin.php'); 118 118 $class= $name.'Plugin'; 119 119 $this->plugins[strtolower($name)] = new $class($conf); trunk/lib/jelix/core/jCoordinator.class.php
r427 r474 107 107 108 108 foreach($gJConfig->plugins as $name=>$conf){ 109 if($conf && isset($gJConfig->_pluginsPathList [$name])){109 if($conf && isset($gJConfig->_pluginsPathList_coord[$name])){ 110 110 $conff= $conf=='1' ? $name.'.plugin.ini.php': $conf; 111 111 if(file_exists(JELIX_APP_CONFIG_PATH.$conff)){ … … 115 115 $conf = array(); 116 116 } 117 include( $gJConfig->_pluginsPathList [$name].$name.'.plugin.php');117 include( $gJConfig->_pluginsPathList_coord[$name].$name.'.plugin.php'); 118 118 $class= $name.'Plugin'; 119 119 $this->plugins[strtolower($name)] = new $class($conf);
