0.50 Final touches
This commit is contained in:
		@@ -4,7 +4,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# name: discourse-legacy_links
 | 
					# name: discourse-legacy_links
 | 
				
			||||||
# about: A plugin to handle legacy Gossamer Forums URLs
 | 
					# about: A plugin to handle legacy Gossamer Forums URLs
 | 
				
			||||||
# version: 0.49
 | 
					# version: 0.50
 | 
				
			||||||
# authors: saint@federated.computer
 | 
					# authors: saint@federated.computer
 | 
				
			||||||
# url: https://gitea.federated.computer/saint/discourse-legacy_links.git
 | 
					# url: https://gitea.federated.computer/saint/discourse-legacy_links.git
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -64,7 +64,7 @@ after_initialize do
 | 
				
			|||||||
#                request.path.match(%r{/forum/.*?_P(\d+)/?})&.                # Matches URLs like /forum/..._P6751045/
 | 
					#                request.path.match(%r{/forum/.*?_P(\d+)/?})&.                # Matches URLs like /forum/..._P6751045/
 | 
				
			||||||
      post_id = params[:post_id].presence ||
 | 
					      post_id = params[:post_id].presence ||
 | 
				
			||||||
                request.path.match(%r{/P(\d+)(?:/|$)})&.  ||                 # Matches URLs like /P40796/ or /P40796 (no trailing slash)
 | 
					                request.path.match(%r{/P(\d+)(?:/|$)})&.  ||                 # Matches URLs like /P40796/ or /P40796 (no trailing slash)
 | 
				
			||||||
                request.path.match(%r{/forum/  ||                            # Matches URLs like /forum/.../P6751045/ or /forum/.../P6751045
 | 
					                request.path.match(%r{/forum/.*_P(\d+)(?:/|$)})&.  ||        # Matches URLs like /forum/.../P6751045/ or /forum/.../P6751045
 | 
				
			||||||
                request.query_string.match(/post=(\d+)/)&.  ||               # Matches URLs with ?post= in query string
 | 
					                request.query_string.match(/post=(\d+)/)&.  ||               # Matches URLs with ?post= in query string
 | 
				
			||||||
                request.query_string.match(/parent_post_id=(\d+)/)&.         # Matches URLs with ?parent_post_id= in query string
 | 
					                request.query_string.match(/parent_post_id=(\d+)/)&.         # Matches URLs with ?parent_post_id= in query string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user