MDL-39023 Make get_language_dependencies() aware of circular dependency risk
commita82871d4f79f727b9edd203ca8348ec16981672c
authorDavid Mudrák <david@moodle.com>
Mon, 8 Apr 2013 12:26:23 +0000 (8 14:26 +0200)
committerDavid Mudrák <david@moodle.com>
Mon, 8 Apr 2013 13:02:59 +0000 (8 15:02 +0200)
treec3ed488f287d09d553f4df81f2e6613605da7ecf
parent7d253e09771d30045bcd9699e30ee6cf70336f90
MDL-39023 Make get_language_dependencies() aware of circular dependency risk

The patch reimplements the core_string_manager::get_language_dependencies()
so that potentially mis-configured language packs with circular
dependencies or self dependency do not make the site unavailable.
Unit tests for the expected behaviour are added.
12 files changed:
lib/moodlelib.php
lib/tests/fixtures/langtest/aa/langconfig.php [new file with mode: 0644]
lib/tests/fixtures/langtest/bb/langconfig.php [new file with mode: 0644]
lib/tests/fixtures/langtest/bc/langconfig.php [new file with mode: 0644]
lib/tests/fixtures/langtest/cda/langconfig.php [new file with mode: 0644]
lib/tests/fixtures/langtest/cdb/langconfig.php [new file with mode: 0644]
lib/tests/fixtures/langtest/cdc/langconfig.php [new file with mode: 0644]
lib/tests/fixtures/langtest/de/langconfig.php [new file with mode: 0644]
lib/tests/fixtures/langtest/de_du/langconfig.php [new file with mode: 0644]
lib/tests/fixtures/langtest/de_kids/langconfig.php [new file with mode: 0644]
lib/tests/fixtures/langtest/sd/langconfig.php [new file with mode: 0644]
lib/tests/string_test.php [new file with mode: 0644]