Put back removed constants with deprecations for plugin compatibility

This commit is contained in:
Robin Ward 2017-12-21 17:17:25 -05:00
parent e667434bb3
commit d0b44520bd
1 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,10 @@ require_dependency "staff_constraint"
require_dependency "homepage_constraint"
require_dependency "permalink_constraint"
# The following constants have been replaced with `RouteFormat` and are deprecated.
USERNAME_ROUTE_FORMAT = /[\w.\-]+?/ unless defined? USERNAME_ROUTE_FORMAT
BACKUP_ROUTE_FORMAT = /.+\.(sql\.gz|tar\.gz|tgz)/i unless defined? BACKUP_ROUTE_FORMAT
Discourse::Application.routes.draw do
match "/404", to: "exceptions#not_found", via: [:get, :post]