aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Siegfried <david.siegfried@uni-vechta.de>2023-10-19 09:37:12 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2023-10-19 09:37:12 +0000
commit8e2ceb4ba5a3b9f8477454bbb93aec17613dc8d9 (patch)
tree498b23fda2de918edf8c285b326b3e10733d47c3
parentb77df6fc173a0c15e51f35f136fed24080e5b996 (diff)
remove flash leftover, closes #3371
Closes #3371 Merge request studip/studip!2291
-rw-r--r--config/config.inc.php.dist7
-rw-r--r--config/config_develop.inc.php7
-rw-r--r--db/migrations/5.5.4_remove_flash_from_config.php36
-rw-r--r--lib/classes/StudipCoreFormat.php28
-rw-r--r--public/assets/flash/player.swfbin11254 -> 0 bytes
-rw-r--r--public/assets/flash/player_flv.swfbin11803 -> 0 bytes
6 files changed, 44 insertions, 34 deletions
diff --git a/config/config.inc.php.dist b/config/config.inc.php.dist
index d7a0f83..98c38a4 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 = "&amp;showstop=1&amp;showvolume=1&amp;bgcolor=A6B6C6&amp;bgcolor1=A6B6C6&amp;bgcolor2=7387AC&amp;playercolor=7387AC&amp;buttoncolor=254580&amp;buttonovercolor=E9EFFD&amp;slidercolor1=CAD7E1&amp;slidercolor2=A6B6C6&amp;sliderovercolor=E9EFFD&amp;loadingcolor=E9B21A&amp;buffer=5&amp;buffercolor=white&amp;buffershowbg=0&amp;playeralpha=90&amp;playertimeout=500&amp;shortcut=1&amp;phpstream=0&amp;onclick=playpause&amp;showloading=always";
-$FLASHPLAYER_DEFAULT_CONFIG_MAX = "&amp;showstop=1&amp;showvolume=1&amp;bgcolor=A6B6C6&amp;bgcolor1=A6B6C6&amp;bgcolor2=7387AC&amp;playercolor=7387AC&amp;buttoncolor=254580&amp;buttonovercolor=E9EFFD&amp;slidercolor1=CAD7E1&amp;slidercolor2=A6B6C6&amp;sliderovercolor=E9EFFD&amp;loadingcolor=E9B21A&amp;buffer=5&amp;buffercolor=white&amp;buffershowbg=0&amp;playeralpha=90&amp;playertimeout=500&amp;shortcut=1&amp;showtime=1&amp;showfullscreen=1&amp;showplayer=always&amp;phpstream=0&amp;onclick=playpause&amp;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 26787a2..a38726a 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 = "&amp;showstop=1&amp;showvolume=1&amp;bgcolor=A6B6C6&amp;bgcolor1=A6B6C6&amp;bgcolor2=7387AC&amp;playercolor=7387AC&amp;buttoncolor=254580&amp;buttonovercolor=E9EFFD&amp;slidercolor1=CAD7E1&amp;slidercolor2=A6B6C6&amp;sliderovercolor=E9EFFD&amp;loadingcolor=E9B21A&amp;buffer=5&amp;buffercolor=white&amp;buffershowbg=0&amp;playeralpha=90&amp;playertimeout=500&amp;shortcut=1&amp;phpstream=0&amp;onclick=playpause&amp;showloading=always";
-$FLASHPLAYER_DEFAULT_CONFIG_MAX = "&amp;showstop=1&amp;showvolume=1&amp;bgcolor=A6B6C6&amp;bgcolor1=A6B6C6&amp;bgcolor2=7387AC&amp;playercolor=7387AC&amp;buttoncolor=254580&amp;buttonovercolor=E9EFFD&amp;slidercolor1=CAD7E1&amp;slidercolor2=A6B6C6&amp;sliderovercolor=E9EFFD&amp;loadingcolor=E9B21A&amp;buffer=5&amp;buffercolor=white&amp;buffershowbg=0&amp;playeralpha=90&amp;playertimeout=500&amp;shortcut=1&amp;showtime=1&amp;showfullscreen=1&amp;showplayer=always&amp;phpstream=0&amp;onclick=playpause&amp;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 0000000..56cb322
--- /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 b656252..389256f 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)).'&amp;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)).'&amp;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 497cfce..0000000
--- a/public/assets/flash/player.swf
+++ /dev/null
Binary files differ
diff --git a/public/assets/flash/player_flv.swf b/public/assets/flash/player_flv.swf
deleted file mode 100644
index 9aba8bf..0000000
--- a/public/assets/flash/player_flv.swf
+++ /dev/null
Binary files differ