Skip to content

Commit

Permalink
MDL-62640 environment: Remove the deprecated slash argument check
Browse files Browse the repository at this point in the history
  • Loading branch information
meirzamoodle committed Sep 25, 2024
1 parent 979db77 commit 04246c8
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 24 deletions.
7 changes: 7 additions & 0 deletions .upgradenotes/MDL-62640-2024083012210854.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 0 additions & 5 deletions admin/environment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
2 changes: 1 addition & 1 deletion lang/en/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,6 @@
$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';
Expand Down Expand Up @@ -1664,3 +1663,4 @@
* 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>.';
1 change: 1 addition & 0 deletions lang/en/deprecated.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,4 @@ registration_help,core_admin
coursemanagementoptions,core_my
configslasharguments,core_admin
slasharguments,core_admin
slashargumentswarning,core_admin
27 changes: 27 additions & 0 deletions lib/deprecatedlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
18 changes: 0 additions & 18 deletions lib/upgradelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit 04246c8

Please sign in to comment.