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
4483ed5d
Commit
4483ed5d
authored
Jul 28, 2010
by
Richard Mansfield
Browse files
Allow static images from any theme to be included in the html export
Signed-off-by:
Richard Mansfield
<
richardm@catalyst.net.nz
>
parent
76bd0ee7
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/export/html/lib.php
View file @
4483ed5d
...
...
@@ -544,7 +544,7 @@ class HtmlExportOutputFilter {
// Images out of the theme directory
$html
=
preg_replace_callback
(
'#(?<=[\'"])('
.
$wwwroot
.
')?/?theme/
'
.
get_config
(
'theme'
)
.
'
/static/images/([a-z0-9_.-]+)#'
,
'#(?<=[\'"])('
.
$wwwroot
.
')?/?theme/
([a-zA-Z0-9_.-]+)
/static/images/([a-z0-9_.-]+)#'
,
array
(
$this
,
'replace_theme_image_link'
),
$html
);
...
...
@@ -668,7 +668,7 @@ class HtmlExportOutputFilter {
* Callback
*/
private
function
replace_theme_image_link
(
$matches
)
{
$file
=
'/theme/'
.
get_config
(
'theme'
)
.
'/static/images/'
.
$matches
[
2
];
$file
=
'/theme/'
.
$matches
[
2
]
.
'/static/images/'
.
$matches
[
3
];
$this
->
htmlexportcopyproxy
->
add
(
get_config
(
'docroot'
)
.
$file
,
'/static/'
.
$file
...
...
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