Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
d14441f7
Commit
d14441f7
authored
Apr 24, 2009
by
Nigel McNie
Browse files
Use text_to_path instead of custom preg_replace hax.
parent
e3298fc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/export/html/lib.php
View file @
d14441f7
...
...
@@ -53,8 +53,7 @@ class PluginExportHtml extends PluginExport {
*/
public
function
__construct
(
User
$user
,
$views
,
$artefacts
)
{
parent
::
__construct
(
$user
,
$views
,
$artefacts
);
// TODO move this normalisation into a method
$this
->
rootdir
=
'portfolio-for-'
.
preg_replace
(
'#[^a-zA-Z0-9_-]+#'
,
'-'
,
$user
->
get
(
'username'
));
$this
->
rootdir
=
'portfolio-for-'
.
self
::
text_to_path
(
$user
->
get
(
'username'
));
// Create basic required directories
foreach
(
array
(
'files'
,
'views'
,
'static'
,
'static/smilies'
)
as
$directory
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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