Commit a4c1a75d authored by Ghada El-Zoghbi's avatar Ghada El-Zoghbi
Browse files

Bug #1636087: Update Glogster's iframe URL only if its icon record was not deleted.

Administrators may have removed the Glogster iframe.
Do not force an insert of the iframe and update it only if the admin still allow it.

behatnotneeded

Change-Id: I46f23cd01f86e72c435d5a456e3e56cd53f18bd0
parent d1fe054a
......@@ -4702,7 +4702,9 @@ function xmldb_core_upgrade($oldversion=0) {
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/')) {
if (!get_field('iframe_source', 'prefix', 'prefix', 'edu.glogster.com//?glog/') &&
get_field('iframe_source_icon', 'name', 'name', 'Glogster')) {
// Only insert the new Gloster URL if the icon has not been deleted by the user.
insert_record('iframe_source', (object) array('prefix' => 'edu.glogster.com//?glog/', 'name' => 'Glogster'));
}
update_safe_iframe_regex();
......
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