CONTRIB-4741 :: Error with shortlabels when restoring old backups

Signed-off-by: Joseph Rézeau <moodle@rezeau.org>
CONTRIB-4745 :: Images and media not correctly displayed on some pages

Signed-off-by: Joseph Rézeau <moodle@rezeau.org>
CONTRIB-4745 :: a better fix, compatible with moodle 2.6

Signed-off-by: Joseph Rézeau <moodle@rezeau.org>
Merge branch 'MOODLE_25_STABLE' into MOODLE_25_BFC