Skip to content

Commit

Permalink
filters: MDL 7336 Remove remaining references to ->filters
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhunt committed Apr 13, 2009
1 parent 5b8fa09 commit 6b037e0
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 35 deletions.
6 changes: 1 addition & 5 deletions admin/report/security/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,7 @@ function report_security_check_mediafilterswf($detailed=false) {
$result->status = null;
$result->link = "<a href=\"$CFG->wwwroot/$CFG->admin/settings.php?section=filtersettingfiltermediaplugin\">".get_string('filtersettings', 'admin').'</a>';

if (!empty($CFG->textfilters)) {
$activefilters = explode(',', $CFG->textfilters);
} else {
$activefilters = array();
}
$activefilters = filters_get_globally_enabled();

if (array_search('filter/mediaplugin', $activefilters) !== false and !empty($CFG->filter_mediaplugin_enable_swf)) {
$result->status = REPORT_SECURITY_CRITICAL;
Expand Down
7 changes: 1 addition & 6 deletions filter/algebra/algebradebug.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@

require_once("../../config.php");

if (empty($CFG->textfilters)) {
if (!filter_is_enabled('filter/algebra')) {
error ('Filter not enabled!');
} else {
$filters = explode(',', $CFG->textfilters);
if (array_search('filter/algebra', $filters) === FALSE) {
error ('Filter not enabled!');
}
}

require_once($CFG->libdir.'/filelib.php');
Expand Down
7 changes: 1 addition & 6 deletions filter/algebra/pix.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@

require_once('../../config.php');

if (empty($CFG->textfilters)) {
if (!filter_is_enabled('filter/algebra')) {
error ('Filter not enabled!');
} else {
$filters = explode(',', $CFG->textfilters);
if (array_search('filter/algebra', $filters) === FALSE) {
error ('Filter not enabled!');
}
}

// disable moodle specific debug messages
Expand Down
7 changes: 1 addition & 6 deletions filter/tex/pix.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@

require_once('../../config.php');

if (empty($CFG->textfilters)) {
if (!filter_is_enabled('filter/tex')) {
error ('Filter not enabled!');
} else {
$filters = explode(',', $CFG->textfilters);
if (array_search('filter/tex', $filters) === FALSE) {
error ('Filter not enabled!');
}
}

// disable moodle specific debug messages
Expand Down
7 changes: 1 addition & 6 deletions filter/tex/texdebug.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@

require_once("../../config.php");

if (empty($CFG->textfilters)) {
if (!filter_is_enabled('filter/tex')) {
error ('Filter not enabled!');
} else {
$filters = explode(',', $CFG->textfilters);
if (array_search('filter/tex', $filters) === FALSE) {
error ('Filter not enabled!');
}
}

require_once($CFG->libdir.'/filelib.php');
Expand Down
7 changes: 1 addition & 6 deletions filter/tex/texed.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@
require_once("../../config.php");
require_once($CFG->dirroot.'/filter/tex/lib.php');

if (empty($CFG->textfilters)) {
if (!filter_is_enabled('filter/tex')) {
error ('Filter not enabled!');
} else {
$filters = explode(',', $CFG->textfilters);
if (array_search('filter/tex', $filters) === FALSE) {
error ('Filter not enabled!');
}
}

error_reporting(E_ALL);
Expand Down

0 comments on commit 6b037e0

Please sign in to comment.