diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2014-02-21 15:57:10 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2014-02-21 15:57:10 +0100 |
commit | 99679d06884120c57f43b44e55e03595f1f87bed (patch) | |
tree | a3f2a1aa1afdaeca1386d0c6e8a75344fd2241fb /inc/3rdparty/htmlpurifier/HTMLPurifier.autoload.php | |
parent | 655214ab30ee84884dc408488b85586f36263fcb (diff) | |
parent | d3b47e94705e17b3ba3529cbb1dc6efe69c5d2b7 (diff) | |
download | wallabag-99679d06884120c57f43b44e55e03595f1f87bed.tar.gz wallabag-99679d06884120c57f43b44e55e03595f1f87bed.tar.zst wallabag-99679d06884120c57f43b44e55e03595f1f87bed.zip |
Merge pull request #481 from wallabag/dev1.5.2
1.5.2
Diffstat (limited to 'inc/3rdparty/htmlpurifier/HTMLPurifier.autoload.php')
-rw-r--r-- | inc/3rdparty/htmlpurifier/HTMLPurifier.autoload.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/inc/3rdparty/htmlpurifier/HTMLPurifier.autoload.php b/inc/3rdparty/htmlpurifier/HTMLPurifier.autoload.php new file mode 100644 index 00000000..63193c3e --- /dev/null +++ b/inc/3rdparty/htmlpurifier/HTMLPurifier.autoload.php | |||
@@ -0,0 +1,27 @@ | |||
1 | <?php | ||
2 | |||
3 | /** | ||
4 | * @file | ||
5 | * Convenience file that registers autoload handler for HTML Purifier. | ||
6 | * It also does some sanity checks. | ||
7 | */ | ||
8 | |||
9 | if (function_exists('spl_autoload_register') && function_exists('spl_autoload_unregister')) { | ||
10 | // We need unregister for our pre-registering functionality | ||
11 | HTMLPurifier_Bootstrap::registerAutoload(); | ||
12 | if (function_exists('__autoload')) { | ||
13 | // Be polite and ensure that userland autoload gets retained | ||
14 | spl_autoload_register('__autoload'); | ||
15 | } | ||
16 | } elseif (!function_exists('__autoload')) { | ||
17 | function __autoload($class) | ||
18 | { | ||
19 | return HTMLPurifier_Bootstrap::autoload($class); | ||
20 | } | ||
21 | } | ||
22 | |||
23 | if (ini_get('zend.ze1_compatibility_mode')) { | ||
24 | trigger_error("HTML Purifier is not compatible with zend.ze1_compatibility_mode; please turn it off", E_USER_ERROR); | ||
25 | } | ||
26 | |||
27 | // vim: et sw=4 sts=4 | ||