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
d8ec36bb
Commit
d8ec36bb
authored
May 21, 2009
by
Nigel McNie
Browse files
Copy out and rewrite URLs to theme images.
parent
d205d91e
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/export/html/lib.php
View file @
d8ec36bb
...
...
@@ -515,6 +515,13 @@ class HtmlExportOutputFilter {
$html
);
// Images out of the theme directory
$html
=
preg_replace_callback
(
'#('
.
preg_quote
(
get_config
(
'wwwroot'
))
.
')?/?theme/'
.
get_config
(
'theme'
)
.
'/static/images/([a-z0-9_.-]+)#'
,
array
(
$this
,
'replace_theme_image_link'
),
$html
);
return
$html
;
}
...
...
@@ -624,6 +631,18 @@ class HtmlExportOutputFilter {
return
''
;
}
/**
* Callback
*/
private
function
replace_theme_image_link
(
$matches
)
{
$file
=
'/theme/'
.
get_config
(
'theme'
)
.
'/static/images/'
.
$matches
[
2
];
$this
->
htmlexportcopyproxy
->
add
(
get_config
(
'docroot'
)
.
$file
,
'/static/'
.
$file
);
return
$this
->
basepath
.
'/static/'
.
$file
;
}
/**
* Given a file, returns the folder path for it in the Mahara files area
*
...
...
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