From a75e4c6b7cd11826e9547d4e2c6cea125fa49a54 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Thu, 15 May 2008 05:24:34 +0000 Subject: [PATCH] [2.1.4] [MFH] getInstance -> instance from r1689 git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/branches/php4@1720 48356398-32a2-884e-a903-53898d9a118a --- NEWS | 1 + library/HTMLPurifier.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 5722b534..c1a3ce7e 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,7 @@ ERRATA on the same element without emitting errors. - Iconv uses set_error_handler instead of shut-up operator - Add protection against imagecrash attack with CSS height/width +- HTMLPurifier::getInstance() renamed to HTMLPurifier::instance() for consistency 2.1.3, released 2007-11-05 ! tests/multitest.php allows you to test multiple versions by running diff --git a/library/HTMLPurifier.php b/library/HTMLPurifier.php index e9dfe5f4..2f622c79 100644 --- a/library/HTMLPurifier.php +++ b/library/HTMLPurifier.php @@ -213,7 +213,7 @@ class HTMLPurifier * @param $prototype Optional prototype HTMLPurifier instance to * overload singleton with. */ - function &getInstance($prototype = null) { + function &instance($prototype = null) { static $htmlpurifier; if (!$htmlpurifier || $prototype) { if (is_a($prototype, 'HTMLPurifier')) { @@ -227,6 +227,9 @@ class HTMLPurifier return $htmlpurifier; } + function &getInstance($prototype = null) { + return HTMLPurifier::instance($prototype); + } }