Changeset 37

Show
Ignore:
Timestamp:
12/17/06 09:56:15 (2 years ago)
Author:
bermiferrer
Message:

Merging small changes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/views/layouts/compiled/page.tpl.php

    r2 r37  
    133133    <div id="page"> 
    134134      <div id="content"> 
    135       <?= $text_helper->flash();?> 
     135      <?php echo $text_helper->flash();?> 
    136136      <?php echo $content_for_layout; ?> 
    137137       
  • trunk/app/views/layouts/page.tpl

    r2 r37  
    133133    <div id="page"> 
    134134      <div id="content"> 
    135       <?= $text_helper->flash();?> 
     135      <?php echo $text_helper->flash();?> 
    136136      <?php echo $content_for_layout; ?> 
    137137       
  • trunk/lib/AkActionView/TemplateEngines/AkSintags.php

    r2 r37  
    243243    function _tokenizeTemplate() 
    244244    { 
    245         $this->_code = str_replace(array('{_','{?','?}','{loop ','{end}'),array('{AKTRANSVAR__','{AKNOTEMPTY__','__AKPRINTIFISSET}','{AKPERFLOOP__','<?php } ?>'), $this->_code); 
     245        $this->_code = str_replace( 
     246        array('{_','{?','?}','{loop ','{end}','<?xml','<?=','<? ',"<?\n","<?\t"), 
     247        array('{AKTRANSVAR__','{AKNOTEMPTY__','__AKPRINTIFISSET}','{AKPERFLOOP__','<?php } ?>','AKXMLOPENTAG','AKPHPOPENSHORTTAGECHO','AKPHPOPENSHORTTAG','AKPHPOPENSHORTTAG','AKPHPOPENSHORTTAG'),  
     248        $this->_code); 
    246249        if(preg_match_all('/{[A-Za-z0-9_]+((\.|-){1}[A-Za-z0-9_]+){0,}}/i',$this->_code,$match)){ 
    247250            $this->_tokens = $match[0]; 
     
    254257    function _untokenizeTemplate() 
    255258    { 
    256         $this->_code = str_replace(array('{AKTRANSVAR__','{AKNOTEMPTY__','__AKPRINTIFISSET}','{AKPERFLOOP__'),array('{_','{?','?}','{loop '), $this->_code); 
     259        $this->_code = str_replace( 
     260        array('{AKTRANSVAR__','{AKNOTEMPTY__','__AKPRINTIFISSET}','{AKPERFLOOP__', 
     261        'AKXMLOPENTAG','AKPHPOPENSHORTTAGECHO','AKPHPOPENSHORTTAG'), 
     262        array('{_','{?','?}','{loop ', 
     263        '<?php echo \'<?xml\'; ?>','<?php echo ','<?php '), $this->_code); 
    257264    } 
    258265 
  • trunk/lib/AkActiveRecord/AkActsAsTree.php

    r2 r37  
    158158    function getScopeCondition() 
    159159    { 
    160         if(empty($this->_scope_condition)){ 
    161             $this->setScopeCondition((substr($this->_ActiveRecordInstance->_db->databaseType,0,4) == 'post') ? 'true' : '1'); 
     160        // An allways true condition in case no scope has been specified 
     161        if(empty($this->_scope_condition) && empty($this->scope)){ 
     162            $this->_scope_condition = (substr($this->_ActiveRecordInstance->_db->databaseType,0,4) == 'post') ? 'true' : '1'; 
     163        }elseif (!empty($this->scope)){ 
     164            $scoped = array(); 
     165            foreach ((array)$this->scope as $column){ 
     166                if($this->_ActiveRecordInstance->hasColumn($column)){ 
     167                    $scoped[] =  $column.' = '.$this->_ActiveRecordInstance->castAttributeForDatabase($column, $this->_ActiveRecordInstance->get($column)); 
     168                }else{ 
     169                    $scoped[] = $column; 
     170                } 
     171            } 
     172            $this->setScopeCondition(join(' AND ',$scoped)); 
    162173        } 
    163174        return  $this->_scope_condition; 
  • trunk/script/console

    r2 r37  
    4141if ($id_dir = opendir(AK_MODELS_DIR.DS)){ 
    4242    while (false !== ($file = readdir($id_dir))){ 
    43         if ($file != "." && $file != ".." && $file != '.svn' && $file[0] != '_'){ 
     43        if ($file != "." && $file != ".." && $file != '.svn' && $file[0] != '_' && substr($file,-12,8) != '_service'){ 
    4444            if(!is_dir(AK_MODELS_DIR.DS.$file)){ 
    4545                include_once(AK_MODELS_DIR.DS.$file); 
  • trunk/script/generators/service/service_generator.php

    r30 r37  
    9191                    $this->api_method_doc[$ApiMethod->name] .= "\n\t*  ".( 
    9292                        $expects_or_returns == 'expects' ?  
    93                         '@param param'.($k+1) : '@returns
     93                        '@param param'.($k+1) : '@return
    9494                        )." $type"; 
    9595                    if(!empty($ApiMethod->{$expects_or_returns.'_documentation'}[$k])){ 
  • trunk/test/unit/lib/AkActionWebService/AkActionWebServiceApi.php

    r30 r37  
    6767    { 
    6868        $TodoApi =& new TodoApi(); 
     69        ob_start(); 
    6970        require_once(AK_SCRIPT_DIR.DS.'generators'.DS.'AkelosGenerator.php'); 
    7071        $Generator = new AkelosGenerator(); 
    7172        $Generator->runCommand('service Todo'); 
     73        ob_end_clean(); 
    7274        require_once(AK_MODELS_DIR.DS.'todo_service.php'); 
    7375        $TodoService =& new TodoService();