Ignore:
Timestamp:
08/15/10 18:45:12 (22 months ago)
Author:
vain
Message:
  • several changes to copyright, router, bootstrap, frontcontroller and various other files
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/viewhelper/smarty/resource.make_template.php

    r4359 r4578  
    11<?php 
     2 
    23function smarty_make_template($resource_type, $resource_name, &$template_source, &$template_timestamp, $smarty_obj) 
    34{ 
    4     if( $resource_type == 'file' ) { 
    5         if ( ! is_readable ( $resource_name )) { 
    6             // create the template file, return contents. 
     5    if($resource_type == 'file') 
     6    { 
     7        if(false === is_readable($resource_name)) 
     8        { 
     9            # create the template file, return contents. 
    710            $template_source = "This is a new template."; 
    8             if( !function_exists('smarty_core_write_file') ) { include SMARTY_CORE_DIR . 'core.write_file.php' ); } 
    9             smarty_core_write_file( array( 'filename'=>$smarty_obj->template_dir . DIRECTORY_SEPARATOR . $resource_name, 'contents'=>$template_source ), $smarty_obj ); 
     11 
     12            if(false === function_exists('smarty_core_write_file')) 
     13            { 
     14                include SMARTY_CORE_DIR . 'core.write_file.php'; 
     15            } 
     16 
     17            smarty_core_write_file(array('filename' => $smarty_obj->template_dir . DIRECTORY_SEPARATOR . $resource_name, 
     18                                         'contents' => $template_source), $smarty_obj); 
    1019            return true; 
    1120        } 
    12     } else { 
    13         // not a file 
     21    } 
     22    else # not a file 
     23    { 
    1424        return false; 
    1525    } 
Note: See TracChangeset for help on using the changeset viewer.