2003-05-08 20:21:16 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								< ? php  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/**  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  Smarty  plugin 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  @ package  Smarty 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  @ subpackage  plugins 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/**  
						 
					
						
							
								
									
										
										
										
											2003-06-20 20:01:10 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								 *  write  the  compiled  resource 
							 
						 
					
						
							
								
									
										
										
										
											2003-05-08 20:21:16 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  @ param  string  $compile_path 
							 
						 
					
						
							
								
									
										
										
										
											2003-06-20 20:01:10 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								 *  @ param  string  $compiled_content 
							 
						 
					
						
							
								
									
										
										
										
											2003-05-08 20:21:16 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								 *  @ return  true 
							 
						 
					
						
							
								
									
										
										
										
											2003-10-11 08:55:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								 */ 
							 
						 
					
						
							
								
									
										
										
										
											2003-06-22 03:13:25 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								function  smarty_core_write_compiled_resource ( $params ,  & $smarty )  
						 
					
						
							
								
									
										
										
										
											2003-10-11 08:55:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if ( !@ is_writable ( $smarty -> compile_dir ))  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // compile_dir not writable, see if it exists
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if ( !@ is_dir ( $smarty -> compile_dir ))  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $smarty -> trigger_error ( 'the $compile_dir \''  .  $smarty -> compile_dir  .  '\' does not exist, or is not a directory.' ,  E_USER_ERROR ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $smarty -> trigger_error ( 'unable to write to $compile_dir \''  .  realpath ( $smarty -> compile_dir )  .  '\'. Be sure $compile_dir is writable by the web server user.' ,  E_USER_ERROR ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2004-07-12 15:05:30 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $_params  =  array ( 'filename'  =>  $params [ 'compile_path' ],  'contents'  =>  $params [ 'compiled_content' ],  'create_dirs'  =>  true ); 
							 
						 
					
						
							
								
									
										
										
										
											2004-09-16 23:07:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    require_once ( SMARTY_CORE_DIR  .  'core.write_file.php' ); 
							 
						 
					
						
							
								
									
										
										
										
											2003-10-11 08:55:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    smarty_core_write_file ( $_params ,  $smarty ); 
							 
						 
					
						
							
								
									
										
										
										
											2003-05-08 20:21:16 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    return  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* vim: set expandtab: */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								?>