Consolidate the iframe sources code
Bug #1513276 reported by
Robert Lyon
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Robert Lyon |
Bug Description
Currently we do a bunch of different things to add allowed iframe sources code to the system when we install/upgrade a site
We need to make it one way only
Notes:
lib/upgrade.php, core_postinst(), has a hard-coded list of allowed iframe sources
if you add the youtube-no-iframes one there, can you also move the prezi one there, and take it out from blocktype/
Changed in mahara: | |
status: | In Progress → Confirmed |
milestone: | 16.04.0 → 16.10.0 |
Changed in mahara: | |
milestone: | 16.10.0 → 16.10.1 |
Changed in mahara: | |
milestone: | 16.10.1 → 17.04.0 |
Changed in mahara: | |
milestone: | 17.04.0 → 17.10.0 |
Changed in mahara: | |
status: | Confirmed → In Progress |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
So, currently iframe sources are set up at install time by a list in core_postinst().
Except the prezi one, which was added later and is installed via the postinst() method of the externalvideo blocktype.
And the youtube- nocookie. com one was added to the externalvideo blocktype *upgrade*, but not to either installer.
It's not great that these things are scattered everywhere, because it makes it hard for devs to know where to look when they're doing something as simple as adding a new allowed iframe source. Technically speaking, allowed iframe sources are not the domain of *any* specific plugin. They're used by everything that uses TinyMCE, as well as the externalvideo block (and maybe some other places?). I guess we could make them into a dependency of pieforms, or make them into their own module.
But it would be a good (easy) start at least, if we put them all into the externalvideo postinst, or into core_postinst().