make sure aliases.csv is downloaded, and not opened in browser
SEE: http://stackoverflow.com/questions/6468517
This commit is contained in:
		
							parent
							
								
									b81d457bf7
								
							
						
					
					
						commit
						6289402f2e
					
				| @ -84,7 +84,8 @@ class AliasEditor extends Extension { | |||||||
| 			} | 			} | ||||||
| 			else if($event->get_arg(0) == "export") { | 			else if($event->get_arg(0) == "export") { | ||||||
| 				$page->set_mode("data"); | 				$page->set_mode("data"); | ||||||
| 				$page->set_type("text/plain"); | 				$page->set_type("text/csv"); | ||||||
|  | 				$page->set_filename("aliases.csv"); | ||||||
| 				$page->set_data($this->get_alias_csv($database)); | 				$page->set_data($this->get_alias_csv($database)); | ||||||
| 			} | 			} | ||||||
| 			else if($event->get_arg(0) == "import") { | 			else if($event->get_arg(0) == "import") { | ||||||
|  | |||||||
| @ -55,7 +55,7 @@ class AliasEditorTheme extends Themelet { | |||||||
| 				<tbody>$h_aliases</tbody> | 				<tbody>$h_aliases</tbody> | ||||||
| 				<tfoot>$h_add</tfoot> | 				<tfoot>$h_add</tfoot> | ||||||
| 			</table> | 			</table> | ||||||
| 			<p><a href='".make_link("alias/export/aliases.csv")."'>Download as CSV</a></p> | 			<p><a href='".make_link("alias/export/aliases.csv")."' download='aliases.csv'>Download as CSV</a></p> | ||||||
| 		";
 | 		";
 | ||||||
| 
 | 
 | ||||||
| 		$bulk_html = " | 		$bulk_html = " | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user