Skip to content
GitLab
Menu
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
d1900b97
Commit
d1900b97
authored
Oct 29, 2014
by
Son Nguyen
Committed by
Gerrit Code Review
Oct 29, 2014
Browse files
Merge "Support for plugin's custom pieforms templates in /theme"
parents
e4701f3e
bd446706
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/mahara.php
View file @
d1900b97
...
...
@@ -2158,7 +2158,18 @@ function pieform_element_textarea_configure($element) {
function
pieform_template_dir
(
$file
,
$pluginlocation
=
''
)
{
global
$THEME
;
$filepath
=
get_config
(
'docroot'
)
.
'local/theme/pieforms/'
.
$file
;
if
(
is_readable
(
$filepath
))
{
return
dirname
(
$filepath
);
}
foreach
(
$THEME
->
inheritance
as
$themedir
)
{
// Check under the theme directory first
$filepath
=
get_config
(
'docroot'
)
.
'theme/'
.
$themedir
.
'/'
.
$pluginlocation
.
'/pieforms/'
.
$file
;
if
(
is_readable
(
$filepath
))
{
return
dirname
(
$filepath
);
}
// Then check under the plugin directory
$filepath
=
get_config
(
'docroot'
)
.
$pluginlocation
.
'/theme/'
.
$themedir
.
'/pieforms/'
.
$file
;
if
(
is_readable
(
$filepath
))
{
return
dirname
(
$filepath
);
...
...
htdocs/theme/raw/blocktype/wall/
templates/
pieforms/wallpost.php
→
htdocs/theme/raw/blocktype/wall/pieforms/wallpost.php
View file @
d1900b97
File moved
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