mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-48174 core_lang: support for ->skiplangupgrade in lang cron task
Similar to upgrade_language_pack(), update_langpacks_task should respect skiplangupgrade config. Also, this should be added to behat whitelist, so it can be disabled during on-sync period, when lang pack for master is not available.
This commit is contained in:
parent
c69183a40f
commit
ac19f245bf
@ -45,6 +45,13 @@ class update_langpacks_task extends \core\task\scheduled_task {
|
||||
* Run langpack update
|
||||
*/
|
||||
public function execute() {
|
||||
global $CFG;
|
||||
|
||||
// No need to run upgrade, if skiplangupgrade is set.
|
||||
if (!empty($CFG->skiplangupgrade)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$controller = new \tool_langimport\controller();
|
||||
if ($controller->update_all_installed_languages()) {
|
||||
foreach ($controller->info as $message) {
|
||||
|
@ -155,7 +155,7 @@ function behat_clean_init_config() {
|
||||
'wwwroot', 'dataroot', 'dirroot', 'admin', 'directorypermissions', 'filepermissions',
|
||||
'umaskpermissions', 'dbtype', 'dblibrary', 'dbhost', 'dbname', 'dbuser', 'dbpass', 'prefix',
|
||||
'dboptions', 'proxyhost', 'proxyport', 'proxytype', 'proxyuser', 'proxypassword',
|
||||
'proxybypass', 'theme', 'pathtogs', 'pathtoclam', 'pathtodu', 'aspellpath', 'pathtodot'
|
||||
'proxybypass', 'theme', 'pathtogs', 'pathtoclam', 'pathtodu', 'aspellpath', 'pathtodot', 'skiplangupgrade'
|
||||
));
|
||||
|
||||
// Add extra allowed settings.
|
||||
|
Loading…
x
Reference in New Issue
Block a user