mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Merge branch 'MDL-22478-alternative-langcacheroot' of git://github.com/mudrd8mz/moodle
This commit is contained in:
commit
3d63eb08f6
@ -345,6 +345,18 @@ $CFG->admin = 'admin';
|
||||
//
|
||||
// $CFG->themedir = '/location/of/extra/themes';
|
||||
//
|
||||
// If $CFG->langstringcache is enabled (which should always be in production
|
||||
// environment), Moodle keeps aggregated strings in its own internal format
|
||||
// optimised for performance. By default, this on-disk cache is created in
|
||||
// $CFG->dataroot/cache/lang. In cluster environment, you may wish to specify
|
||||
// an alternative location of this cache so that each web server in the cluster
|
||||
// uses its own local cache and does not need to access the shared dataroot.
|
||||
// Make sure that the web server process has write permission to this location
|
||||
// and that it has permission to remove the folder, too (so that the cache can
|
||||
// be pruned).
|
||||
//
|
||||
// $CFG->langcacheroot = '/var/www/moodle/htdocs/altcache/lang';
|
||||
//
|
||||
// Site default language can be set via standard administration interface. If you
|
||||
// want to have initial error messages for eventual database connection problems
|
||||
// localized too, you have to set your language code here.
|
||||
|
@ -5484,12 +5484,17 @@ function get_string_manager($forcereload=false) {
|
||||
}
|
||||
if ($singleton === null) {
|
||||
if (empty($CFG->early_install_lang)) {
|
||||
if (empty($CFG->langcacheroot)) {
|
||||
$langcacheroot = $CFG->dataroot . '/cache/lang';
|
||||
} else {
|
||||
$langcacheroot = $CFG->langcacheroot;
|
||||
}
|
||||
if (empty($CFG->langlist)) {
|
||||
$translist = array();
|
||||
} else {
|
||||
$translist = explode(',', $CFG->langlist);
|
||||
}
|
||||
$singleton = new core_string_manager($CFG->langotherroot, $CFG->langlocalroot, "$CFG->dataroot/cache/lang", !empty($CFG->langstringcache), $translist);
|
||||
$singleton = new core_string_manager($CFG->langotherroot, $CFG->langlocalroot, $langcacheroot, !empty($CFG->langstringcache), $translist);
|
||||
} else {
|
||||
$singleton = new install_string_manager();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user