1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-03 12:47:56 +02:00

[3.1.0] Remove multi-description functionality as well as file detection.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1525 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-01-27 20:21:31 +00:00
parent 3baf1774b2
commit a74a590f1c
6 changed files with 78 additions and 189 deletions

View File

@@ -11,16 +11,16 @@ class HTMLPurifier_ConfigDef_Directive extends HTMLPurifier_ConfigDef
public function __construct(
$type = null,
$descriptions = null,
$description = null,
$allow_null = null,
$allowed = null,
$aliases = null
) {
if ( $type !== null) $this->type = $type;
if ($descriptions !== null) $this->descriptions = $descriptions;
if ( $allow_null !== null) $this->allow_null = $allow_null;
if ( $allowed !== null) $this->allowed = $allowed;
if ( $aliases !== null) $this->aliases = $aliases;
if ( $type !== null) $this->type = $type;
if ($description !== null) $this->description = $description;
if ( $allow_null !== null) $this->allow_null = $allow_null;
if ( $allowed !== null) $this->allowed = $allowed;
if ( $aliases !== null) $this->aliases = $aliases;
}
/**
@@ -38,10 +38,9 @@ class HTMLPurifier_ConfigDef_Directive extends HTMLPurifier_ConfigDef
public $type = 'mixed';
/**
* Plaintext descriptions of the configuration entity is. Organized by
* file and line number, so multiple descriptions are allowed.
* Plaintext description of the configuration entity is.
*/
public $descriptions = array();
public $description = null;
/**
* Is null allowed? Has no effect for mixed type.
@@ -65,13 +64,5 @@ class HTMLPurifier_ConfigDef_Directive extends HTMLPurifier_ConfigDef
*/
public $directiveAliases = array();
/**
* Adds a description to the array
*/
public function addDescription($file, $line, $description) {
if (!isset($this->descriptions[$file])) $this->descriptions[$file] = array();
$this->descriptions[$file][$line] = $description;
}
}