Changeset 37
- Timestamp:
- 12/17/06 09:56:15 (2 years ago)
- Files:
-
- trunk/app/views/layouts/compiled/page.tpl.php (modified) (1 diff)
- trunk/app/views/layouts/page.tpl (modified) (1 diff)
- trunk/lib/AkActionView/TemplateEngines/AkSintags.php (modified) (2 diffs)
- trunk/lib/AkActionWebService/AkXmlRpcClient.php (deleted)
- trunk/lib/AkActiveRecord/AkActsAsTree.php (modified) (1 diff)
- trunk/script/console (modified) (1 diff)
- trunk/script/generators/service/service_generator.php (modified) (1 diff)
- trunk/test/unit/lib/AkActionWebService/AkActionWebServiceApi.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app/views/layouts/compiled/page.tpl.php
r2 r37 133 133 <div id="page"> 134 134 <div id="content"> 135 <? =$text_helper->flash();?>135 <?php echo $text_helper->flash();?> 136 136 <?php echo $content_for_layout; ?> 137 137 trunk/app/views/layouts/page.tpl
r2 r37 133 133 <div id="page"> 134 134 <div id="content"> 135 <? =$text_helper->flash();?>135 <?php echo $text_helper->flash();?> 136 136 <?php echo $content_for_layout; ?> 137 137 trunk/lib/AkActionView/TemplateEngines/AkSintags.php
r2 r37 243 243 function _tokenizeTemplate() 244 244 { 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); 246 249 if(preg_match_all('/{[A-Za-z0-9_]+((\.|-){1}[A-Za-z0-9_]+){0,}}/i',$this->_code,$match)){ 247 250 $this->_tokens = $match[0]; … … 254 257 function _untokenizeTemplate() 255 258 { 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); 257 264 } 258 265 trunk/lib/AkActiveRecord/AkActsAsTree.php
r2 r37 158 158 function getScopeCondition() 159 159 { 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)); 162 173 } 163 174 return $this->_scope_condition; trunk/script/console
r2 r37 41 41 if ($id_dir = opendir(AK_MODELS_DIR.DS)){ 42 42 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'){ 44 44 if(!is_dir(AK_MODELS_DIR.DS.$file)){ 45 45 include_once(AK_MODELS_DIR.DS.$file); trunk/script/generators/service/service_generator.php
r30 r37 91 91 $this->api_method_doc[$ApiMethod->name] .= "\n\t* ".( 92 92 $expects_or_returns == 'expects' ? 93 '@param param'.($k+1) : '@return s'93 '@param param'.($k+1) : '@return ' 94 94 )." $type"; 95 95 if(!empty($ApiMethod->{$expects_or_returns.'_documentation'}[$k])){ trunk/test/unit/lib/AkActionWebService/AkActionWebServiceApi.php
r30 r37 67 67 { 68 68 $TodoApi =& new TodoApi(); 69 ob_start(); 69 70 require_once(AK_SCRIPT_DIR.DS.'generators'.DS.'AkelosGenerator.php'); 70 71 $Generator = new AkelosGenerator(); 71 72 $Generator->runCommand('service Todo'); 73 ob_end_clean(); 72 74 require_once(AK_MODELS_DIR.DS.'todo_service.php'); 73 75 $TodoService =& new TodoService();
