Changeset 559

Show
Ignore:
Timestamp:
04/13/08 14:20:32 (5 months ago)
Author:
bermiferrer
Message:

Fixing compiled template path bug, when running Apache as a different user and we use FTP for writing temporary files.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/AkActionView/AkPhpTemplateHandler.php

    r549 r559  
    158158    function _saveCompiledTemplate() 
    159159    { 
    160         Ak::file_put_contents($this->_getCompiledTemplatePath(),$this->_options['code'], array('base_path' => (AK_COMPILED_VIEWS_DIR ? AK_TMP_DIR : AK_BASE_DIR))); 
     160        $options = array('base_path' => (AK_COMPILED_VIEWS_DIR ? AK_TMP_DIR : AK_BASE_DIR)); 
     161        if(defined('AK_UPLOAD_FILES_USING_FTP') && AK_UPLOAD_FILES_USING_FTP && !strstr($options['base_path'], AK_BASE_DIR)){ 
     162            $options['ftp'] = false; 
     163        } 
     164        Ak::file_put_contents($this->_getCompiledTemplatePath(), $this->_options['code'], $options); 
    161165    } 
    162166}