Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
ae055438
Commit
ae055438
authored
Oct 08, 2019
by
Robert Lyon
Committed by
Gerrit Code Review
Oct 08, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Bug 1840733: fix zip filename corrupted on download"
parents
c541934b
a2c14d3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
htdocs/artefact/file/downloadfolder.php
htdocs/artefact/file/downloadfolder.php
+1
-1
No files found.
htdocs/artefact/file/downloadfolder.php
View file @
ae055438
...
...
@@ -53,7 +53,7 @@ function can_download_artefact($artefact) {
function
zip_filename_from
(
$name
)
{
$name
=
preg_replace
(
'#\s+#'
,
'_'
,
strtolower
(
$name
));
// \pL is used to match any letter in any alphabet (http://php.net/manual/en/regexp.reference.unicode.php)
$name
=
preg_replace
(
'#[^\pL0-9_\-]+#'
,
''
,
$name
);
$name
=
extension_loaded
(
'mbstring'
)
?
mb_eregi_replace
(
'#[^\pL0-9_\-]+#'
,
''
,
$name
)
:
preg_replace
(
'#[^\pL0-9_\-]+#'
,
''
,
$name
);
if
(
$name
!=
''
)
{
$name
=
'-'
.
$name
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment