Skip to content

Commit

Permalink
Fixed error message when not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanheywood committed Nov 14, 2024
1 parent 3e25ba3 commit 1fab430
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion db_replace.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
redirect($redirect);
} else if (!(get_config('tool_advancedreplace', 'allowuireplace'))) {
echo $OUTPUT->heading(get_string('replacepageheader', 'tool_advancedreplace'));
echo html_writer::div(get_string('replace_warning', 'tool_advancedreplace'), 'alert alert-warning');
echo html_writer::div(get_string('replace_warning', 'tool_advancedreplace',
'$CFG->forced_plugin_settings[\'tool_advancedreplace\'][\'allowuireplace\'] = 1;'), 'alert alert-warning');
} else if ($csvcontent = ($form->get_file_content('csvfile') ?? $csvpostcontent)) {
$returnurl = new moodle_url('/admin/tool/advancedreplace/db_replace.php');
$optionsyes = array('replace' => $replace, 'confirm' => 1, 'sesskey' => sesskey(), 'csvpostcontent' => $csvcontent);
Expand Down
2 changes: 1 addition & 1 deletion lang/en/tool_advancedreplace.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
$string['replacepagename'] = 'Replace strings in the Database';
$string['replace'] = 'Replace';
$string['replacecheck'] = 'Are you sure you want to replace strings in the Database using the uploaded csv file?';
$string['replace_warning'] = 'Replace via UI not enabled, to enable please set <b>allowuireplace</b> to true in config.php';
$string['replace_warning'] = 'Replace via UI not enabled, to enable please set <code>{$a}</code> in config.php';
$string['strftimedatetimemonthshort'] = '%d %b %Y, %I:%M %p';
$string['searchdeleted'] = 'The selected search was deleted.';
$string['searchpagename'] = 'Search in the Database';
Expand Down

0 comments on commit 1fab430

Please sign in to comment.