Changeset 3152

Show
Ignore:
Timestamp:
08/19/08 23:00:33 (3 months ago)
Author:
steevanb
Message:

Ajout d'un paramètre $pTheme à _resource et _resourcePath, si on veut spécifier le thème qui contient la ressource

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/utils/copix/core/CopixUrl.class.php

    r2870 r3152  
    875875     * @return  string  le $ressourcePath complet en fonction des thèmes 
    876876     */ 
    877     public static function getResource ($pResourcePath){ 
     877    public static function getResource ($pResourcePath, $pTheme = null){ 
    878878        static $calculated = array (); 
    879879         
    880         $theme = CopixTpl::getTheme ()
     880        $theme = ($pTheme === null) ? CopixTpl::getTheme () : $pTheme
    881881        $i18n = CopixConfig::instance ()->i18n_path_enabled; 
    882882        $lang = CopixI18N::getLang (); 
     
    926926     * @return  string  le $ressourcePath complet en fonction des thèmes 
    927927     */ 
    928     public static function getResourcePath ($pResourcePath) { 
     928    public static function getResourcePath ($pResourcePath, $pTheme = null) { 
    929929        static $calculated = array (); 
    930930 
    931         $theme = CopixTpl::getTheme ()
     931        $theme = ($pTheme === null) ? CopixTpl::getTheme () : $pTheme
    932932        $i18n = CopixConfig::instance ()->i18n_path_enabled; 
    933933        $lang = CopixI18N::getLang (); 
  • trunk/utils/copix/core/shortcuts.lib.php

    r2870 r3152  
    7171 * @return string  
    7272 */ 
    73 function _resource ($pResourcePath){   
    74     return CopixUrl::getResource ($pResourcePath); 
     73function _resource ($pResourcePath, $pTheme = null){   
     74    return CopixUrl::getResource ($pResourcePath, $pTheme); 
    7575} 
    7676 
     
    8181 * @return string  
    8282 */ 
    83 function _resourcePath ($pResourcePath){ 
    84     return CopixUrl::getResourcePath ($pResourcePath); 
     83function _resourcePath ($pResourcePath, $pTheme = null){ 
     84    return CopixUrl::getResourcePath ($pResourcePath, $pTheme); 
    8585} 
    8686