Skip to content

Commit 4999558

Browse files
committed
Merge branch 'MDL-57342-37' of git://github.com/Chocolate-lightning/moodle into MOODLE_37_STABLE
2 parents 5f9afeb + f4da3ac commit 4999558

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

lib/adminlib.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2574,6 +2574,19 @@ public function output_html($data, $query='') {
25742574
$editor->use_editor($this->get_id(), array('noclean'=>true));
25752575
return parent::output_html($data, $query);
25762576
}
2577+
2578+
/**
2579+
* Checks if data has empty html.
2580+
*
2581+
* @param string $data
2582+
* @return string Empty when no errors.
2583+
*/
2584+
public function write_setting($data) {
2585+
if (trim(html_to_text($data)) === '') {
2586+
$data = '';
2587+
}
2588+
return parent::write_setting($data);
2589+
}
25772590
}
25782591

25792592

lib/db/upgrade.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3378,5 +3378,17 @@ function xmldb_main_upgrade($oldversion) {
33783378
// Automatically generated Moodle v3.7.0 release upgrade line.
33793379
// Put any upgrade step following this.
33803380

3381+
if ($oldversion < 2019052001.04) {
3382+
// Update the empty tag instructions to null.
3383+
$instructions = get_config('core', 'auth_instructions');
3384+
3385+
if (trim(html_to_text($instructions)) === '') {
3386+
set_config('auth_instructions', '');
3387+
}
3388+
3389+
// Main savepoint reached.
3390+
upgrade_main_savepoint(true, 2019052001.04);
3391+
}
3392+
33813393
return true;
33823394
}

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
defined('MOODLE_INTERNAL') || die();
3131

32-
$version = 2019052001.03; // 20190520 = branching date YYYYMMDD - do not modify!
32+
$version = 2019052001.04; // 20190520 = branching date YYYYMMDD - do not modify!
3333
// RR = release increments - 00 in DEV branches.
3434
// .XX = incremental changes.
3535

0 commit comments

Comments
 (0)