MDL-62640 environment: Remove the deprecated slash argument check

This commit is contained in:
meirzamoodle 2024-09-20 08:59:44 +07:00
parent 979db77a63
commit 04246c8aec
6 changed files with 36 additions and 24 deletions

View File

@ -0,0 +1,7 @@
issueNumber: MDL-62640
notes:
core:
- message: |
Due to the removal of the slashargument configuration, the server check page will no longer inspect the slash argument,
therefore, the function check_slasharguments() is deprecated because it is no longer used.
type: deprecated

View File

@ -4634,11 +4634,6 @@
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />

View File

@ -1310,7 +1310,6 @@ $string['sitepolicyguest_help'] = 'The URL of the site policy that all guests mu
$string['sitesectionhelp'] = 'Display a section at the top of the page where you can add custom content.';
$string['sixtyfourbitsrequired'] = 'It has been detected that your site is not using a 64-bit PHP version. You are required to upgrade your system (operating system, PHP...) before installing this Moodle version.';
$string['sixtyfourbitswarning'] = 'It has been detected that your site is not using a 64-bit PHP version. It is recommended that you upgrade your site to ensure future compatibility.';
$string['slashargumentswarning'] = 'It is recommended that the use of slash arguments is enabled. In future it will be required. For more details, see the documentation <a href="https://docs.moodle.org/en/admin/environment/slasharguments">Using slash arguments</a>.';
$string['smallscreensonly'] = 'Small screens only';
$string['smtp'] = 'SMTP';
$string['smtpauthtype'] = 'SMTP Auth Type';
@ -1664,3 +1663,4 @@ $string['registration_help'] = 'By registering:
* You can activate mobile app push notifications from your site
* You are contributing to our Moodle statistics of the worldwide community';
$string['slasharguments'] = 'Use slash arguments';
$string['slashargumentswarning'] = 'It is recommended that the use of slash arguments is enabled. In future it will be required. For more details, see the documentation <a href="https://docs.moodle.org/en/admin/environment/slasharguments">Using slash arguments</a>.';

View File

@ -132,3 +132,4 @@ registration_help,core_admin
coursemanagementoptions,core_my
configslasharguments,core_admin
slasharguments,core_admin
slashargumentswarning,core_admin

View File

@ -785,3 +785,30 @@ function plagiarism_get_file_results(): void {
function plagiarism_update_status(): void {
\core\deprecation::emit_deprecation_if_present(__FUNCTION__);
}
/**
* Method used to check the usage of slasharguments config and display a warning message.
*
* @param environment_results $result object to update, if relevant.
* @return environment_results|null updated results or null if slasharguments is disabled.
*
* @deprecated Since Moodle 4.5
* @todo Final deprecation on Moodle 6.0. See MDL-82768.
*/
#[\core\attribute\deprecated(
since: '4.5',
mdl: 'MDL-62640',
reason: 'Removed the option to disable slash arguments (slashargs)',
)]
function check_slasharguments(environment_results $result) {
\core\deprecation::emit_deprecation_if_present(__FUNCTION__);
global $CFG;
if (!during_initial_install() && empty($CFG->slasharguments)) {
$result->setInfo('slasharguments');
$result->setStatus(false);
return $result;
}
return null;
}

View File

@ -2272,24 +2272,6 @@ function check_database_storage_engine(environment_results $result) {
return null;
}
/**
* Method used to check the usage of slasharguments config and display a warning message.
*
* @param environment_results $result object to update, if relevant.
* @return environment_results|null updated results or null if slasharguments is disabled.
*/
function check_slasharguments(environment_results $result){
global $CFG;
if (!during_initial_install() && empty($CFG->slasharguments)) {
$result->setInfo('slasharguments');
$result->setStatus(false);
return $result;
}
return null;
}
/**
* This function verifies if the database has tables using innoDB Antelope row format.
*