Commit 943ce498 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1513276: Fixing iframe source mistake



And adding info to help developers

behatnotneeded

Change-Id: Idebbf277cd37f4406874bddb66b4ffef71088750
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 67cfc92c
......@@ -48,7 +48,7 @@ function xmldb_blocktype_externalvideo_upgrade($oldversion=0) {
update_safe_iframe_regex();
}
if ($oldversion < 2014030502) {
if ($oldversion < 2017092500) {
ensure_record_exists('iframe_source_icon', (object) array('name' => 'Youtube [privacy mode]', 'domain' => 'www.youtube.com'), (object) array('name' => 'Youtube [privacy mode]', 'domain' => 'www.youtube.com'));
ensure_record_exists('iframe_source', (object) array('prefix' => 'www.youtube-nocookie.com/embed/', 'name' => 'Youtube [privacy mode]'), (object) array('prefix' => 'www.youtube-nocookie.com/embed/', 'name' => 'Youtube [privacy mode]'));
update_safe_iframe_regex();
......
......@@ -443,6 +443,8 @@ class PluginBlocktypeExternalvideo extends MaharaCoreBlocktype {
if ($prevversion == 0) {
ensure_record_exists('iframe_source_icon', (object) array('name' => 'Prezi', 'domain' => 'prezi.com'), (object) array('name' => 'Prezi', 'domain' => 'prezi.com'));
ensure_record_exists('iframe_source', (object) array('prefix' => 'prezi.com/embed/', 'name' => 'Prezi'), (object) array('prefix' => 'prezi.com/embed/', 'name' => 'Prezi'));
ensure_record_exists('iframe_source_icon', (object) array('name' => 'Youtube [privacy mode]', 'domain' => 'www.youtube.com'), (object) array('name' => 'Youtube [privacy mode]', 'domain' => 'www.youtube.com'));
ensure_record_exists('iframe_source', (object) array('prefix' => 'www.youtube-nocookie.com/embed/', 'name' => 'Youtube [privacy mode]'), (object) array('prefix' => 'www.youtube-nocookie.com/embed/', 'name' => 'Youtube [privacy mode]'));
update_safe_iframe_regex();
}
}
......
......@@ -13,5 +13,5 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2015112400;
$config->release = '1.1.0';
$config->version = 2017092500;
$config->release = '1.2.0';
......@@ -692,6 +692,8 @@ function core_postinst() {
reload_html_filters();
// Default set of sites from which iframe content can be embedded
// See also the postinst() function in plugins for other valid iframes
// by searching for 'iframe_source_icon'
$iframesources = array(
'www.youtube.com/embed/' => 'YouTube',
'player.vimeo.com/video/' => 'Vimeo',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment