Commit 008c42c5 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic
Browse files

Bug 1515899: Added new Glogster iframe source in upgrade

behatnotneeded

Change-Id: I8f36fb267bfbd1a910e0c7f092c0e4cfe490ecdb
parent 46c07292
......@@ -4698,5 +4698,15 @@ function xmldb_core_upgrade($oldversion=0) {
}
}
if ($oldversion < 2016090500) {
log_debug('Add iframe url in iframe_source table for glogster educational new url pattern');
delete_records('iframe_source', 'prefix', 'edu.glogster.com/glog/');
delete_records('iframe_source', 'prefix', 'edu.glogster.com//glog/');
if (!get_field('iframe_source', 'prefix', 'prefix', 'edu.glogster.com//?glog/')) {
insert_record('iframe_source', (object) array('prefix' => 'edu.glogster.com//?glog/', 'name' => 'Glogster'));
}
update_safe_iframe_regex();
}
return $status;
}
......@@ -1367,7 +1367,7 @@ function update_safe_iframe_regex() {
// what they're doing, and need something fancy, can always
// override this in config.php.
foreach ($prefixes as $key => $r) {
if (!preg_match('/^[a-zA-Z0-9\/\._-]+$/', $r)) {
if (!preg_match('/^[\?a-zA-Z0-9\/\._-]+$/', $r)) {
throw new SystemException('Invalid site passed to update_safe_iframe_regex');
}
if (substr($r, -1) == '/') {
......
......@@ -16,7 +16,7 @@ $config = new stdClass();
// See https://wiki.mahara.org/wiki/Developer_Area/Version_Numbering_Policy
// For upgrades on stable branches, increment the version by one. On master, use the date.
$config->version = 2016090200;
$config->version = 2016090500;
$config->series = '17.04';
$config->release = '17.04dev';
$config->minupgradefrom = 2012080604;
......
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