Changeset 256

Show
Ignore:
Timestamp:
09/13/06 18:17:45 (2 years ago)
Author:
laurentj
Message:

- petite amélioration pour pouvoir mettre des fichiers de conf dans des sous-repertoire de config
- réorganisation des fichiers de conf pour testapp et la commande createapp
- fix bug #8782 : dans un order by, la table n'était pas précisé

Files:

Legend:

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

    r239 r256  
    126126  project.xml.tpl 
    127127  application.init.php.tpl 
    128   dbprofils.ini.php.tpl 
    129   defaultconfig.ini.php.tpl 
    130   config.classic.ini.php.tpl 
    131   config.cmdline.ini.php.tpl 
    132128  controller.cmdline.tpl 
    133129cd lib/jelix-scripts/templates/www 
     
    138134cd lib/jelix-scripts/templates/scripts 
    139135  cmdline.php.tpl 
     136cd lib/jelix-scripts/templates/var/config/ 
     137  dbprofils.ini.php.tpl 
     138  defaultconfig.ini.php.tpl 
     139cd lib/jelix-scripts/templates/var/config/index/ 
     140  config.ini.php.tpl 
     141cd lib/jelix-scripts/templates/var/config/jsonrpc/ 
     142  config.ini.php.tpl 
     143cd lib/jelix-scripts/templates/var/config/xmlrpc/ 
     144  config.ini.php.tpl 
     145cd lib/jelix-scripts/templates/var/config/cmdline/ 
     146  config.ini.php.tpl 
    140147 
    141148cd lib/jelix/docs 
  • trunk/build/manifests/testapp.mn

    r252 r256  
    7373  urlsig.classic.php 
    7474  dao.classic.php 
     75 
    7576cd testapp/var 
    7677  .htaccess 
    7778cd testapp/var/log 
    7879cd testapp/var/config 
    79   config.classic.ini.php.dist 
    8080  defaultconfig.ini.php.dist 
    8181  dbprofils.ini.php.dist 
    8282  urls.xml 
     83cd testapp/var/config/index 
     84  config.ini.php.dist 
     85cd testapp/var/config/xmlrpc 
     86  config.ini.php.dist 
     87cd testapp/var/config/jsonrpc 
     88  config.ini.php.dist 
    8389cd testapp/var/themes/default/testapp 
    8490  hello2.tpl 
  • trunk/lib/jelix-modules/auth/plugins/auth/auth.plugin.ini.php.dist

    r241 r256  
    3232 
    3333; indique quoi faire en cas de d�ut d'authentification 
    34 ; 1 = erreur. Valeur �ettre imp�tivement pour les web services 
     34; 1 = erreur. Valeur �ettre imp�tivement pour les web services (xmlrpc, jsonrpc...) 
    3535; 2 = redirection vers une action 
    3636on_error = 1 
  • trunk/lib/jelix-scripts/commands/createapp.cmd.php

    r242 r256  
    4747       $this->createDir(JELIX_APP_LOG_PATH); 
    4848       $this->createDir(JELIX_APP_CONFIG_PATH); 
     49       $this->createDir(JELIX_APP_CONFIG_PATH.'index/'); 
     50       $this->createDir(JELIX_APP_CONFIG_PATH.'jsonrpc/'); 
     51       $this->createDir(JELIX_APP_CONFIG_PATH.'xmlrpc/'); 
    4952       $this->createDir(JELIX_APP_VAR_PATH.'overloads/'); 
    5053       $this->createDir(JELIX_APP_VAR_PATH.'themes/'); 
     
    5861 
    5962       $this->createFile(JELIX_APP_PATH.'project.xml','project.xml.tpl',$param); 
    60        $this->createFile(JELIX_APP_CONFIG_PATH.'defaultconfig.ini.php','defaultconfig.ini.php.tpl',$param); 
    61        $this->createFile(JELIX_APP_CONFIG_PATH.'config.classic.ini.php','config.classic.ini.php.tpl',$param); 
    62        $this->createFile(JELIX_APP_CONFIG_PATH.'dbprofils.ini.php','dbprofils.ini.php.tpl',$param); 
     63       $this->createFile(JELIX_APP_CONFIG_PATH.'defaultconfig.ini.php','var/config/defaultconfig.ini.php.tpl',$param); 
     64       $this->createFile(JELIX_APP_CONFIG_PATH.'dbprofils.ini.php','var/config/dbprofils.ini.php.tpl',$param); 
     65       $this->createFile(JELIX_APP_CONFIG_PATH.'index/config.ini.php','var/config/index/config.ini.php.tpl',$param); 
     66       $this->createFile(JELIX_APP_CONFIG_PATH.'jsonrpc/config.ini.php','var/config/jsonrpc/config.ini.php.tpl',$param); 
     67       $this->createFile(JELIX_APP_CONFIG_PATH.'xmlrpc/config.ini.php','var/config/xmlrpc/config.ini.php.tpl',$param); 
    6368 
    6469       $param['rp_temp']=jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_TEMP_PATH,true); 
     
    8994       if ($this->getOption('-withcmdline')) { 
    9095            $this->createDir(JELIX_APP_CMD_PATH); 
    91             $this->createFile(JELIX_APP_CONFIG_PATH.'config.cmdline.ini.php','config.cmdline.ini.php.tpl',$param); 
     96            $this->createFile(JELIX_APP_CONFIG_PATH.'cmdline/config.ini.php','var/config/cmdline/config.ini.php.tpl',$param); 
    9297            $param['rp_cmd'] =jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_CMD_PATH,true); 
    9398            $this->createFile(JELIX_APP_CMD_PATH.'cmdline.php','scripts/cmdline.php.tpl',$param); 
  • trunk/lib/jelix-scripts/templates/var/config/index/config.ini.php.tpl

    r190 r256  
    33 
    44defaultAction = "default_index" 
     5[plugins] 
     6;nom = nom_fichier_ini 
     7 
     8[responses] 
  • trunk/lib/jelix/core/jConfigCompiler.class.php

    r248 r256  
    6868            $config['urlengine']['basePath'] = $path; 
    6969        } 
    70         self::_saveToIni($config, JELIX_APP_TEMP_PATH.$configFile.'.resultini.php'); 
     70        self::_saveToIni($config, JELIX_APP_TEMP_PATH.str_replace('/','~',$configFile).'.resultini.php'); 
    7171        $config = (object) $config; 
    7272        return $config; 
  • trunk/lib/jelix/core/jCoordinator.class.php

    r252 r256  
    9999     */ 
    100100    private function _loadPlugins(){ 
    101  
    102         foreach($GLOBALS['gJConfig']->plugins as $name=>$conf){ 
    103             if($conf && isset($GLOBALS['gJConfig']->_pluginsPathList[$name])){ 
    104                 if($conf=='1') 
    105                     $conff=$name.'.plugin.ini.php'
     101        global $gJConfig; 
     102 
     103        foreach($gJConfig->plugins as $name=>$conf){ 
     104            if($conf && isset($gJConfig->_pluginsPathList[$name])){ 
     105                $conff= $conf=='1' ? $name.'.plugin.ini.php': $conf
    106106                if(file_exists(JELIX_APP_CONFIG_PATH.$conff)){ 
    107107                   if( false === ($conf = @parse_ini_file(JELIX_APP_CONFIG_PATH.$conff,true))) 
     
    110110                    $conf = array(); 
    111111                } 
    112                 include( $GLOBALS['gJConfig']->_pluginsPathList[$name].$name.".plugin.php"); 
     112                include( $gJConfig->_pluginsPathList[$name].$name.".plugin.php"); 
    113113                $class= $name.'Plugin'; 
    114114                $this->plugins[strtolower($name)] = new $class($conf); 
  • trunk/lib/jelix/dao/jDaoGenerator.class.php

    r255 r256  
    608608            $ord=''; 
    609609            if (isset($fields[$name])){ 
    610                $ord = $name; 
     610               $ord = $fields[$name]->table.'.'.$fields[$name]->fieldName; 
    611611            }elseif($name{0} == '$'){ 
    612612               $ord = '\'.'.$name.'.\''; 
  • trunk/lib/jelix/dao/jDaoParser.class.php

    r255 r256  
    475475    } 
    476476 
    477  
    478     /* 
    479       <eq         property="foo" value="" expr=""/> 
    480       <noteq      property="foo" value="" expr=""/> 
    481       <lt         property="foo" value="" expr=""/> 
    482       <gt         property="foo" value="" expr=""/> 
    483       <lteq       property="foo" value="" expr=""/> 
    484       <gteq       property="foo" value="" expr=""/> 
    485       <in         property="foo" value="" expr=""/> 
    486       <notin      property="foo" value="" expr=""/> 
    487       <between    property="foo" min="" max="" exprmin="" exprmax=""/> 
    488       <notbetween property="foo" min="" max="" exprmin="" exprmax=""/> 
    489       <isnull     property="foo"/> 
    490       <notisnull  property="foo"/> 
    491     */ 
    492  
    493  
    494477   private $_op = array('eq'=>'=', 'neq'=>'<>', 'lt'=>'<', 'gt'=>'>', 'lteq'=>'<=', 'gteq'=>'>=', 
    495478        'like'=>'LIKE', 'notlike'=>'NOT LIKE', 'isnull'=>'IS NULL', 'isnotnull'=>'IS NOT NULL','in'=>'IN', 'notin'=>'NOT IN', 
     
    567550   } 
    568551 
    569    private function _addOrder($order){ 
    570       $attr = $this->_def->getAttr($order, array('property','way')); 
    571  
    572       $way  = ($attr['way'] !== null ? $attr['way']:'ASC'); 
    573  
    574       if(substr ($way,0,1) == '$'){ 
    575          if(!in_array (substr ($way,1),$this->_parameters)){ 
    576             throw new jDaoXmlException ('method.orderitem.parameter.unknow', array($this->name, $way)); 
    577          } 
    578       } 
    579  
    580       if ($attr['property'] != ''){ 
    581           $prop =$this->_def->getProperties(); 
    582          if(isset($prop[$attr['property']])){ 
    583                $this->_conditions->addItemOrder($attr['property'], $way); 
    584          }else{ 
    585                throw new jDaoXmlException ('method.orderitem.bad', array($attr['property'], $this->name)); 
    586          } 
    587       }else{ 
    588          throw new jDaoXmlException ('method.orderitem.property.missing', array($this->name)); 
    589       } 
     552    private function _addOrder($order){ 
     553        $attr = $this->_def->getAttr($order, array('property','way')); 
     554     
     555        $way  = ($attr['way'] !== null ? $attr['way']:'ASC'); 
     556     
     557        if(substr ($way,0,1) == '$'){ 
     558            if(!in_array (substr ($way,1),$this->_parameters)){ 
     559                throw new jDaoXmlException ('method.orderitem.parameter.unknow', array($this->name, $way)); 
     560            } 
     561        } 
     562 
     563        if ($attr['property'] != ''){ 
     564            $prop =$this->_def->getProperties(); 
     565            if(isset($prop[$attr['property']])){ 
     566                $this->_conditions->addItemOrder($attr['property'], $way); 
     567            }elseif(substr ($attr['property'],0,1) == '$'){ 
     568                if(!in_array (substr ($attr['property'],1),$this->_parameters)){ 
     569                    throw new jDaoXmlException ('method.orderitem.parameter.unknow', array($this->name, $way)); 
     570                } 
     571                $this->_conditions->addItemOrder($attr['property'], $way); 
     572            }else{ 
     573                throw new jDaoXmlException ('method.orderitem.bad', array($attr['property'], $this->name)); 
     574            } 
     575        }else{ 
     576            throw new jDaoXmlException ('method.orderitem.property.missing', array($this->name)); 
     577        } 
    590578 
    591579 
  • trunk/testapp/www/index.php

    r38 r256  
    1919require_once (JELIX_LIB_CORE_PATH.'request/jClassicRequest.class.php'); 
    2020 
    21 $config_file = 'config.classic.ini.php'; 
     21$config_file = 'index/config.ini.php'; 
    2222 
    2323$jelix = new jCoordinator($config_file); 
  • trunk/testapp/www/jsonrpc.php

    r38 r256  
    1717//require_once ('/usr/share/jelix/myapp/application.init.php'); 
    1818 
    19 $config_file = 'config.jsonrpc.ini.php'; 
     19$config_file = 'jsonrpc/config.ini.php'; 
    2020 
    2121require_once (JELIX_LIB_CORE_PATH.'request/jJsonRpcRequest.class.php'); 
  • trunk/testapp/www/xmlrpc.php

    r38 r256  
    1717//require_once ('/usr/share/jelix/testapp/application.init.php'); 
    1818 
    19 $config_file = 'config.xmlrpc.ini.php'; 
     19$config_file = 'xmlrpc/config.ini.php'; 
    2020 
    2121require_once (JELIX_LIB_CORE_PATH.'request/jXmlRpcRequest.class.php'); 
Download in other formats: Unified Diff Zip Archive