From e721caa792be12bfae1328b8b047b704d79dc754 Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Mon, 28 Apr 2014 14:27:32 +0200 Subject: [PATCH] DMSF URL links backward compatibility --- config/routes.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index c099a4a4..869ae89c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,8 +1,8 @@ # Redmine plugin for Document Management System "Features" # -# Copyright (C) 2011 Vít Jonáš -# Copyright (C) 2012 Daniel Munn -# Copyright (C) 2013 Karel Pičman +# Copyright (C) 2011 Vít Jonáš +# Copyright (C) 2012 Daniel Munn +# Copyright (C) 2011-14 Karel Pičman # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -72,8 +72,11 @@ RedmineApp::Application.routes.draw do get '/dmsf/files/:id/revision/delete', :controller => 'dmsf_files', :action => 'delete_revision', :as => 'delete_revision' get '/dmsf/files/:id/download', :controller => 'dmsf_files', :action => 'show', :download => '' # Otherwise will not route nil download param get '/dmsf/files/:id/download/:download', :controller => 'dmsf_files', :action => 'show' - get '/dmsf/files/:id', :controller => 'dmsf_files', :action => 'show', :as => 'dmsf_file' + get '/dmsf/files/:id', :controller => 'dmsf_files', :action => 'show', :as => 'dmsf_file' delete '/dmsf/files/:id', :controller => 'dmsf_files', :action => 'delete' + + # Just to keep backward compatibility with old external direct links + get '/dmsf_files/:id', :controller => 'dmsf_files', :action => 'show' # # files_copy controller