diff --git a/config/config.inc.php.dist b/config/config.inc.php.dist index d7a0f83df5c45be4c77bed457971300f4e6e62af..98c38a4b1c218580419bd954c60c0e4629c852ac 100644 --- a/config/config.inc.php.dist +++ b/config/config.inc.php.dist @@ -35,8 +35,6 @@ // +---------------------------------------------------------------------------+ global - $FLASHPLAYER_DEFAULT_CONFIG_MIN, - $FLASHPLAYER_DEFAULT_CONFIG_MAX, $INST_ADMIN_DATAFIELDS_VIEW, $INST_MODULES, $INST_TYPE, @@ -266,11 +264,6 @@ $SYMBOL_SHORT = array( this options are only needed, if you are using the addional Stud.IP modules (please see in config_local.inc.php which modules are activated). It's a good idea to leave this settings untouched...*/ - -// cofiguration for flash player -$FLASHPLAYER_DEFAULT_CONFIG_MIN = "&showstop=1&showvolume=1&bgcolor=A6B6C6&bgcolor1=A6B6C6&bgcolor2=7387AC&playercolor=7387AC&buttoncolor=254580&buttonovercolor=E9EFFD&slidercolor1=CAD7E1&slidercolor2=A6B6C6&sliderovercolor=E9EFFD&loadingcolor=E9B21A&buffer=5&buffercolor=white&buffershowbg=0&playeralpha=90&playertimeout=500&shortcut=1&phpstream=0&onclick=playpause&showloading=always"; -$FLASHPLAYER_DEFAULT_CONFIG_MAX = "&showstop=1&showvolume=1&bgcolor=A6B6C6&bgcolor1=A6B6C6&bgcolor2=7387AC&playercolor=7387AC&buttoncolor=254580&buttonovercolor=E9EFFD&slidercolor1=CAD7E1&slidercolor2=A6B6C6&sliderovercolor=E9EFFD&loadingcolor=E9B21A&buffer=5&buffercolor=white&buffershowbg=0&playeralpha=90&playertimeout=500&shortcut=1&showtime=1&showfullscreen=1&showplayer=always&phpstream=0&onclick=playpause&showloading=always"; - /* * use this to customize the fields shown in the standard/extended view on the instiute member page * valid values are 'raum', 'sprechzeiten', 'telefon', 'email', 'homepage' and userinstrole datafield ids diff --git a/config/config_develop.inc.php b/config/config_develop.inc.php index 26787a21a9c99e87c9f598e12822f1e896f5cd02..a38726a6c240060a019495e016b77f364d9f5e63 100644 --- a/config/config_develop.inc.php +++ b/config/config_develop.inc.php @@ -36,8 +36,6 @@ global $CALENDAR_MAX_EVENTS, - $FLASHPLAYER_DEFAULT_CONFIG_MIN, - $FLASHPLAYER_DEFAULT_CONFIG_MAX, $INST_ADMIN_DATAFIELDS_VIEW, $INST_MODULES, $INST_STATUS_GROUPS, @@ -323,11 +321,6 @@ $SYMBOL_SHORT = [ this options are only needed, if you are using the addional Stud.IP modules (please see in config_local.inc.php which modules are activated). It's a good idea to leave this settings untouched...*/ - -// cofiguration for flash player -$FLASHPLAYER_DEFAULT_CONFIG_MIN = "&showstop=1&showvolume=1&bgcolor=A6B6C6&bgcolor1=A6B6C6&bgcolor2=7387AC&playercolor=7387AC&buttoncolor=254580&buttonovercolor=E9EFFD&slidercolor1=CAD7E1&slidercolor2=A6B6C6&sliderovercolor=E9EFFD&loadingcolor=E9B21A&buffer=5&buffercolor=white&buffershowbg=0&playeralpha=90&playertimeout=500&shortcut=1&phpstream=0&onclick=playpause&showloading=always"; -$FLASHPLAYER_DEFAULT_CONFIG_MAX = "&showstop=1&showvolume=1&bgcolor=A6B6C6&bgcolor1=A6B6C6&bgcolor2=7387AC&playercolor=7387AC&buttoncolor=254580&buttonovercolor=E9EFFD&slidercolor1=CAD7E1&slidercolor2=A6B6C6&sliderovercolor=E9EFFD&loadingcolor=E9B21A&buffer=5&buffercolor=white&buffershowbg=0&playeralpha=90&playertimeout=500&shortcut=1&showtime=1&showfullscreen=1&showplayer=always&phpstream=0&onclick=playpause&showloading=always"; - //Here you have to add the datafield_ids as elements. They will be shown in the standard / extended view on inst_admin.php $INST_ADMIN_DATAFIELDS_VIEW = [ 'default' => [], diff --git a/db/migrations/5.5.4_remove_flash_from_config.php b/db/migrations/5.5.4_remove_flash_from_config.php new file mode 100644 index 0000000000000000000000000000000000000000..56cb322035656146325e474951ebaec741e5c5bb --- /dev/null +++ b/db/migrations/5.5.4_remove_flash_from_config.php @@ -0,0 +1,36 @@ +<?php +final class RemoveFlashFromConfig extends Migration +{ + private const OLD_DESCRIPTION = 'Sollen externe Medien über [img/flash/audio/video] eingebunden werden? deny=nicht erlaubt, allow=erlaubt, proxy=proxy benutzen.'; + private const NEW_DESCRIPTION = 'Sollen externe Medien über [img/audio/video] eingebunden werden? deny=nicht erlaubt, allow=erlaubt, proxy=proxy benutzen.'; + + + public function description() + { + return 'Removes reference to flash from config description'; + } + + protected function up() + { + $query = "UPDATE `config` + SET `description` = :new_description + WHERE `field` = 'LOAD_EXTERNAL_MEDIA' + AND `description` = :old_description"; + DBManager::get()->execute($query, [ + ':new_description' => self::NEW_DESCRIPTION, + ':old_description' => self::OLD_DESCRIPTION, + ]); + } + + protected function down() + { + $query = "UPDATE `config` + SET `description` = :old_description + WHERE `field` = 'LOAD_EXTERNAL_MEDIA' + AND `description` = :new_description"; + DBManager::get()->execute($query, [ + ':new_description' => self::NEW_DESCRIPTION, + ':old_description' => self::OLD_DESCRIPTION, + ]); + } +} diff --git a/lib/classes/StudipCoreFormat.php b/lib/classes/StudipCoreFormat.php index b6562527df5d51835d3e7061d69813e89c0f3bc0..389256f937fdd0a3b33dddbf638308dc1bb8e706 100644 --- a/lib/classes/StudipCoreFormat.php +++ b/lib/classes/StudipCoreFormat.php @@ -148,7 +148,7 @@ class StudipCoreFormat extends TextFormat 'callback' => 'StudipCoreFormat::markupCode' ], 'media' => [ - 'start' => '\[(img|flash|audio|video)(.*?)\](.*?)(?=\s|$)', + 'start' => '\[(img|audio|video)(.*?)\](.*?)(?=\s|$)', 'callback' => 'StudipCoreFormat::markupMedia' ], 'emails' => [ @@ -524,7 +524,7 @@ class StudipCoreFormat extends TextFormat } /** - * Stud.IP markup for images, audio, video and flash-films + * Stud.IP markup for images, audio and video */ protected static function markupMedia($markup, $matches) { @@ -598,24 +598,12 @@ class StudipCoreFormat extends TextFormat $media_url = idna_link($url); } - if ($tag === "flash") { - $width = $width ? $width : 200; - $height = round($width * 0.75); - $flash_config = $width > 200 ? $GLOBALS['FLASHPLAYER_DEFAULT_CONFIG_MAX'] : $GLOBALS['FLASHPLAYER_DEFAULT_CONFIG_MIN']; - $media = '<object type="application/x-shockwave-flash" id="FlashPlayer" data="'.Assets::url().'flash/player_flv.swf" width="'.$width.'" height="'.$height.'"> - <param name="movie" value="'.Assets::url().'flash/player_flv.swf"> - <param name="allowFullScreen" value="true"> - <param name="FlashVars" value="flv='.urlencode(decodeHTML($media_url)).'&startimage='.$link.$flash_config.'"> - <embed src="'.Assets::url().'flash/player_flv.swf" movie="$media_url" type="application/x-shockwave-flash" FlashVars="flv='.urlencode(decodeHTML($media_url)).'&startimage='.$link.$flash_config.'"> - </object>'; - } else { - $media = sprintf($format_strings[$tag], - $media_url, - isset($width) ? "width: ".$width."px;" : "", - $title, - $title - ); - } + $media = sprintf($format_strings[$tag], + $media_url, + isset($width) ? "width: ".$width."px;" : "", + $title, + $title + ); if ($tag === 'audio') { $random_id = 'audio-' . mb_substr(md5(uniqid('audio', true)), -8); diff --git a/public/assets/flash/player.swf b/public/assets/flash/player.swf deleted file mode 100644 index 497cfcefb13758da8ef2bde2d375c1230b6dd54f..0000000000000000000000000000000000000000 Binary files a/public/assets/flash/player.swf and /dev/null differ diff --git a/public/assets/flash/player_flv.swf b/public/assets/flash/player_flv.swf deleted file mode 100644 index 9aba8bf7f46cd42fb9920da958a7c24a4b416a1d..0000000000000000000000000000000000000000 Binary files a/public/assets/flash/player_flv.swf and /dev/null differ