0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-22 16:31:53 +00:00

Allow for users to load Language class files themselves. Messages are still HTML Purifier dependent; we need to figure out a way around that.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1725 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2008-05-15 23:22:34 +00:00
parent 86b1da9b6f
commit ef6a1c9274

View File

@ -100,7 +100,7 @@ class HTMLPurifier_LanguageFactory
} else { } else {
$class = 'HTMLPurifier_Language_' . $pcode; $class = 'HTMLPurifier_Language_' . $pcode;
$file = $this->dir . '/Language/classes/' . $code . '.php'; $file = $this->dir . '/Language/classes/' . $code . '.php';
if (file_exists($file) && class_exists($class)) { if (file_exists($file) || class_exists($class, false)) {
$lang = new $class($config, $context); $lang = new $class($config, $context);
} else { } else {
// Go fallback // Go fallback