Changeset 155

Show
Ignore:
Timestamp:
05/04/06 00:12:40 (3 years ago)
Author:
laurentj
Message:

makefile pour jbt, correction sur la lecture de la config des plugins, correction sur la generation de selectfirst et count dans les daos, quelques petites corrections sur auth

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/jelix-modules/auth/plugins/auth/auth.plugin.ini.php.dist

    r98 r155  
    5151 
    5252; param�es pour le driver db 
    53 [db] 
     53[Db] 
    5454dao = auth~jelixuser 
    5555 
  • trunk/lib/jelix/auth/jAuth.class.php

    r142 r155  
    164164    public static function logout(){ 
    165165        jEvent::notify ('AuthLogout', array('login'=>$_SESSION['JELIX_USER']->login)); 
    166         $_SESSION['JELIX_USER'] = new jUser(); 
     166        $_SESSION['JELIX_USER'] = new jAuthUser(); 
    167167    } 
    168168 
  • trunk/lib/jelix/auth/jAuthUser.class.php

    r152 r155  
    66* @author     Laurent Jouanneau 
    77* @contributor Loic Mathaud 
    8 * @copyright  2001-2005 CopixTeam, 2005-2006 Laurent Jouanneau 
     8* @copyright  2006 Laurent Jouanneau 
    99* @licence  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file 
    10 * 
    11 * Classe orginellement issue d'une branche experimentale du 
    12 * framework Copix 2.3dev. http://www.copix.org (jAuth) 
    13 * Une partie du code est sous Copyright 2001-2005 CopixTeam (licence LGPL) 
    14 * Auteur initial : Laurent Jouanneau 
    15 * Adapt�pour Jelix par Laurent Jouanneau 
    1610*/ 
    1711 
    1812// pas de m�ode pour cet objet, car le user peut ne pas etre 
    19 // une instance de jUser, tout d�nd du driver.. 
     13// une instance de jAuthUser, tout d�nd du driver.. 
    2014class jAuthUser { 
    2115    public $login = ''; 
  • trunk/lib/jelix/core/jCoordinator.class.php

    r152 r155  
    9393                    $conf=$name.'.plugin.ini.php'; 
    9494                if(file_exists(JELIX_APP_CONFIG_PATH.$conf)){ 
    95                    $conf = parse_ini_file(JELIX_APP_CONFIG_PATH.$conf); 
     95                   $conf = parse_ini_file(JELIX_APP_CONFIG_PATH.$conf,true); 
    9696                }else{ 
    9797                    $conf = array(); 
     
    160160 
    161161        $pluginparams = array(); 
    162         if(isset($ctrl->pluginsParam['*'])){ 
    163             $pluginparams = $ctrl->pluginsParam['*']; 
    164         } 
    165  
    166         if(isset($ctrl->pluginsParam[$this->action->method])){ 
    167             $pluginparams = array_merge($pluginparams, $ctrl->pluginsParam[$this->action->method]); 
     162        if(isset($ctrl->pluginParams['*'])){ 
     163            $pluginparams = $ctrl->pluginParams['*']; 
     164        } 
     165 
     166        if(isset($ctrl->pluginParams[$this->action->method])){ 
     167            $pluginparams = array_merge($pluginparams, $ctrl->pluginParams[$this->action->method]); 
    168168        } 
    169169 
  • trunk/lib/jelix/dao/jDAOGenerator.class.php

    r149 r155  
    319319               case 'count': 
    320320                  $src[] = '    $dbw = new jDbWidget ($this->_conn);'; 
    321                   $src[] = '    $res = $dbw->fetchFirst ($query, \''.$this->_compiler->getDAOId().'\');'; 
     321                  $src[] = '    $res = $dbw->fetchFirst ($query);'; 
    322322                  $src[] = '    return $res->c;'; 
    323323                  break; 
    324324               case 'selectfirst': 
    325325                  $src[] = '    $dbw = new jDbWidget ($this->_conn);'; 
    326                   $src[] = '    return $dbw->fetchFirst ($query, \''.$this->_compiler->getDAOId().'\');'; 
     326                  $src[] = '    return $dbw->fetchFirstInto ($query, \''.$this->_DAORecordClassName.'\');'; 
    327327                  break; 
    328328               case 'select': 
  • trunk/Makefile

    r146 r155  
    1010endif 
    1111 
     12ifndef JBT_VERSION 
     13JBT_VERSION = $(shell cat build/VERSION) 
     14endif 
     15 
     16SVN_REVISION = $(shell svn info | grep -E "Revision|R�sion" -m 1 | cut -d ":" -f 2 | cut -d " " -f 2) 
     17 
    1218ifeq ($(LIB_VERSION),SVN) 
    13 SVN_REVISION = $(shell svn info | grep -E "Revision|R�sion" -m 1 | cut -d ":" -f 2 | cut -d " " -f 2) 
    1419LIB_VERSION=SVN-$(SVN_REVISION) 
    1520endif 
    1621 
    1722ifeq ($(JTPL_VERSION),SVN) 
    18 SVN_REVISION = $(shell svn info | grep -E "Revision|R�sion" -m 1 | cut -d ":" -f 2  | cut -d " " -f 2) 
    1923JTPL_VERSION=SVN-$(SVN_REVISION) 
     24endif 
     25 
     26ifeq ($(JBT_VERSION),SVN) 
     27JBT_VERSION=SVN-$(SVN_REVISION) 
    2028endif 
    2129 
     
    3038DISTHACKER="$(DEV)" 
    3139DISTJTPL="$(DIST)/jtpl" 
     40DEVJTPL="$(DEV)" 
     41DISTJBT="$(DIST)/jbuildtools" 
    3242 
    3343default: 
     
    3646        @echo "   dev-all dev-jelix dev-jelix-lib dev-myapp dev-testapp" 
    3747        @echo "   jtpl jtpl-dist" 
     48        @echo "   jbt-dist" 
    3849        @echo "param�es facultatifs (valeurs actuelles) :" 
    3950        @echo "   DIST : repertoire cible pour les distributions (" $(DIST) ")" 
     
    4657        @echo "   distribution jtpl : " $(DISTJTPL) 
    4758 
    48 dist-all: dist-jelix dist-testapp dist-myapp jtpl-dist 
     59dist-all: dist-jelix dist-testapp dist-myapp jtpl-dist jbt-dist 
    4960 
    5061dev-all: dev-jelix dev-myapp dev-testapp jtpl 
    5162 
    52 dist-jelix: common 
    53         if [ ! -d "$(DISTJELIX)" ] ; then mkdir $(DISTJELIX) ; fi 
     63dist-jelix: common-dist 
    5464        export LIB_VERSION=$(LIB_VERSION) \ 
    5565        && $(PHP) build/mkdist.php build/manifests/jelix-lib.mn . $(DISTJELIX) \ 
     
    5868        tar czf $(DIST)/jelix-lib-$(LIB_VERSION).tar.gz  -C $(DISTJELIX) lib/ temp/ 
    5969 
    60 dist-testapp: common 
    61         if [ ! -d "$(DISTJELIX)" ] ; then mkdir $(DISTJELIX) ; fi 
     70dist-testapp: common-dist 
    6271        $(PHP) build/mkdist.php build/manifests/testapp.mn . $(DISTJELIX) 
    6372        tar czf $(DIST)/testapp-$(LIB_VERSION).tar.gz  -C $(DISTJELIX) testapp/ temp/testapp/ 
    6473 
    65 dist-myapp: common 
    66         if [ ! -d "$(DISTJELIX)" ] ; then mkdir $(DISTJELIX) ; fi 
     74dist-myapp: common-dist 
    6775        $(PHP) build/mkdist.php build/manifests/myapp.mn . $(DISTJELIX) 
    6876        tar czf $(DIST)/myapp-$(LIB_VERSION).tar.gz  -C $(DISTJELIX) myapp/ temp/myapp/ 
    6977 
    70 dev-jelix: common 
     78common-dist: 
     79        if [ ! -d "$(DIST)" ] ; then mkdir $(DIST) ; fi 
     80        if [ ! -d "$(DISTJELIX)" ] ; then mkdir $(DISTJELIX) ; fi 
     81 
     82dev-jelix:  
    7183        if [ ! -d "$(DISTHACKER)" ] ; then mkdir $(DISTHACKER) ; fi 
    7284        export LIB_VERSION=$(LIB_VERSION) \ 
     
    7587        && echo "$(LIB_VERSION)" > "$(DISTHACKER)/lib/jelix/VERSION" 
    7688 
    77 dev-jelix-lib: common 
     89dev-jelix-lib: 
    7890        if [ ! -d "$(DISTHACKER)" ] ; then mkdir $(DISTHACKER) ; fi 
    7991        export LIB_VERSION=$(LIB_VERSION) \ 
     
    8193        && echo "$(LIB_VERSION)" > "$(DISTHACKER)/lib/jelix/VERSION" 
    8294 
    83 dev-testapp: common 
     95dev-testapp:  
    8496        if [ ! -d "$(DISTHACKER)" ] ; then mkdir $(DISTHACKER) ; fi 
    8597        $(PHP) build/mkdist.php build/manifests/testapp.mn . $(DISTHACKER) 
    8698 
    87 dev-myapp: common 
     99dev-myapp:  
    88100        if [ ! -d "$(DISTHACKER)" ] ; then mkdir $(DISTHACKER) ; fi 
    89101        $(PHP) build/mkdist.php build/manifests/myapp.mn . $(DISTHACKER) 
    90102         
    91 jtpl: common  
     103jtpl: 
     104        if [ ! -d "$(DEVJTPL)" ] ; then mkdir $(DEVJTPL) ; fi 
     105        export JTPL_STANDALONE=1 \ 
     106        && $(PHP) build/mkdist.php build/manifests/jtpl-standalone.mn . $(DEVJTPL) \ 
     107        && echo "$(JTPL_VERSION)" > "$(DEVJTPL)/VERSION" 
     108 
     109jtpl-dist: 
    92110        if [ ! -d "$(DISTJTPL)" ] ; then mkdir $(DISTJTPL) ; fi 
    93111        export JTPL_STANDALONE=1 \ 
    94112        && $(PHP) build/mkdist.php build/manifests/jtpl-standalone.mn . $(DISTJTPL) \ 
    95113        && echo "$(JTPL_VERSION)" > "$(DISTJTPL)/VERSION" 
    96         if [ ! -d "$(DISTJTPL)/temp" ] ; then mkdir $(DISTJTPL)/temp ; fi 
    97         if [ ! -d "$(DISTJTPL)/templates" ] ; then mkdir $(DISTJTPL)/templates ; fi 
    98  
    99 jtpl-dist: jtpl 
    100114        tar czf $(DIST)/jtpl-$(JTPL_VERSION).tar.gz  -C $(DIST) jtpl/ 
    101115 
     116jbt-dist: 
     117        if [ ! -d "$(DISTJBT)" ] ; then mkdir $(DISTJBT) ; fi 
     118        $(PHP) build/mkdist.php build/manifests/jbuildtools.mn build/ $(DISTJBT) \ 
     119        && echo "$(JBT_VERSION)" > "$(DISTJBT)/VERSION" 
     120        tar czf $(DIST)/jbuildtools-$(JBT_VERSION).tar.gz  -C $(DIST) jbuildtools/ 
    102121 
    103 common: 
    104         if [ ! -d "$(DIST)" ] ; then mkdir $(DIST) ; fi 
    105122 
Download in other formats: Unified Diff Zip Archive