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
80ac04f9
Commit
80ac04f9
authored
Oct 05, 2018
by
Cecilia Vela Gurovic
Committed by
Gerrit Code Review
Oct 05, 2018
Browse files
Merge "Bug 1795522: Allow the dwoo cache to be placed at custom path"
parents
ab840c84
2205f03f
Changes
6
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/config-defaults.php
View file @
80ac04f9
...
...
@@ -775,3 +775,9 @@ $cfg->sessionhandler = 'file';
"class" : "s3_file_system",
}';
*/
/**
* @global string $cfg->dwoocachedir
* The location of the dwoo cache directory
*/
//$cfg->customdwoocachedir = '/var/cache/appcache/testing';
htdocs/lib/dwoo/mahara/Dwoo_Mahara.php
View file @
80ac04f9
...
...
@@ -49,15 +49,16 @@ class Dwoo_Mahara extends Core {
public
function
__construct
()
{
global
$THEME
;
$dwoo_dir
=
get_dwoo_dir
();
// make sure cache/compile paths exist
check_dir_exists
(
get_config
(
'dataroot'
)
.
'dwoo/
compile/'
.
$THEME
->
basename
);
check_dir_exists
(
get_config
(
'dataroot'
)
.
'dwoo/
cache/'
.
$THEME
->
basename
);
check_dir_exists
(
$dwoo_dir
.
'
compile/'
.
$THEME
->
basename
);
check_dir_exists
(
$dwoo_dir
.
'
cache/'
.
$THEME
->
basename
);
// set paths
$this
->
template_dir
=
$THEME
->
templatedirs
;
$compileDir
=
get_config
(
'dataroot'
)
.
'dwoo/
compile/'
.
$THEME
->
basename
;
$cacheDir
=
get_config
(
'dataroot'
)
.
'dwoo/
cache/'
.
$THEME
->
basename
;
$compileDir
=
$dwoo_dir
.
'
compile/'
.
$THEME
->
basename
;
$cacheDir
=
$dwoo_dir
.
'
cache/'
.
$THEME
->
basename
;
parent
::
__construct
(
$compileDir
,
$cacheDir
);
// add plugins dir to the loader
...
...
htdocs/lib/errors.php
View file @
80ac04f9
...
...
@@ -502,9 +502,8 @@ function error ($code, $message, $file, $line, $vars) {
}
// Ignore errors from smarty templates, which happen all too often
if
(
function_exists
(
'get_config'
))
{
$compiledir
=
realpath
(
get_config
(
'dataroot'
)
.
'dwoo/compile'
);
if
(
function_exists
(
'get_config'
)
&&
function_exists
(
'get_dwoo_dir'
))
{
$compiledir
=
realpath
(
get_dwoo_dir
()
.
'compile'
);
if
(
E_NOTICE
==
$code
&&
substr
(
$file
,
0
,
strlen
(
$compiledir
))
==
$compiledir
)
{
return
;
}
...
...
htdocs/lib/mahara.php
View file @
80ac04f9
...
...
@@ -141,9 +141,9 @@ function ensure_sanity() {
}
throw
new
ConfigSanityException
(
$message
);
}
$dwoo_dir
=
get_dwoo_dir
();
if
(
!
check_dir_exists
(
get_config
(
'dataroot'
)
.
'dwoo'
)
||
!
check_dir_exists
(
$dwoo_dir
)
||
!
check_dir_exists
(
get_config
(
'dataroot'
)
.
'temp'
)
||
!
check_dir_exists
(
get_config
(
'dataroot'
)
.
'langpacks'
)
||
!
check_dir_exists
(
get_config
(
'dataroot'
)
.
'htmlpurifier'
)
||
...
...
@@ -160,6 +160,10 @@ function ensure_sanity() {
raise_memory_limit
(
'128M'
);
}
function
get_dwoo_dir
()
{
return
!
empty
(
get_config
(
'customdwoocachedir'
))
?
get_config
(
'customdwoocachedir'
)
.
'/dwoo/'
:
get_config
(
'dataroot'
)
.
'dwoo/'
;
}
/**
* Check sanity of things that we only check at installation time - not on
* every request, like ensure_sanity() does
...
...
@@ -5341,7 +5345,7 @@ function clear_all_caches($clearsessiondirs = false) {
bump_cache_version
();
clear_resized_images_cache
();
$dwoo_dir
=
get_
config
(
'dataroot'
)
.
'dwoo'
;
$dwoo_dir
=
get_
dwoo_dir
()
;
if
(
check_dir_exists
(
$dwoo_dir
)
&&
!
rmdirr
(
$dwoo_dir
))
{
throw
new
SystemException
(
'Can not remove dwoo directory '
.
$dwoo_dir
);
}
...
...
htdocs/theme/raw/plugintype/blocktype/inbox/templates/inboxmr.tpl
View file @
80ac04f9
...
...
@@ -21,7 +21,7 @@
{
else
}
<span
class=
"icon icon-wrench text-default left"
role=
"presentation"
aria-hidden=
"true"
></span>
{/
if
}
<span
class=
"sr-only"
>
{
$i
tem
->
strtype
}
</span>
<span
class=
"sr-only"
>
{
$i
->
strtype
}
</span>
{
$i
->
subject
|
truncate
:
50
}
<span
class=
"icon icon-chevron-down collapse-indicator pull-right text-small"
role=
"presentation"
aria-hidden=
"true"
></span>
</a>
...
...
htdocs/theme/raw/templates/header/head.tpl
View file @
80ac04f9
...
...
@@ -21,7 +21,7 @@
'handheld_device'
:
{
if
$HANDHELD_DEVICE
}
1
{
else
}
0
{/
if
}
,
'cc_enabled'
:
{
$CC_ENABLED
|
intval
}
,
'mathjax'
:
{
ifconfig
key
=
mathjax
}
1
{
else
}
0
{/
ifconfig
}
,
'select2_lang'
:
'{$select2_language}'
'select2_lang'
:
'{
if
$select2_language}
{$select2_language}{/if}
'
{
literal
}}{/
literal
}
;
</script>
{
$STRINGJS
|
safe
}
...
...
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