From adf17b677edeb2387671f6a0f12123e7497b5938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sun, 18 Jan 2015 20:07:46 +0100 Subject: remove 3rd libraries --- .../ConfigSchema/Builder/ConfigSchema.php | 48 ------- .../HTMLPurifier/ConfigSchema/Builder/Xml.php | 144 --------------------- 2 files changed, 192 deletions(-) delete mode 100644 inc/3rdparty/htmlpurifier/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php delete mode 100644 inc/3rdparty/htmlpurifier/HTMLPurifier/ConfigSchema/Builder/Xml.php (limited to 'inc/3rdparty/htmlpurifier/HTMLPurifier/ConfigSchema/Builder') diff --git a/inc/3rdparty/htmlpurifier/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php b/inc/3rdparty/htmlpurifier/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php deleted file mode 100644 index 1174575e..00000000 --- a/inc/3rdparty/htmlpurifier/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php +++ /dev/null @@ -1,48 +0,0 @@ -directives as $d) { - $schema->add( - $d->id->key, - $d->default, - $d->type, - $d->typeAllowsNull - ); - if ($d->allowed !== null) { - $schema->addAllowedValues( - $d->id->key, - $d->allowed - ); - } - foreach ($d->aliases as $alias) { - $schema->addAlias( - $alias->key, - $d->id->key - ); - } - if ($d->valueAliases !== null) { - $schema->addValueAliases( - $d->id->key, - $d->valueAliases - ); - } - } - $schema->postProcess(); - return $schema; - } -} - -// vim: et sw=4 sts=4 diff --git a/inc/3rdparty/htmlpurifier/HTMLPurifier/ConfigSchema/Builder/Xml.php b/inc/3rdparty/htmlpurifier/HTMLPurifier/ConfigSchema/Builder/Xml.php deleted file mode 100644 index 0d00bf1d..00000000 --- a/inc/3rdparty/htmlpurifier/HTMLPurifier/ConfigSchema/Builder/Xml.php +++ /dev/null @@ -1,144 +0,0 @@ -startElement('div'); - - $purifier = HTMLPurifier::getInstance(); - $html = $purifier->purify($html); - $this->writeAttribute('xmlns', 'http://www.w3.org/1999/xhtml'); - $this->writeRaw($html); - - $this->endElement(); // div - } - - /** - * @param mixed $var - * @return string - */ - protected function export($var) - { - if ($var === array()) { - return 'array()'; - } - return var_export($var, true); - } - - /** - * @param HTMLPurifier_ConfigSchema_Interchange $interchange - */ - public function build($interchange) - { - // global access, only use as last resort - $this->interchange = $interchange; - - $this->setIndent(true); - $this->startDocument('1.0', 'UTF-8'); - $this->startElement('configdoc'); - $this->writeElement('title', $interchange->name); - - foreach ($interchange->directives as $directive) { - $this->buildDirective($directive); - } - - if ($this->namespace) { - $this->endElement(); - } // namespace - - $this->endElement(); // configdoc - $this->flush(); - } - - /** - * @param HTMLPurifier_ConfigSchema_Interchange_Directive $directive - */ - public function buildDirective($directive) - { - // Kludge, although I suppose having a notion of a "root namespace" - // certainly makes things look nicer when documentation is built. - // Depends on things being sorted. - if (!$this->namespace || $this->namespace !== $directive->id->getRootNamespace()) { - if ($this->namespace) { - $this->endElement(); - } // namespace - $this->namespace = $directive->id->getRootNamespace(); - $this->startElement('namespace'); - $this->writeAttribute('id', $this->namespace); - $this->writeElement('name', $this->namespace); - } - - $this->startElement('directive'); - $this->writeAttribute('id', $directive->id->toString()); - - $this->writeElement('name', $directive->id->getDirective()); - - $this->startElement('aliases'); - foreach ($directive->aliases as $alias) { - $this->writeElement('alias', $alias->toString()); - } - $this->endElement(); // aliases - - $this->startElement('constraints'); - if ($directive->version) { - $this->writeElement('version', $directive->version); - } - $this->startElement('type'); - if ($directive->typeAllowsNull) { - $this->writeAttribute('allow-null', 'yes'); - } - $this->text($directive->type); - $this->endElement(); // type - if ($directive->allowed) { - $this->startElement('allowed'); - foreach ($directive->allowed as $value => $x) { - $this->writeElement('value', $value); - } - $this->endElement(); // allowed - } - $this->writeElement('default', $this->export($directive->default)); - $this->writeAttribute('xml:space', 'preserve'); - if ($directive->external) { - $this->startElement('external'); - foreach ($directive->external as $project) { - $this->writeElement('project', $project); - } - $this->endElement(); - } - $this->endElement(); // constraints - - if ($directive->deprecatedVersion) { - $this->startElement('deprecated'); - $this->writeElement('version', $directive->deprecatedVersion); - $this->writeElement('use', $directive->deprecatedUse->toString()); - $this->endElement(); // deprecated - } - - $this->startElement('description'); - $this->writeHTMLDiv($directive->description); - $this->endElement(); // description - - $this->endElement(); // directive - } -} - -// vim: et sw=4 sts=4 -- cgit v1.2.3