This is a reimplementation of the multi-language support for the
custom_menu class. The menu items now accept the forth optional
parameter with the explicit list of languages the item is valid for. If
no languages are listed, the item is valid for any language. The caller
of the custom_menu constructor must provide the user's current language
or null if the multi-language should not be supported (all items are
valid for any language then, regardless the definition).
See the attached unit tests for the examples of usage.
This change includes:
(1) update deletes older versions of inconsistent rows
(2) update drops one index and replaces it with a new unique index
(3) fixed to ensure that when it decides whether to insert or update
it uses current database state and not cached info
(4) unit tests updated to test #3
Conflicts:
lib/db/upgrade.php
version.php
The new HTMLPurifier finally caches the schema properly eliminating both extra CPU cycles and disk writes. The repeated dir exists tests might cause problems on NFS shares.
The new class wraps some common coding patterns to install a language
pack via component_installer. Most notably it deals with the parental
dependency of the language packs.
The new class should also be the only place holding the information
about the location of language packs for the given Moodle version.