| 
														
															@@ -588,9 +588,18 @@ class Photo extends Module { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			return false; 
														 | 
														
														 | 
														
															 			return false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		} 
														 | 
														
														 | 
														
															 		} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		# Illicit chars 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		$badChars =	array_merge( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+						array_map('chr', range(0,31)), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+						array("<", ">", ":", '"', "/", "\\", "|", "?", "*") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+					); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		# Parse title 
														 | 
														
														 | 
														
															 		# Parse title 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		if ($photo->title=='') $photo->title = 'Untitled'; 
														 | 
														
														 | 
														
															 		if ($photo->title=='') $photo->title = 'Untitled'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		# Escape title 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		$zipTitle = str_replace($badChars, '', $zipTitle); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		# Set headers 
														 | 
														
														 | 
														
															 		# Set headers 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		header("Content-Type: application/octet-stream"); 
														 | 
														
														 | 
														
															 		header("Content-Type: application/octet-stream"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		header("Content-Disposition: attachment; filename=\"" . $photo->title . $extension . "\""); 
														 | 
														
														 | 
														
															 		header("Content-Disposition: attachment; filename=\"" . $photo->title . $extension . "\""); 
														 |