2003-05-08 20:21:16 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								< ? php 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/** 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  Smarty  plugin 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ package  Smarty 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ subpackage  plugins 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/** 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  write  the  compiled  template 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  string  $compile_path 
							 
						 
					
						
							
								
									
										
										
										
											2003-06-17 14:11:57 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  string  $file_compiled 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  integer  $file_timestamp 
							 
						 
					
						
							
								
									
										
										
										
											2003-05-08 20:21:16 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ return  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 */     
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								function  smarty_core_write_compiled_template ( $params ,  & $this ) 
							 
						 
					
						
							
								
									
										
										
										
											2003-06-17 14:11:57 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								{ 	
							 
						 
					
						
							
								
									
										
										
										
											2003-05-30 19:27:23 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									if ( !@ is_writable ( $this -> compile_dir ))  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										// compile_dir not writable, see if it exists
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										if ( !@ is_dir ( $this -> compile_dir ))  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											$this -> trigger_error ( 'the $compile_dir \''  .  $this -> compile_dir  .  '\' does not exist, or is not a directory.' ,  E_USER_ERROR ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											return  false ; 			
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										$this -> trigger_error ( 'unable to write to $compile_dir \''  .  realpath ( $this -> compile_dir )  .  '\'. Be sure $compile_dir is writable by the web server user.' ,  E_USER_ERROR ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2003-06-17 14:11:57 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									$_params  =  array ( 'filename'  =>  $params [ 'compile_path' ],  'contents'  =>  $params [ 'file_compiled' ],  'create_dirs'  =>  true ); 
							 
						 
					
						
							
								
									
										
										
										
											2003-06-16 15:18:38 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									require_once ( SMARTY_DIR  .  'core/core.write_file.php' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									smarty_core_write_file ( $_params ,  $this ); 	
							 
						 
					
						
							
								
									
										
										
										
											2003-06-17 14:11:57 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    touch ( $params [ 'compile_path' ],  $params [ 'file_timestamp' ]); 
							 
						 
					
						
							
								
									
										
										
										
											2003-05-08 20:21:16 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    return  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/* vim: set expandtab: */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								?>