diff --git a/filter.php b/filter.php index 88efd51..d944a37 100644 --- a/filter.php +++ b/filter.php @@ -105,10 +105,6 @@ public function filter($text, array $options = array()) { $search = '/]*href="(https?:\/\/(www\.)?)(issuu\.com)\/(.*?)"(.*?)>(.*?)<\/a>/is'; $newtext = preg_replace_callback($search, 'filter_oembed_issuucallback', $newtext); } - if (get_config('filter_oembed', 'screenr')) { - $search = '/]*href="(https?:\/\/(www\.)?)(screenr\.com)\/(.*?)"(.*?)>(.*?)<\/a>/is'; - $newtext = preg_replace_callback($search, 'filter_oembed_screenrcallback', $newtext); - } if (get_config('filter_oembed', 'soundcloud')) { $search = '/]*href="(https?:\/\/(www\.)?)(soundcloud\.com)\/(.*?)"(.*?)>(.*?)<\/a>/is'; $newtext = preg_replace_callback($search, 'filter_oembed_soundcloudcallback', $newtext); @@ -266,19 +262,6 @@ function filter_oembed_issuucallback($link) { return $json === null ? '

'. get_string('connection_error', 'filter_oembed') .'

' : $json['html']; } -/** - * Looks for links pointing to Screenr content and processes them. - * - * @param $link HTML tag containing a link - * @return string HTML content after processing. - */ -function filter_oembed_screenrcallback($link) { - global $CFG; - $url = "http://www.screenr.com/api/oembed.json?url=".trim($link[1]).trim($link[3]).'/'.trim($link[4]).'&maxwidth=480&maxheight=270'; - $json = filter_oembed_curlcall($url); - return filter_oembed_vidembed($json); -} - /** * Looks for links pointing to SoundCloud content and processes them. * diff --git a/lang/en/filter_oembed.php b/lang/en/filter_oembed.php index 24995ce..8ece8a7 100644 --- a/lang/en/filter_oembed.php +++ b/lang/en/filter_oembed.php @@ -32,7 +32,6 @@ $string['slideshare'] = 'SlideShare'; $string['officemix'] = 'Office Mix'; $string['issuu'] = 'Issuu'; -$string['screenr'] = 'Screenr'; $string['soundcloud'] = 'SoundCloud'; $string['pollev'] = 'Poll Everywhere'; $string['sway'] = 'Sway'; diff --git a/settings.php b/settings.php index a8b5cf8..a8f01fb 100644 --- a/settings.php +++ b/settings.php @@ -39,8 +39,6 @@ $settings->add($item); $item = new admin_setting_configselect('filter_oembed/officemix', get_string('officemix', 'filter_oembed'), '', 1, $torf); $settings->add($item); - $item = new admin_setting_configselect('filter_oembed/screenr', get_string('screenr', 'filter_oembed'), '', 1, $torf); - $settings->add($item); $item = new admin_setting_configselect('filter_oembed/issuu', get_string('issuu', 'filter_oembed'), '', 1, $torf); $settings->add($item); $item = new admin_setting_configselect('filter_oembed/soundcloud', get_string('soundcloud', 'filter_oembed'), '', 1, $torf); diff --git a/tests/filter_test.php b/tests/filter_test.php index 2e6d7a3..2c78d0c 100644 --- a/tests/filter_test.php +++ b/tests/filter_test.php @@ -58,11 +58,10 @@ public function test_filter() { $tedlink = '

Ted

'; $slidesharelink = '

slideshare

'; $issuulink = '

issuu

'; - $screenrlink = '

screenr

'; $polleverywherelink = '

'; $polleverywherelink .= '$popolleverywhere

'; - $filterinput = $souncloudlink.$youtubelink.$officemixlink.$vimeolink.$tedlink.$slidesharelink.$issuulink.$screenrlink; + $filterinput = $souncloudlink.$youtubelink.$officemixlink.$vimeolink.$tedlink.$slidesharelink.$issuulink; $filterinput .= $polleverywherelink; $filteroutput = $this->filter->filter($filterinput); @@ -94,9 +93,6 @@ public function test_filter() { $issuuoutput .= ''; $this->assertContains($issuuoutput, $filteroutput, 'Issuu filter fails'); - $screenroutput = ''; - $this->assertContains($screenroutput, $filteroutput, 'Screenr filter fails'); - $polleverywhereoutput = ''; $this->assertContains($polleverywhereoutput, $filteroutput, 'Poll everywhare filter fails');