projects
/
fusionforge
/
fusionforge.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
project home
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f75bbeb
)
Fix broken link in docman when filename is changed
author
Alain Peyrat
<aljeux@free.fr>
Sun, 18 Mar 2012 16:22:29 +0000
(16:22 +0000)
committer
Alain Peyrat
<aljeux@free.fr>
Sun, 18 Mar 2012 16:22:29 +0000
(16:22 +0000)
src/www/docman/view.php
patch
|
blob
|
history
diff --git
a/src/www/docman/view.php
b/src/www/docman/view.php
index 3054915151bfbac093a222c44a260ddbfd39e55e..7e090eb6a3fe3e5befc5f2bb8c90d36f0e12e4ac 100644
(file)
--- a/
src/www/docman/view.php
+++ b/
src/www/docman/view.php
@@
-77,12
+77,9
@@
if ($docid != 'backup' && $docid != 'webdav' && $docid != 'zip') {
* theses links may redirect to the same document with another
* name, this way a search engine may loop and stress the
* server.
* theses links may redirect to the same document with another
* name, this way a search engine may loop and stress the
* server.
- *
- * A workaround is to serve only the document if the given
- * name is correct.
*/
if ($d->getFileName() != $docname) {
*/
if ($d->getFileName() != $docname) {
-
exit_error(_('No document to display - invalid or inactive document number'), 'docman'
);
+
session_redirect('/docman/view.php/'.$group_id.'/'.$docid.'/'.urlencode($d->getFileName())
);
}
header('Content-disposition: attachment; filename="'.str_replace('"', '', $d->getFileName()) . '"');
}
header('Content-disposition: attachment; filename="'.str_replace('"', '', $d->getFileName()) . '"');