Skip to content

Commit 2b22c47

Browse files
committed
Merge branch 'MDL-57342-36' of git://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE
2 parents 22ecbc3 + 11cfdfb commit 2b22c47

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
@@ -2433,6 +2433,19 @@ public function output_html($data, $query='') {
24332433
$editor->use_editor($this->get_id(), array('noclean'=>true));
24342434
return parent::output_html($data, $query);
24352435
}
2436+
2437+
/**
2438+
* Checks if data has empty html.
2439+
*
2440+
* @param string $data
2441+
* @return string Empty when no errors.
2442+
*/
2443+
public function write_setting($data) {
2444+
if (trim(html_to_text($data)) === '') {
2445+
$data = '';
2446+
}
2447+
return parent::write_setting($data);
2448+
}
24362449
}
24372450

24382451

lib/db/upgrade.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3078,5 +3078,17 @@ function xmldb_main_upgrade($oldversion) {
30783078
upgrade_main_savepoint(true, 2018120303.16);
30793079
}
30803080

3081+
if ($oldversion < 2018120305.04) {
3082+
// Update the empty tag instructions to null.
3083+
$instructions = get_config('core', 'auth_instructions');
3084+
3085+
if (trim(html_to_text($instructions)) === '') {
3086+
set_config('auth_instructions', '');
3087+
}
3088+
3089+
// Main savepoint reached.
3090+
upgrade_main_savepoint(true, 2018120305.04);
3091+
}
3092+
30813093
return true;
30823094
}

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 = 2018120305.03; // 20181203 = branching date YYYYMMDD - do not modify!
32+
$version = 2018120305.04; // 20181203 = branching date YYYYMMDD - do not modify!
3333
// RR = release increments - 00 in DEV branches.
3434
// .XX = incremental changes.
3535

0 commit comments

Comments
 (0)