mirror of
https://github.com/moodle/moodle.git
synced 2025-08-11 11:56:40 +02:00
Merge branch 'MDL-7339-master' of git://github.com/mickhawkins/moodle
This commit is contained in:
commit
79edcde3f6
8 changed files with 41 additions and 20 deletions
|
@ -428,7 +428,7 @@ class manager {
|
|||
|
||||
$user = null;
|
||||
|
||||
if (!empty($CFG->opentogoogle)) {
|
||||
if (!empty($CFG->opentowebcrawlers)) {
|
||||
if (\core_useragent::is_web_crawler()) {
|
||||
$user = guest_user();
|
||||
}
|
||||
|
|
|
@ -3378,5 +3378,21 @@ function xmldb_main_upgrade($oldversion) {
|
|||
// Automatically generated Moodle v3.7.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2019060600.02) {
|
||||
// Renaming 'opentogoogle' config to 'opentowebcrawlers'.
|
||||
$opentogooglevalue = get_config('core', 'opentogoogle');
|
||||
|
||||
// Move the value over if it was previously configured.
|
||||
if ($opentogooglevalue !== false) {
|
||||
set_config('opentowebcrawlers', $opentogooglevalue);
|
||||
}
|
||||
|
||||
// Remove the now unused value.
|
||||
unset_config('opentogoogle');
|
||||
|
||||
// Main savepoint reached.
|
||||
upgrade_main_savepoint(true, 2019060600.02);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue