Commit 86c3878d authored by Robert Lyon's avatar Robert Lyon
Browse files

Allowing for youtube-nocookie.com urls to work (Bug #1436841)



To test - see bug report

Change-Id: I74b9d35eb8be34af90ee46714f9b4ad19bc340d5
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 371490ae
......@@ -48,5 +48,11 @@ function xmldb_blocktype_externalvideo_upgrade($oldversion=0) {
update_safe_iframe_regex();
}
if ($oldversion < 2014030502) {
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();
}
return true;
}
......@@ -30,6 +30,10 @@ class Media_youtube implements MediaBase {
'match' => '#^https?://(www\.)?youtu\.be/([a-zA-Z0-9\-_+]*)#',
'url' => $this->httpstr . '://www.youtube.com/embed/$2',
),
array(
'match' => '#^https?://(www\.)?youtube\-nocookie\.com/embed/([a-zA-Z0-9\-_+]*)#',
'url' => $this->httpstr . '://www.youtube-nocookie.com/embed/$2',
),
);
}
......
......@@ -12,5 +12,5 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2014030500;
$config->release = '1.0.1';
$config->version = 2014030502;
$config->release = '1.0.3';
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