Changeset 516

Show
Ignore:
Timestamp:
08/01/07 18:04:12 (1 year ago)
Author:
laurentj
Message:

ticket #232: now PHP 5.1 is the default target
ticket #8: added default variables in jtpl : j_datenow, j_timenow, j_basepath, j_jelixwww
ticket #202: a new parameter in the config, jelixWWWPath, which contains the url path to the jelix-www directory

Files:

Legend:

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

    r479 r516  
    1616    ), 
    1717'PHP_VERSION_TARGET'=> array( 
    18     "PHP5 version for which jelix will be generated (by default, for all PHP5 version)", 
    19     '5.0
     18    "PHP5 version for which jelix will be generated (by default, the target is php 5.1)", 
     19    '5.1
    2020    ), 
    2121'EDITION_NAME'=> array( 
  • trunk/build/buildjelix.php

    r479 r516  
    1616    ), 
    1717'PHP_VERSION_TARGET'=> array( 
    18     "PHP5 version for which jelix will be generated (by default, for all PHP5 version)", 
    19     '5.0
     18    "PHP5 version for which jelix will be generated (by default, the target is php 5.1)", 
     19    '5.1
    2020    ), 
    2121'EDITION_NAME'=> array( 
  • trunk/lib/jelix/core/defaultconfig.ini.php

    r474 r516  
    109109basePath = "" 
    110110 
     111; this is the url path to the jelix-www content (you can found this content in lib/jelix-www/) 
     112; because the jelix-www directory is outside the yourapp/www/ directory, you should create a link to 
     113; jelix-www, or copy its content in yourapp/www/ (with a name like 'jelix' for example) 
     114; so you should indicate the relative path of this link/directory to the basePath, or an absolute path. 
     115jelixWWWPath = "jelix/" 
     116 
    111117defaultEntrypoint= index 
    112118 
  • trunk/lib/jelix/core/defaultconfig.ini.php

    r474 r516  
    109109basePath = "" 
    110110 
     111; this is the url path to the jelix-www content (you can found this content in lib/jelix-www/) 
     112; because the jelix-www directory is outside the yourapp/www/ directory, you should create a link to 
     113; jelix-www, or copy its content in yourapp/www/ (with a name like 'jelix' for example) 
     114; so you should indicate the relative path of this link/directory to the basePath, or an absolute path. 
     115jelixWWWPath = "jelix/" 
     116 
    111117defaultEntrypoint= index 
    112118 
  • trunk/lib/jelix/core/jConfigCompiler.class.php

    r478 r516  
    6262        } 
    6363 
     64        if($path!='' && $config->urlengine['jelixWWWPath']{0} != '/') 
     65            $config->urlengine['jelixWWWPath'] = $path.$config->urlengine['jelixWWWPath']; 
     66 
     67 
    6468        /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config->defaultLocale,$m)){ 
    6569            if(!isset($m[2])){ 
     
    106110            $config['urlengine']['basePath'] = $path; 
    107111        } 
     112 
     113        if($path!='' && $config['urlengine']['jelixWWWPath']{0} != '/') 
     114            $config['urlengine']['jelixWWWPath'] = $path.$config['urlengine']['jelixWWWPath']; 
    108115 
    109116        /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config['defaultLocale'],$m)){ 
  • trunk/lib/jelix/core/jConfigCompiler.class.php

    r478 r516  
    6262        } 
    6363 
     64        if($path!='' && $config->urlengine['jelixWWWPath']{0} != '/') 
     65            $config->urlengine['jelixWWWPath'] = $path.$config->urlengine['jelixWWWPath']; 
     66 
     67 
    6468        /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config->defaultLocale,$m)){ 
    6569            if(!isset($m[2])){ 
     
    106110            $config['urlengine']['basePath'] = $path; 
    107111        } 
     112 
     113        if($path!='' && $config['urlengine']['jelixWWWPath']{0} != '/') 
     114            $config['urlengine']['jelixWWWPath'] = $path.$config['urlengine']['jelixWWWPath']; 
    108115 
    109116        /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config['defaultLocale'],$m)){ 
  • trunk/lib/jelix/core/jRequest.class.php

    r451 r516  
    8787        if($gJConfig->urlengine['basePath'] == ''){ // for beginners or simple site, we "guess" the base path 
    8888            $gJConfig->urlengine['basePath'] = $this->url_script_path; 
     89            if($gJConfig->urlengine['jelixWWWPath']{0} != '/') 
     90                $gJConfig->urlengine['jelixWWWPath'] = $this->url_script_path.$gJConfig->urlengine['jelixWWWPath']; 
    8991        }else if(strpos($this->url_script_path,$gJConfig->urlengine['basePath']) !== 0){ 
    9092            die('Jelix Error: basePath in config file doesn\'t correspond to current base path. You should setup it to '.$this->url_script_path); 
  • trunk/lib/jelix/core/jRequest.class.php

    r451 r516  
    8787        if($gJConfig->urlengine['basePath'] == ''){ // for beginners or simple site, we "guess" the base path 
    8888            $gJConfig->urlengine['basePath'] = $this->url_script_path; 
     89            if($gJConfig->urlengine['jelixWWWPath']{0} != '/') 
     90                $gJConfig->urlengine['jelixWWWPath'] = $this->url_script_path.$gJConfig->urlengine['jelixWWWPath']; 
    8991        }else if(strpos($this->url_script_path,$gJConfig->urlengine['basePath']) !== 0){ 
    9092            die('Jelix Error: basePath in config file doesn\'t correspond to current base path. You should setup it to '.$this->url_script_path); 
  • trunk/lib/jelix/tpl/jTpl.class.php

    r510 r516  
    3737    public $_meta = array(); 
    3838 
    39     public function __construct(){ } 
     39    public function __construct(){ 
     40        global $gJConfig; 
     41        $this->_vars['j_basePath'] = $gJConfig->urlengine['basePath']; 
     42        $this->_vars['j_jelixwww'] = $gJConfig->urlengine['jelixWWWPath']; 
     43        $this->_vars['j_datenow'] = date('Y-m-d'); 
     44        $this->_vars['j_timenow'] = date('H:i:s'); 
     45    } 
    4046 
    4147    /** 
  • trunk/lib/jelix/tpl/jTpl.class.php

    r510 r516  
    3737    public $_meta = array(); 
    3838 
    39     public function __construct(){ } 
     39    public function __construct(){ 
     40        global $gJConfig; 
     41        $this->_vars['j_basePath'] = $gJConfig->urlengine['basePath']; 
     42        $this->_vars['j_jelixwww'] = $gJConfig->urlengine['jelixWWWPath']; 
     43        $this->_vars['j_datenow'] = date('Y-m-d'); 
     44        $this->_vars['j_timenow'] = date('H:i:s'); 
     45    } 
    4046 
    4147    /** 
  • trunk/testapp/modules/testapp/templates/main.tpl

    r386 r516  
    1212 
    1313<div id="footer"> 
    14 page HTML générée par {@jelix~jelix.framework.name@} 
     14page HTML générée le {$j_datenow} à {$j_timenow} par {@jelix~jelix.framework.name@} 
    1515</div> 
  • trunk/testapp/modules/testapp/templates/main.tpl

    r386 r516  
    1212 
    1313<div id="footer"> 
    14 page HTML générée par {@jelix~jelix.framework.name@} 
     14page HTML générée le {$j_datenow} à {$j_timenow} par {@jelix~jelix.framework.name@} 
    1515</div> 
Download in other formats: Unified Diff Zip Archive