Changeset 431
- Timestamp:
- 05/02/07 17:54:37 (2 years ago)
- Files:
-
- trunk/lib/jelix-plugins/auth/auth.plugin.ini.php.dist (modified) (1 diff)
- trunk/lib/jelix/core/jSelector.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jelix-plugins/auth/auth.plugin.ini.php.dist
r386 r431 38 38 error_message = "" 39 39 40 ;=========== Exemples de paramètres pour un module40 ;=========== Paramètres pour le module jauth 41 41 42 42 ; nombre de secondes d'attentes aprés un défaut d'authentification 43 ;on_error_sleep = 343 on_error_sleep = 3 44 44 45 ;enable_after_login_override = off46 ;after_login = 45 enable_after_login_override = off 46 after_login = "" 47 47 48 ;enable_after_logout_override = off49 ;after_logout = ""48 enable_after_logout_override = off 49 after_logout = "" 50 50 51 51 ;=========== Paramètres pour les drivers trunk/lib/jelix/core/jSelector.class.php
r430 r431 556 556 } 557 557 558 // on regarde si il y a un template redéfinie pour le theme courant 559 $this->_path = JELIX_APP_VAR_PATH.'themes/'.$gJConfig->defaultTheme.'/'.$this->module.'/'.$this->resource.'.tpl'; 560 if (is_readable ($this->_path)){ 561 $this->_where = 1; 558 if($gJConfig->defaultTheme != 'default'){ 559 // on regarde si il y a un template redéfinie pour le theme courant 560 $this->_where = 'themes/'.$gJConfig->defaultTheme.'/'.$this->module.'/'.$gJConfig->defaultLocale.'/'.$this->resource; 561 $this->_path = JELIX_APP_VAR_PATH.$this->_where.'.tpl'; 562 if (is_readable ($this->_path)){ 563 return; 564 } 565 // on regarde si il y a un template redéfinie pour le theme courant 566 $this->_where = 'themes/'.$gJConfig->defaultTheme.'/'.$this->module.'/'.$this->resource; 567 $this->_path = JELIX_APP_VAR_PATH.$this->_where.'.tpl'; 568 if (is_readable ($this->_path)){ 569 return; 570 } 571 } 572 573 // on regarde si il y a un template redéfinie dans le theme par defaut 574 $this->_where = 'themes/default/'.$this->module.'/'.$gJConfig->defaultLocale.'/'.$this->resource; 575 $this->_path = JELIX_APP_VAR_PATH.$this->_where.'.tpl'; 576 if (is_readable ($this->_path)){ 562 577 return; 563 }564 565 // on regarde si il y a un template redéfinie dans le theme par defaut566 $this->_path = JELIX_APP_VAR_PATH. 'themes/default/'.$this->module.'/'.$this->resource.'.tpl';578 } 579 580 $this->_where = 'themes/default/'.$this->module.'/'.$this->resource; 581 $this->_path = JELIX_APP_VAR_PATH.$this->_where.'.tpl'; 567 582 if (is_readable ($this->_path)){ 568 $this->_where = 2; 569 return; 583 return; 570 584 } 571 585 572 586 // et sinon, on regarde si le template existe dans le module en question 587 $this->_path = $gJConfig->_modulesPathList[$this->module].$this->_dirname.$gJConfig->defaultLocale.'/'.$this->resource.'.tpl'; 588 if (is_readable ($this->_path)){ 589 $this->_where = 'modules/'.$this->module.'/'.$gJConfig->defaultLocale.'/'.$this->resource; 590 return; 591 } 592 573 593 $this->_path = $gJConfig->_modulesPathList[$this->module].$this->_dirname.$this->resource.'.tpl'; 574 575 if (!is_readable ($this->_path)){ 576 throw new jExceptionSelector('jelix~errors.selector.invalid.target', array($this->toString(), "template")); 577 } 578 $this->_where = 0; 594 if (is_readable ($this->_path)){ 595 $this->_where = 'modules/'.$this->module.'/'.$this->resource; 596 return; 597 } 598 599 throw new jExceptionSelector('jelix~errors.selector.invalid.target', array($this->toString(), "template")); 600 579 601 } 580 602 581 603 protected function _createCachePath(){ 582 $d = array('modules/','themes/'.$GLOBALS['gJConfig']->defaultTheme.'/','themes/default/');583 604 // on ne partage pas le même cache pour tous les emplacements possibles 584 605 // au cas où un overload était supprimé 585 $this->_cachePath = JELIX_APP_TEMP_PATH.'compiled/templates/'.$ d[$this->_where].$this->module.'~'.$this->resource.$this->_cacheSuffix;606 $this->_cachePath = JELIX_APP_TEMP_PATH.'compiled/templates/'.$this->_where.$this->_cacheSuffix; 586 607 } 587 608 }
