mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-80072 core: Deprecate format_text smiley option
This was actually deprecated in Moodle 2.0 but did not emit.
This commit is contained in:
parent
d56303aa54
commit
85c1dd0077
@ -170,7 +170,6 @@ function tool_dbtransfer_create_maintenance_file() {
|
||||
$options = new stdClass();
|
||||
$options->trusted = false;
|
||||
$options->noclean = false;
|
||||
$options->smiley = false;
|
||||
$options->filter = false;
|
||||
$options->para = true;
|
||||
$options->newlines = false;
|
||||
|
@ -46,7 +46,6 @@ class tool_messageinbound_edit_handler_form extends moodleform {
|
||||
$formatoptions = new stdClass();
|
||||
$formatoptions->trusted = false;
|
||||
$formatoptions->noclean = false;
|
||||
$formatoptions->smiley = false;
|
||||
$formatoptions->filter = false;
|
||||
$formatoptions->para = true;
|
||||
$formatoptions->newlines = false;
|
||||
|
@ -67,7 +67,6 @@ class tool_messageinbound_renderer extends plugin_renderer_base {
|
||||
$descriptionoptions = new stdClass();
|
||||
$descriptionoptions->trusted = false;
|
||||
$descriptionoptions->noclean = false;
|
||||
$descriptionoptions->smiley = false;
|
||||
$descriptionoptions->filter = false;
|
||||
$descriptionoptions->para = true;
|
||||
$descriptionoptions->newlines = false;
|
||||
|
@ -47,7 +47,6 @@ if ($msgform->is_cancelled()) {
|
||||
$options = new stdClass();
|
||||
$options->para = false;
|
||||
$options->newlines = true;
|
||||
$options->smiley = false;
|
||||
$options->trusted = trusttext_trusted(\context_system::instance());
|
||||
|
||||
$msg = format_text($formdata->messagebody['text'], $formdata->messagebody['format'], $options);
|
||||
|
@ -111,7 +111,6 @@ if ($grade = $DB->get_record('grade_grades', array('itemid' => $grade_item->id,
|
||||
$grade->feedback = '';
|
||||
} else {
|
||||
$options = new stdClass();
|
||||
$options->smiley = false;
|
||||
$options->filter = false;
|
||||
$options->noclean = false;
|
||||
$options->para = false;
|
||||
|
@ -86,7 +86,6 @@ class chooser_item implements renderable, templatable {
|
||||
$options = new stdClass();
|
||||
$options->trusted = false;
|
||||
$options->noclean = false;
|
||||
$options->smiley = false;
|
||||
$options->filter = false;
|
||||
$options->para = true;
|
||||
$options->newlines = false;
|
||||
|
@ -933,9 +933,6 @@ class flexible_table {
|
||||
if (!isset($options->newlines)) {
|
||||
$options->newlines = false;
|
||||
}
|
||||
if (!isset($options->smiley)) {
|
||||
$options->smiley = false;
|
||||
}
|
||||
if (!isset($options->filter)) {
|
||||
$options->filter = false;
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ information provided here is intended especially for developers.
|
||||
The old method will be maintained, but new code should use the new method with first-class parameters.
|
||||
* The fourth parameter to `format_text` now emits a deprecation notice.
|
||||
It was originally deprecated in Moodle 2.0.
|
||||
* The smiley option for format_text has been removed. It was deprecated in Moodle 2.0.
|
||||
|
||||
=== 4.3 ===
|
||||
|
||||
|
@ -1318,6 +1318,15 @@ function format_text($text, $format = FORMAT_MOODLE, $options = null, $courseidd
|
||||
$params['text'] = $text;
|
||||
|
||||
if ($options) {
|
||||
// The smiley option was deprecated in Moodle 2.0.
|
||||
if (array_key_exists('smiley', $options)) {
|
||||
unset($options['smiley']);
|
||||
debugging(
|
||||
'The smiley option is deprecated and no longer used.',
|
||||
DEBUG_DEVELOPER,
|
||||
);
|
||||
}
|
||||
|
||||
$validoptions = [
|
||||
'text',
|
||||
'format',
|
||||
@ -1332,7 +1341,6 @@ function format_text($text, $format = FORMAT_MOODLE, $options = null, $courseidd
|
||||
'allowid',
|
||||
'noclean',
|
||||
'nocache',
|
||||
'smiley',
|
||||
];
|
||||
|
||||
$invalidoptions = array_diff(array_keys($options), $validoptions);
|
||||
@ -3743,7 +3751,6 @@ function get_formatted_help_string($identifier, $component, $ajax = false, $a =
|
||||
$options = new stdClass();
|
||||
$options->trusted = false;
|
||||
$options->noclean = false;
|
||||
$options->smiley = false;
|
||||
$options->filter = false;
|
||||
$options->para = true;
|
||||
$options->newlines = false;
|
||||
|
@ -78,7 +78,6 @@ $data = $tag->to_object();
|
||||
$data->relatedtags = core_tag_tag::get_item_tags_array('core', 'tag', $tag->id);
|
||||
|
||||
$options = new stdClass();
|
||||
$options->smiley = false;
|
||||
$options->filter = false;
|
||||
|
||||
// convert and remove any XSS
|
||||
|
Loading…
x
Reference in New Issue
Block a user