1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-02 04:10:25 +02:00

[2.1.4] [MFH] getInstance -> instance from r1689

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/branches/php4@1720 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-05-15 05:24:34 +00:00
parent e7fa8cbdd5
commit a75e4c6b7c
2 changed files with 5 additions and 1 deletions

1
NEWS
View File

@@ -29,6 +29,7 @@ ERRATA
on the same element without emitting errors. on the same element without emitting errors.
- Iconv uses set_error_handler instead of shut-up operator - Iconv uses set_error_handler instead of shut-up operator
- Add protection against imagecrash attack with CSS height/width - Add protection against imagecrash attack with CSS height/width
- HTMLPurifier::getInstance() renamed to HTMLPurifier::instance() for consistency
2.1.3, released 2007-11-05 2.1.3, released 2007-11-05
! tests/multitest.php allows you to test multiple versions by running ! tests/multitest.php allows you to test multiple versions by running

View File

@@ -213,7 +213,7 @@ class HTMLPurifier
* @param $prototype Optional prototype HTMLPurifier instance to * @param $prototype Optional prototype HTMLPurifier instance to
* overload singleton with. * overload singleton with.
*/ */
function &getInstance($prototype = null) { function &instance($prototype = null) {
static $htmlpurifier; static $htmlpurifier;
if (!$htmlpurifier || $prototype) { if (!$htmlpurifier || $prototype) {
if (is_a($prototype, 'HTMLPurifier')) { if (is_a($prototype, 'HTMLPurifier')) {
@@ -227,6 +227,9 @@ class HTMLPurifier
return $htmlpurifier; return $htmlpurifier;
} }
function &getInstance($prototype = null) {
return HTMLPurifier::instance($prototype);
}
} }