MDL-11517 reserved word MOD used in table alias in questions backup code
[moodle-pu.git] / filter / mediaplugin / defaultsettings.php
blob4f4d4db4b2232230aa25ef302c8bc1b6df558537
1 <?php
2 // check/set default config settings for media plugin
3 // $forcereset is set in calling routine
5 if (!isset($forcereset)) {
6 $forcereset = false;
9 if (!isset($CFG->filter_mediaplugin_enable_mp3) or $forcereset) {
10 if (isset($CFG->filter_mediaplugin_ignore_mp3)) {
11 set_config( 'filter_mediaplugin_enable_mp3', !$CFG->filter_mediaplugin_ignore_mp3 );
12 set_config( 'filter_mediaplugin_ignore_mp3', '' );
14 else {
15 set_config( 'filter_mediaplugin_enable_mp3', 1 );
18 if (!isset($CFG->filter_mediaplugin_enable_swf) or $forcereset) {
19 if (isset($CFG->filter_mediaplugin_ignore_swf)) {
20 set_config( 'filter_mediaplugin_enable_swf', !$CFG->filter_mediaplugin_ignore_swf );
21 set_config( 'filter_mediaplugin_ignore_swf','' );
23 else {
24 set_config( 'filter_mediaplugin_enable_swf', 0 ); //disable swf embedding by default for now
27 if (!isset($CFG->filter_mediaplugin_enable_mov) or $forcereset) {
28 if (isset($CFG->filter_mediaplugin_ignore_mov)) {
29 set_config( 'filter_mediaplugin_enable_mov', !$CFG->filter_mediaplugin_ignore_mov );
30 set_config( 'filter_mediaplugin_ignore_mov', '' );
32 else {
33 set_config( 'filter_mediaplugin_enable_mov', 1 );
36 if (!isset($CFG->filter_mediaplugin_enable_mpg) or $forcereset) {
37 if (isset($CFG->filter_mediaplugin_ignore_mpg)) {
38 set_config( 'filter_mediaplugin_enable_mpg', !$CFG->filter_mediaplugin_ignore_mpg );
39 set_config( 'filter_mediaplugin_ignore_mpg', '' );
41 else {
42 set_config( 'filter_mediaplugin_enable_mpg', 1 );
45 if (!isset($CFG->filter_mediaplugin_enable_wmv) or $forcereset) {
46 if (isset($CFG->filter_mediaplugin_ignore_wmv)) {
47 set_config( 'filter_mediaplugin_enable_wmv', !$CFG->filter_mediaplugin_ignore_wmv );
48 set_config( 'filter_mediaplugin_ignore_wmv', '' );
50 else {
51 set_config( 'filter_mediaplugin_enable_wmv', 1 );
54 if (!isset($CFG->filter_mediaplugin_enable_avi) or $forcereset) {
55 if (isset($CFG->filter_mediaplugin_ignore_avi)) {
56 set_config( 'filter_mediaplugin_enable_avi', !$CFG->filter_mediaplugin_ignore_avi );
57 set_config( 'filter_mediaplugin_ignore_avi', '' );
59 else {
60 set_config( 'filter_mediaplugin_enable_avi', 1 );
63 if (!isset($CFG->filter_mediaplugin_enable_flv) or $forcereset) {
64 if (isset($CFG->filter_mediaplugin_ignore_flv)) {
65 set_config( 'filter_mediaplugin_enable_flv', !$CFG->filter_mediaplugin_ignore_flv );
66 set_config( 'filter_mediaplugin_ignore_flv','' );
68 else {
69 set_config( 'filter_mediaplugin_enable_flv', 1 );
72 if (!isset($CFG->filter_mediaplugin_enable_ram) or $forcereset) {
73 if (isset($CFG->filter_mediaplugin_ignore_ram)) {
74 set_config( 'filter_mediaplugin_enable_ram', !$CFG->filter_mediaplugin_ignore_ram );
75 set_config( 'filter_mediaplugin_ignore_ram','' );
77 else {
78 set_config( 'filter_mediaplugin_enable_ram', 1 );
81 if (!isset($CFG->filter_mediaplugin_enable_rpm) or $forcereset) {
82 if (isset($CFG->filter_mediaplugin_ignore_rpm)) {
83 set_config( 'filter_mediaplugin_enable_rpm', !$CFG->filter_mediaplugin_ignore_rpm );
84 set_config( 'filter_mediaplugin_ignore_rpm','' );
86 else {
87 set_config( 'filter_mediaplugin_enable_rpm', 1 );
90 if (!isset($CFG->filter_mediaplugin_enable_rm) or $forcereset) {
91 if (isset($CFG->filter_mediaplugin_ignore_rm)) {
92 set_config( 'filter_mediaplugin_enable_rm', !$CFG->filter_mediaplugin_ignore_rm );
93 set_config( 'filter_mediaplugin_ignore_rm','' );
95 else {
96 set_config( 'filter_mediaplugin_enable_rm', 1 );