0.39 Tweaks to see if we can get this stable.
This commit is contained in:
		
							
								
								
									
										16
									
								
								plugin.rb
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								plugin.rb
									
									
									
									
									
								
							@@ -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.38
 | 
					# version: 0.39
 | 
				
			||||||
# 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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -21,11 +21,19 @@ after_initialize do
 | 
				
			|||||||
    class Engine < ::Rails::Engine
 | 
					    class Engine < ::Rails::Engine
 | 
				
			||||||
      engine_name "discourse_legacy_links"
 | 
					      engine_name "discourse_legacy_links"
 | 
				
			||||||
      isolate_namespace DiscourseLegacyLinks
 | 
					      isolate_namespace DiscourseLegacyLinks
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					      # Define the routes for this engine
 | 
				
			||||||
 | 
					      initializer "discourse_legacy_links.routes" do 
 | 
				
			||||||
 | 
					        DiscourseLegacyLinks::Engine.routes.draw do
 | 
				
			||||||
 | 
					          get "/forum2" => "legacy_links#index2"
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Define the custom controller, inheriting from Discourse's CustomPostController
 | 
					    # Define the custom controller, inheriting from Discourse's CustomPostController
 | 
				
			||||||
    # This gives us access to post-related functionality and user authentication
 | 
					    # This gives us access to post-related functionality and user authentication
 | 
				
			||||||
#    class DiscourseLegacyLinks::CustomPostController < ::ApplicationController
 | 
					#    class DiscourseLegacyLinks::CustomPostController < ::ApplicationController
 | 
				
			||||||
 | 
					#    class LegacyLinksController::CustomPostController < ::ApplicationController
 | 
				
			||||||
    class LegacyLinksController < ::ApplicationController::CustomPostController
 | 
					    class LegacyLinksController < ::ApplicationController::CustomPostController
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#      layout false
 | 
					#      layout false
 | 
				
			||||||
@@ -33,7 +41,7 @@ after_initialize do
 | 
				
			|||||||
      # Skip certain before_actions for our index method.
 | 
					      # Skip certain before_actions for our index method.
 | 
				
			||||||
      # This allows the route to be accessed directly via a browser
 | 
					      # This allows the route to be accessed directly via a browser
 | 
				
			||||||
      skip_before_action :check_xhr, only: [:index2]
 | 
					      skip_before_action :check_xhr, only: [:index2]
 | 
				
			||||||
      skip_before_action :verify_authenticity_token, only: [:index2]
 | 
					##      skip_before_action :verify_authenticity_token, only: [:index2]
 | 
				
			||||||
#      skip_before_action :verify_authenticity_token
 | 
					#      skip_before_action :verify_authenticity_token
 | 
				
			||||||
#      skip_before_action :ensure_logged_in
 | 
					#      skip_before_action :ensure_logged_in
 | 
				
			||||||
#      skip_before_action :redirect_to_login_if_required
 | 
					#      skip_before_action :redirect_to_login_if_required
 | 
				
			||||||
@@ -162,10 +170,6 @@ after_initialize do
 | 
				
			|||||||
#    get '/forum/*path' => 'discourse_legacy_links/custom_post#index'
 | 
					#    get '/forum/*path' => 'discourse_legacy_links/custom_post#index'
 | 
				
			||||||
#    get '/forum' => 'discourse_legacy_links/custom_post#index'
 | 
					#    get '/forum' => 'discourse_legacy_links/custom_post#index'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  DiscourseLegacyLinks::Engine.routes.draw do
 | 
					 | 
				
			||||||
    get "/forum2" => "legacy_links#index2"
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  Discourse::Application.routes.append do
 | 
					  Discourse::Application.routes.append do
 | 
				
			||||||
    mount ::DiscourseLegacyLinks::Engine, at: "/"
 | 
					    mount ::DiscourseLegacyLinks::Engine, at: "/"
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user