]> git.mjollnir.org Git - moodle.git/commit
filters: MDL-17684 Look for the filter name in filter_myfilter.php first.
authortjhunt <tjhunt>
Mon, 30 Mar 2009 08:33:13 +0000 (08:33 +0000)
committertjhunt <tjhunt>
Mon, 30 Mar 2009 08:33:13 +0000 (08:33 +0000)
commitb810a4d3c9099b4a22eee2fe4872ec78255850f4
tree0b07285f22014bfbeda1ca5bb6bdcaa89be84070
parentd6cbe5f54630513c0ca829340e0d7450b896270d
filters: MDL-17684 Look for the filter name in filter_myfilter.php first.

This makes filters more plugginable, becuase with this lang file name, get_string will look for the filter name in filter/myfilter/lang/en_utf8/filter_myfilter.php.

To do this, there is a new function filter_get_name in filterlib that contains the logic.

Also, a new function filter_get_all_installed to replace the logic for getting all filters that was duplicated in three places.

filter_get_name no longer does such a nice fall-back if the name is missing, to encourage people to supply the right string. The fallback now looks like '[[filtername]] (filter/tidy)'.
admin/settings/plugins.php
lang/en_utf8/filter_tidy.php [new file with mode: 0644]
lib/adminlib.php
lib/filterlib.php
lib/moodlelib.php