[Git][noosfero/noosfero][master] 2 commits: Adds url prefix to files link
Marcos Ronaldo Pereira Junior
gitlab at mg.gitlab.com
Fri May 20 17:13:56 BRT 2016
Marcos Ronaldo Pereira Junior pushed to branch master at Noosfero / noosfero
Commits:
2eabab9c by Gabriel Silva at 2016-05-20T16:21:24+00:00
Adds url prefix to files link
Signed-off-by: Gabriel Silva <gabriel93.silva at gmail.com>
Signed-off-by: Tallys Martins <tallysmartins at gmail.com>
- - - - -
44b7e940 by Marcos Ronaldo Pereira Junior at 2016-05-20T20:13:46+00:00
Merge branch 'uploaded_files_link' into 'master'
Adds url prefix to files link
ContetViewerController wasn't generating the full URL to uploaded files (omitting the prefix, if it exists)
See merge request !932
- - - - -
1 changed file:
- app/controllers/public/content_viewer_controller.rb
Changes:
=====================================
app/controllers/public/content_viewer_controller.rb
=====================================
--- a/app/controllers/public/content_viewer_controller.rb
+++ b/app/controllers/public/content_viewer_controller.rb
@@ -209,7 +209,7 @@ class ContentViewerController < ApplicationController
end
if @page.published && @page.uploaded_file?
- redirect_to @page.public_filename
+ redirect_to "#{Noosfero.root}#{@page.public_filename}"
else
send_data data, @page.download_headers
end
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/1ae8dae3d7310a49d0663cab6aa59f9d95a4a55e...44b7e940d895f5737e4a55a6b635570d5a4e6c19
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160520/3c6f3e2d/attachment.html>
More information about the Noosfero-dev
mailing list