mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-29994 filters - prevent mod/data and mod/glossary to be re-added
This commit is contained in:
parent
38e9a1cc79
commit
775051a3e9
@ -508,10 +508,16 @@ function filter_get_name($filter) {
|
||||
function filter_get_all_installed() {
|
||||
global $CFG;
|
||||
$filternames = array();
|
||||
// TODO: deprecated in 2.2, delete support for "mod" legacy filters location in 2.3. MDL-29996
|
||||
$filterlocations = array('mod', 'filter');
|
||||
foreach ($filterlocations as $filterlocation) {
|
||||
// TODO: move get_list_of_plugins() to get_plugin_list()
|
||||
$filters = get_list_of_plugins($filterlocation);
|
||||
foreach ($filters as $filter) {
|
||||
// MDL-29994 - Ignore mod/data and mod/glossary filters forever, this will be out in 2.3
|
||||
if ($filterlocation == 'mod' && ($filter == 'data' || $filter == 'glossary')) {
|
||||
continue;
|
||||
}
|
||||
$path = $filterlocation . '/' . $filter;
|
||||
if (is_readable($CFG->dirroot . '/' . $path . '/filter.php')) {
|
||||
$strfiltername = filter_get_name($path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user