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 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  integer  $resource_timestamp 
							 
						 
					
						
							
								
									
										
										
										
											2003-05-08 20:21:16 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ return  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 */     
							 
						 
					
						
							
								
									
										
										
										
											2003-06-22 03:13:25 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								function  smarty_core_write_compiled_resource ( $params ,  & $smarty ) 
							 
						 
					
						
							
								
									
										
										
										
											2003-06-17 14:11:57 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								{ 	
							 
						 
					
						
							
								
									
										
										
										
											2003-06-22 03:13:25 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									if ( !@ is_writable ( $smarty -> compile_dir ))  { 
							 
						 
					
						
							
								
									
										
										
										
											2003-05-30 19:27:23 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										// compile_dir not writable, see if it exists
 
							 
						 
					
						
							
								
									
										
										
										
											2003-06-22 03:13:25 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										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 ); 
							 
						 
					
						
							
								
									
										
										
										
											2003-05-30 19:27:23 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											return  false ; 			
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2003-06-22 03:13:25 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										$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 ); 
							 
						 
					
						
							
								
									
										
										
										
											2003-05-30 19:27:23 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										return  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2003-06-20 20:01:10 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} 	
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									$_params  =  array ( 'filename'  =>  $params [ 'compile_path' ],  'contents'  =>  $params [ 'compiled_content' ],  'create_dirs'  =>  true ); 
							 
						 
					
						
							
								
									
										
										
										
											2003-06-21 17:35:15 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									require_once ( SMARTY_DIR  .  'core'  .  DIRECTORY_SEPARATOR  .  'core.write_file.php' ); 
							 
						 
					
						
							
								
									
										
										
										
											2003-06-22 03:13:25 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									smarty_core_write_file ( $_params ,  $smarty ); 	
							 
						 
					
						
							
								
									
										
										
										
											2003-06-20 20:01:10 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    touch ( $params [ 'compile_path' ],  $params [ 'resource_timestamp' ]); 
							 
						 
					
						
							
								
									
										
										
										
											2003-05-08 20:21:16 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    return  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/* vim: set expandtab: */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								?>