diff --git a/.gitignore b/.gitignore
index 440b0331b..d7a87ccdd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,8 +5,8 @@
!.git*
!.vagrant-puppet/*
-# Exclude enabled modules
-config/enabledModules/
-
# Exclude application log files
var/log/*
+
+# Exclude symlink you need for packaging
+/debian
diff --git a/application/clicommands/WebCommand.php b/application/clicommands/WebCommand.php
index 5d9b20c64..12ed9e1a4 100644
--- a/application/clicommands/WebCommand.php
+++ b/application/clicommands/WebCommand.php
@@ -47,7 +47,7 @@ class WebCommand extends Command
readlink('/proc/self/exe'),
$socket,
$basedir,
- ICINGA_LIBDIR . '/Icinga/Application/webrouter.php'
+ Icinga::app()->getLibraryDir('/Icinga/Application/webrouter.php')
);
// TODO: Store webserver log, switch uid, log index.php includes, pid file
diff --git a/application/controllers/AuthenticationController.php b/application/controllers/AuthenticationController.php
index 27a9ae93b..b0d93ddf0 100644
--- a/application/controllers/AuthenticationController.php
+++ b/application/controllers/AuthenticationController.php
@@ -6,7 +6,7 @@
use Icinga\Authentication\Backend\AutoLoginBackend;
use Icinga\Web\Controller\ActionController;
-use Icinga\Form\Authentication\LoginForm;
+use Icinga\Forms\Authentication\LoginForm;
use Icinga\Authentication\AuthChain;
use Icinga\Application\Config;
use Icinga\Application\Logger;
diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php
index a681c4255..11d011bc0 100644
--- a/application/controllers/ConfigController.php
+++ b/application/controllers/ConfigController.php
@@ -8,11 +8,11 @@ use Icinga\Application\Modules\Module;
use Icinga\Web\Widget;
use Icinga\Application\Icinga;
use Icinga\Application\Config;
-use Icinga\Form\Config\GeneralConfigForm;
-use Icinga\Form\Config\AuthenticationBackendReorderForm;
-use Icinga\Form\Config\AuthenticationBackendConfigForm;
-use Icinga\Form\Config\ResourceConfigForm;
-use Icinga\Form\ConfirmRemovalForm;
+use Icinga\Forms\Config\GeneralConfigForm;
+use Icinga\Forms\Config\AuthenticationBackendReorderForm;
+use Icinga\Forms\Config\AuthenticationBackendConfigForm;
+use Icinga\Forms\Config\ResourceConfigForm;
+use Icinga\Forms\ConfirmRemovalForm;
use Icinga\Data\ResourceFactory;
diff --git a/application/controllers/DashboardController.php b/application/controllers/DashboardController.php
index 51435d727..d357231ca 100644
--- a/application/controllers/DashboardController.php
+++ b/application/controllers/DashboardController.php
@@ -8,7 +8,7 @@ use Icinga\Exception\ConfigurationError;
use Icinga\Exception\IcingaException;
use Icinga\Exception\NotReadableError;
use Icinga\File\Ini\IniWriter;
-use Icinga\Form\Dashboard\AddUrlForm;
+use Icinga\Forms\Dashboard\AddUrlForm;
use Icinga\Web\Controller\ActionController;
use Icinga\Web\Url;
use Icinga\Web\Widget\Dashboard;
diff --git a/application/controllers/PreferenceController.php b/application/controllers/PreferenceController.php
index 442c27ba8..378a5aa34 100644
--- a/application/controllers/PreferenceController.php
+++ b/application/controllers/PreferenceController.php
@@ -6,7 +6,7 @@ use Icinga\Web\Controller\BasePreferenceController;
use Icinga\Web\Url;
use Icinga\Web\Widget\Tab;
use Icinga\Application\Config;
-use Icinga\Form\PreferenceForm;
+use Icinga\Forms\PreferenceForm;
use Icinga\Exception\ConfigurationError;
use Icinga\User\Preferences\PreferencesStore;
diff --git a/application/forms/Authentication/LoginForm.php b/application/forms/Authentication/LoginForm.php
index a48fc5afe..41107be18 100644
--- a/application/forms/Authentication/LoginForm.php
+++ b/application/forms/Authentication/LoginForm.php
@@ -2,7 +2,7 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form\Authentication;
+namespace Icinga\Forms\Authentication;
use Icinga\Web\Form;
use Icinga\Web\Url;
diff --git a/application/forms/Config/Authentication/AutologinBackendForm.php b/application/forms/Config/Authentication/AutologinBackendForm.php
index 0a53de6bd..1725ea3c9 100644
--- a/application/forms/Config/Authentication/AutologinBackendForm.php
+++ b/application/forms/Config/Authentication/AutologinBackendForm.php
@@ -2,7 +2,7 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form\Config\Authentication;
+namespace Icinga\Forms\Config\Authentication;
use Zend_Validate_Callback;
use Icinga\Web\Form;
diff --git a/application/forms/Config/Authentication/DbBackendForm.php b/application/forms/Config/Authentication/DbBackendForm.php
index 0ffaa2a1e..4cf015db8 100644
--- a/application/forms/Config/Authentication/DbBackendForm.php
+++ b/application/forms/Config/Authentication/DbBackendForm.php
@@ -2,12 +2,11 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form\Config\Authentication;
+namespace Icinga\Forms\Config\Authentication;
use Exception;
use Icinga\Application\Config;
use Icinga\Web\Form;
-use Icinga\Web\Request;
use Icinga\Data\ResourceFactory;
use Icinga\Authentication\Backend\DbUserBackend;
@@ -89,7 +88,7 @@ class DbBackendForm extends Form
*
* @see Form::onSuccess()
*/
- public function onSuccess(Request $request)
+ public function onSuccess()
{
if (false === static::isValidAuthenticationBackend($this)) {
return false;
diff --git a/application/forms/Config/Authentication/LdapBackendForm.php b/application/forms/Config/Authentication/LdapBackendForm.php
index 84298e3c6..3e5c2b305 100644
--- a/application/forms/Config/Authentication/LdapBackendForm.php
+++ b/application/forms/Config/Authentication/LdapBackendForm.php
@@ -2,12 +2,11 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form\Config\Authentication;
+namespace Icinga\Forms\Config\Authentication;
use Exception;
use Icinga\Application\Config;
use Icinga\Web\Form;
-use Icinga\Web\Request;
use Icinga\Data\ResourceFactory;
use Icinga\Exception\AuthenticationException;
use Icinga\Authentication\Backend\LdapUserBackend;
@@ -119,7 +118,7 @@ class LdapBackendForm extends Form
*
* @see Form::onSuccess()
*/
- public function onSuccess(Request $request)
+ public function onSuccess()
{
if (false === static::isValidAuthenticationBackend($this)) {
return false;
diff --git a/application/forms/Config/AuthenticationBackendConfigForm.php b/application/forms/Config/AuthenticationBackendConfigForm.php
index 33e0b1a3a..c21ccf8f2 100644
--- a/application/forms/Config/AuthenticationBackendConfigForm.php
+++ b/application/forms/Config/AuthenticationBackendConfigForm.php
@@ -2,19 +2,18 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form\Config;
+namespace Icinga\Forms\Config;
use InvalidArgumentException;
-use Icinga\Web\Request;
-use Icinga\Form\ConfigForm;
+use Icinga\Forms\ConfigForm;
use Icinga\Web\Notification;
use Icinga\Application\Config;
use Icinga\Application\Platform;
use Icinga\Data\ResourceFactory;
use Icinga\Exception\ConfigurationError;
-use Icinga\Form\Config\Authentication\DbBackendForm;
-use Icinga\Form\Config\Authentication\LdapBackendForm;
-use Icinga\Form\Config\Authentication\AutologinBackendForm;
+use Icinga\Forms\Config\Authentication\DbBackendForm;
+use Icinga\Forms\Config\Authentication\LdapBackendForm;
+use Icinga\Forms\Config\Authentication\AutologinBackendForm;
class AuthenticationBackendConfigForm extends ConfigForm
{
@@ -192,7 +191,7 @@ class AuthenticationBackendConfigForm extends ConfigForm
*
* @see Form::onSuccess()
*/
- public function onSuccess(Request $request)
+ public function onSuccess()
{
if (($el = $this->getElement('force_creation')) === null || false === $el->isChecked()) {
$backendForm = $this->getBackendForm($this->getElement('type')->getValue());
@@ -202,7 +201,7 @@ class AuthenticationBackendConfigForm extends ConfigForm
}
}
- $authBackend = $request->getQuery('auth_backend');
+ $authBackend = $this->request->getQuery('auth_backend');
try {
if ($authBackend === null) { // create new backend
$this->add($this->getValues());
@@ -230,9 +229,9 @@ class AuthenticationBackendConfigForm extends ConfigForm
*
* @throws ConfigurationError In case the backend name is missing in the request or is invalid
*/
- public function onRequest(Request $request)
+ public function onRequest()
{
- $authBackend = $request->getQuery('auth_backend');
+ $authBackend = $this->request->getQuery('auth_backend');
if ($authBackend !== null) {
if ($authBackend === '') {
throw new ConfigurationError(t('Authentication backend name missing'));
diff --git a/application/forms/Config/AuthenticationBackendReorderForm.php b/application/forms/Config/AuthenticationBackendReorderForm.php
index 3b5e70866..07200827a 100644
--- a/application/forms/Config/AuthenticationBackendReorderForm.php
+++ b/application/forms/Config/AuthenticationBackendReorderForm.php
@@ -2,12 +2,11 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form\Config;
+namespace Icinga\Forms\Config;
use InvalidArgumentException;
-use Icinga\Web\Request;
use Icinga\Web\Notification;
-use Icinga\Form\ConfigForm;
+use Icinga\Forms\ConfigForm;
class AuthenticationBackendReorderForm extends ConfigForm
{
@@ -30,17 +29,26 @@ class AuthenticationBackendReorderForm extends ConfigForm
return $this->config->keys();
}
+ /**
+ * @see Form::createElements()
+ */
+ public function createElements(array $formData)
+ {
+ // This adds just a dummy element to be able to utilize Form::getValue as part of onSuccess()
+ $this->addElement('hidden', 'backend_newpos');
+ }
+
/**
* Update the authentication backend order and save the configuration
*
* @see Form::onSuccess()
*/
- public function onSuccess(Request $request)
+ public function onSuccess()
{
- $formData = $this->getRequestData($request);
- if (isset($formData['backend_newpos'])) {
+ $newPosData = $this->getValue('backend_newpos');
+ if ($newPosData) {
$configForm = $this->getConfigForm();
- list($backendName, $position) = explode('|', $formData['backend_newpos'], 2);
+ list($backendName, $position) = explode('|', $newPosData, 2);
try {
if ($configForm->move($backendName, $position)->save()) {
diff --git a/application/forms/Config/General/ApplicationConfigForm.php b/application/forms/Config/General/ApplicationConfigForm.php
index bc236ae81..df8531250 100644
--- a/application/forms/Config/General/ApplicationConfigForm.php
+++ b/application/forms/Config/General/ApplicationConfigForm.php
@@ -2,7 +2,7 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form\Config\General;
+namespace Icinga\Forms\Config\General;
use DateTimeZone;
use Icinga\Application\Icinga;
diff --git a/application/forms/Config/General/LoggingConfigForm.php b/application/forms/Config/General/LoggingConfigForm.php
index bddb648cd..deed06011 100644
--- a/application/forms/Config/General/LoggingConfigForm.php
+++ b/application/forms/Config/General/LoggingConfigForm.php
@@ -2,7 +2,7 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form\Config\General;
+namespace Icinga\Forms\Config\General;
use Icinga\Application\Icinga;
use Icinga\Application\Logger;
diff --git a/application/forms/Config/GeneralConfigForm.php b/application/forms/Config/GeneralConfigForm.php
index 0b55704c2..2cb72e3a1 100644
--- a/application/forms/Config/GeneralConfigForm.php
+++ b/application/forms/Config/GeneralConfigForm.php
@@ -2,13 +2,12 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form\Config;
+namespace Icinga\Forms\Config;
-use Icinga\Web\Request;
use Icinga\Web\Notification;
-use Icinga\Form\ConfigForm;
-use Icinga\Form\Config\General\LoggingConfigForm;
-use Icinga\Form\Config\General\ApplicationConfigForm;
+use Icinga\Forms\ConfigForm;
+use Icinga\Forms\Config\General\LoggingConfigForm;
+use Icinga\Forms\Config\General\ApplicationConfigForm;
/**
* Form class for application-wide and logging specific settings
@@ -38,7 +37,7 @@ class GeneralConfigForm extends ConfigForm
/**
* @see Form::onSuccess()
*/
- public function onSuccess(Request $request)
+ public function onSuccess()
{
$sections = array();
foreach ($this->getValues() as $sectionAndPropertyName => $value) {
@@ -62,7 +61,7 @@ class GeneralConfigForm extends ConfigForm
/**
* @see Form::onRequest()
*/
- public function onRequest(Request $request)
+ public function onRequest()
{
$values = array();
foreach ($this->config as $section => $properties) {
diff --git a/application/forms/Config/Resource/DbResourceForm.php b/application/forms/Config/Resource/DbResourceForm.php
index 4c0ce7740..b1d54c704 100644
--- a/application/forms/Config/Resource/DbResourceForm.php
+++ b/application/forms/Config/Resource/DbResourceForm.php
@@ -2,13 +2,11 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form\Config\Resource;
+namespace Icinga\Forms\Config\Resource;
use Exception;
use Icinga\Application\Config;
use Icinga\Web\Form;
-use Icinga\Web\Request;
-use Icinga\Web\Form\Element\Number;
use Icinga\Data\ResourceFactory;
use Icinga\Application\Platform;
@@ -68,14 +66,13 @@ class DbResourceForm extends Form
)
);
$this->addElement(
- new Number(
- array(
- 'required' => true,
- 'name' => 'port',
- 'label' => t('Port'),
- 'description' => t('The port to use'),
- 'value' => 3306
- )
+ 'number',
+ 'port',
+ array(
+ 'required' => true,
+ 'label' => t('Port'),
+ 'description' => t('The port to use'),
+ 'value' => 3306
)
);
$this->addElement(
@@ -115,7 +112,7 @@ class DbResourceForm extends Form
*
* @see Form::onSuccess()
*/
- public function onSuccess(Request $request)
+ public function onSuccess()
{
if (false === static::isValidResource($this)) {
return false;
diff --git a/application/forms/Config/Resource/FileResourceForm.php b/application/forms/Config/Resource/FileResourceForm.php
index 2814e9a72..8e2920313 100644
--- a/application/forms/Config/Resource/FileResourceForm.php
+++ b/application/forms/Config/Resource/FileResourceForm.php
@@ -2,7 +2,7 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form\Config\Resource;
+namespace Icinga\Forms\Config\Resource;
use Icinga\Web\Form;
use Icinga\Web\Form\Validator\ReadablePathValidator;
diff --git a/application/forms/Config/Resource/LdapResourceForm.php b/application/forms/Config/Resource/LdapResourceForm.php
index cd482a7fb..6c29a09d6 100644
--- a/application/forms/Config/Resource/LdapResourceForm.php
+++ b/application/forms/Config/Resource/LdapResourceForm.php
@@ -2,13 +2,11 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form\Config\Resource;
+namespace Icinga\Forms\Config\Resource;
use Exception;
use Icinga\Application\Config;
use Icinga\Web\Form;
-use Icinga\Web\Request;
-use Icinga\Web\Form\Element\Number;
use Icinga\Data\ResourceFactory;
/**
@@ -49,14 +47,13 @@ class LdapResourceForm extends Form
)
);
$this->addElement(
- new Number(
- array(
- 'required' => true,
- 'name' => 'port',
- 'label' => t('Port'),
- 'description' => t('The port of the LDAP server to use for authentication'),
- 'value' => 389
- )
+ 'number',
+ 'port',
+ array(
+ 'required' => true,
+ 'label' => t('Port'),
+ 'description' => t('The port of the LDAP server to use for authentication'),
+ 'value' => 389
)
);
$this->addElement(
@@ -96,7 +93,7 @@ class LdapResourceForm extends Form
*
* @see Form::onSuccess()
*/
- public function onSuccess(Request $request)
+ public function onSuccess()
{
if (false === static::isValidResource($this)) {
return false;
diff --git a/application/forms/Config/Resource/LivestatusResourceForm.php b/application/forms/Config/Resource/LivestatusResourceForm.php
index 27925e370..e4dae844b 100644
--- a/application/forms/Config/Resource/LivestatusResourceForm.php
+++ b/application/forms/Config/Resource/LivestatusResourceForm.php
@@ -2,12 +2,11 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form\Config\Resource;
+namespace Icinga\Forms\Config\Resource;
use Exception;
use Icinga\Application\Config;
use Icinga\Web\Form;
-use Icinga\Web\Request;
use Icinga\Application\Icinga;
use Icinga\Data\ResourceFactory;
@@ -57,7 +56,7 @@ class LivestatusResourceForm extends Form
*
* @see Form::onSuccess()
*/
- public function onSuccess(Request $request)
+ public function onSuccess()
{
if (false === static::isValidResource($this)) {
return false;
diff --git a/application/forms/Config/ResourceConfigForm.php b/application/forms/Config/ResourceConfigForm.php
index a269885cf..d5faca1cd 100644
--- a/application/forms/Config/ResourceConfigForm.php
+++ b/application/forms/Config/ResourceConfigForm.php
@@ -2,16 +2,15 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form\Config;
+namespace Icinga\Forms\Config;
use InvalidArgumentException;
-use Icinga\Web\Request;
use Icinga\Web\Notification;
-use Icinga\Form\ConfigForm;
-use Icinga\Form\Config\Resource\DbResourceForm;
-use Icinga\Form\Config\Resource\FileResourceForm;
-use Icinga\Form\Config\Resource\LdapResourceForm;
-use Icinga\Form\Config\Resource\LivestatusResourceForm;
+use Icinga\Forms\ConfigForm;
+use Icinga\Forms\Config\Resource\DbResourceForm;
+use Icinga\Forms\Config\Resource\FileResourceForm;
+use Icinga\Forms\Config\Resource\LdapResourceForm;
+use Icinga\Forms\Config\Resource\LivestatusResourceForm;
use Icinga\Application\Platform;
use Icinga\Exception\ConfigurationError;
@@ -128,7 +127,7 @@ class ResourceConfigForm extends ConfigForm
*
* @see Form::onSuccess()
*/
- public function onSuccess(Request $request)
+ public function onSuccess()
{
if (($el = $this->getElement('force_creation')) === null || false === $el->isChecked()) {
$resourceForm = $this->getResourceForm($this->getElement('type')->getValue());
@@ -138,7 +137,7 @@ class ResourceConfigForm extends ConfigForm
}
}
- $resource = $request->getQuery('resource');
+ $resource = $this->request->getQuery('resource');
try {
if ($resource === null) { // create new resource
$this->add($this->getValues());
@@ -166,9 +165,9 @@ class ResourceConfigForm extends ConfigForm
*
* @throws ConfigurationError In case the backend name is missing in the request or is invalid
*/
- public function onRequest(Request $request)
+ public function onRequest()
{
- $resource = $request->getQuery('resource');
+ $resource = $this->request->getQuery('resource');
if ($resource !== null) {
if ($resource === '') {
throw new ConfigurationError(t('Resource name missing'));
diff --git a/application/forms/ConfigForm.php b/application/forms/ConfigForm.php
index d1f2ed1dd..fcf674cad 100644
--- a/application/forms/ConfigForm.php
+++ b/application/forms/ConfigForm.php
@@ -2,7 +2,7 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form;
+namespace Icinga\Forms;
use Exception;
use Icinga\Web\Form;
diff --git a/application/forms/ConfirmRemovalForm.php b/application/forms/ConfirmRemovalForm.php
index 86a2eb02a..02d7263df 100644
--- a/application/forms/ConfirmRemovalForm.php
+++ b/application/forms/ConfirmRemovalForm.php
@@ -2,7 +2,7 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form;
+namespace Icinga\Forms;
use Icinga\Web\Form;
diff --git a/application/forms/Dashboard/AddUrlForm.php b/application/forms/Dashboard/AddUrlForm.php
index 564ff3d7a..7f5a217d1 100644
--- a/application/forms/Dashboard/AddUrlForm.php
+++ b/application/forms/Dashboard/AddUrlForm.php
@@ -2,7 +2,7 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form\Dashboard;
+namespace Icinga\Forms\Dashboard;
use Icinga\Application\Config;
use Icinga\Web\Widget\Dashboard;
diff --git a/application/forms/LdapDiscoveryForm.php b/application/forms/LdapDiscoveryForm.php
index 88f30f2c1..9e5af79ac 100644
--- a/application/forms/LdapDiscoveryForm.php
+++ b/application/forms/LdapDiscoveryForm.php
@@ -1,13 +1,12 @@
addElement(
- new Note(
- 'additional_description',
- array(
- 'value' => t('No Ldap servers found on this domain.'
- . ' You can try to specify host and port and try again, or just skip this step and '
- . 'configure the server manually.'
- )
+ 'note',
+ 'additional_description',
+ array(
+ 'value' => t('No Ldap servers found on this domain.'
+ . ' You can try to specify host and port and try again, or just skip this step and '
+ . 'configure the server manually.'
)
)
);
diff --git a/application/forms/PreferenceForm.php b/application/forms/PreferenceForm.php
index 926d7a529..e3cfdf319 100644
--- a/application/forms/PreferenceForm.php
+++ b/application/forms/PreferenceForm.php
@@ -2,7 +2,7 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
-namespace Icinga\Form;
+namespace Icinga\Forms;
use Exception;
use DateTimeZone;
@@ -12,10 +12,8 @@ use Icinga\User\Preferences;
use Icinga\User\Preferences\PreferencesStore;
use Icinga\Util\TimezoneDetect;
use Icinga\Util\Translator;
-use Icinga\Web\Controller\ControllerTabCollector;
use Icinga\Web\Form;
use Icinga\Web\Notification;
-use Icinga\Web\Request;
use Icinga\Web\Session;
/**
@@ -86,7 +84,7 @@ class PreferenceForm extends Form
*
* @see Form::onSuccess()
*/
- public function onSuccess(Request $request)
+ public function onSuccess()
{
$this->preferences = new Preferences($this->store->load());
@@ -122,7 +120,7 @@ class PreferenceForm extends Form
*
* @see Form::onRequest()
*/
- public function onRequest(Request $request)
+ public function onRequest()
{
$auth = Manager::getInstance();
$values = $auth->getUser()->getPreferences()->get('icingaweb');
@@ -237,7 +235,7 @@ class PreferenceForm extends Form
if ($detect->success()) {
return $detect->getTimezoneName();
} else {
- return date_default_timezone_get();
+ return @date_default_timezone_get();
}
}
diff --git a/doc/container_component.md b/doc/container_component.md
deleted file mode 100644
index ed505f81b..000000000
--- a/doc/container_component.md
+++ /dev/null
@@ -1,198 +0,0 @@
-# The Container Component (app/container)
-
-The container component is the most basic building block for icingaweb. Even when displaying an empty controller,
-you always have at least two containers in your viewport which are implicitly created: The main and the detail container.
-
-Container handle the following tasks:
-
-* Updating the url part responsible for the container
-* Handling Url changes like they occur when the browser history is used by synchronizing their content with the
- associated Url part
-* Informing subcomponents about changes in the container
-
-
-## The Container Api
-
-You can find the sourcecode for containers along with jsdoc comments at *./public/js/icinga/components/container.js*.
-Here we will discuss the most important calls and their synopsis:
-
-### Accessing Containers:
-
-The container component returns a 'Container' object which allows you to access responsible containers for dom nodes via
-the following methods:
-
-* using `new Container($myDomNodes)` which returns a stateless container object wrapping the container responsible for
- the first node in $myDomNodes
-* using `Container.getMainContainer()` or `Container.getDetailContainer()` which remove the main or detail container
- (this one is stateful with a few notes, read on)
-
-**Note:** `new Container($('#icingamain')) != Container.getMainContainer()`, but
-`(new Container($('#icingamain'))).containerDom == Container.getMainContainer().containerDom`
-
-** Example #1 getting the container responsible for a dom node **
-
-**HTML**
-
-
-
- Some kind of node
-
-
-
- Some other kind of node
-
- Insert your lorem ipsum here
-
-
-
-
-
-**JS**:
-
- require(['jquery', 'app/container'], function($, Container) {
- var firstContainer = new Container($('.myNode')); // firstContainer wraps '#icingamain'
- var mainContainer = Container.getMainContainer(); // also wraps '#icingamain'
- var secondContainer = new Container($('.myNode p')); // #somecontainer is wrapped by secondContainer
-
- firstContainer.someProperty = 'What a nice property!';
- mainContainer.someState = 'I have some state';
- console.log(firstContainer.someProperty); // return 'What a nice property'
- console.log(main.someProperty); // return 'undefined'
- console.log(Container.getMainContainer().someState) // return 'I have some state' when page hasn't been refreshed
- });
-
-## Containers And The Browser Url
-
-As noted before (and indicated by the `getMainContainer()` and `getDetailContainer()` function), the main and detail
-container have a special role. Considering the following Url:
-
- http://my.monitoringhost.org/icingaweb/monitoring/list/host?page=4&detail=%2Fmonitoring%2Fshow%2Fhost%3Fhost%3Dlocalhost
-
-This URL displays the 4th page of your host list in the main container (monitoring/list/host?page=4) and the host information
-for localhost in the detail container (monitoring/show/host?host=localhost). When you split this Url up in logical pieces
-it looks like this:
-
- http://my.monitoringhost.org/icingaweb/monitoring/list/host?page=4&detail=%2Fmonitoring%2Fshow%2Fhost%3Fhost%3Dlocalhost
- \___________ _______________________/\_________ ______________/ \_ ____/\________________ _______________________/
- \/ \/ \/ \/
- 1. Base URL 2.Main container URL and Query 3.Detail param 4. Encoded detail URL and params
-
-1. **Base URL** : I don't think this needs much explanation.
-2. **Main container URL and query** : This is the *normal* part of your Url and denotes the controller route that is
- being displayed in your main container
-3. **Detail parameter**: This parameter will be ignored by the main container and used for rendering the detail container,
- if omitted there's simple no detail view to be displayed
-4 **Encoded detail URL**: The value of the "detail" parameter is the Url (without the base Url) that returns the content
- of the detail area
-
-
-### Updating A Container's Url
-
-If you want your container to display content from a different Url, you can use the *replaceDomFromUrl()* on your
-Container object:
-
-**Example #2 Updating A Containers URL**
-
-**HTML:**
-
-
-
-
-**JS:**
-
- // this loads the page with the new main container
- require(['jquery', 'app/container'], function($, Container) {
- new Container('#mainSub').replaceDomFormUrl('/another/url');
- }
-
- // this loads the page with the new detail container
- require(['jquery', 'app/container'], function($, Container) {
- new Container('#detailSub').replaceDomFormUrl('/another/url');
- }
-
- // this does NOT work:
- require(['jquery', 'app/container'], function($, Container) {
- Container.getMainContainer().replaceDomFormUrl('/another/url');
- // will never be reached due to a reload
- Container.getMainContainer().replaceDomFormUrl('/another/url2');
- }
-
- // this loads the page with both main and detail changed (this is rarely needed and should be avoided)
- require(['icinga', 'jquery', 'app/container'], function('Icinga', $, Container) {
- // it's better to use this:
- var mainContainer = Container.getMainContainer();
- var detailContainer = Container.getDetailContainer();
-
- mainContainer.updateContainerHref('/another/url'); // first update the main container href
- detailContainer.updateContainerHref('/another/url2'); // update the detail href
-
- var url = mainContainer.getContainerHref(detailContainer.getContainerHref()); // fetch the new url
- Icinga.replaceBodyFromUrl(url); // and update manual
- }
-
-This results in the URL changing to './another/url?detail=%2Fanother%2Fdetail%2Furl.
-The advantage of using a Container instance with the subelements (i.e. '\#mainSub') over calling getMain/DetailContainer
-directly is that you don't need to know in what container your view is displayed - when you move 'mainSub' into the
-detail container, the detail container would be updated afterwards.
-
-**NOTE**: You should read the '...' section in order to understand why you shouldn't do it like in this example
-
-### How container refresh states are handled
-
-If you refresh containers content (load url or replace dom), the container displaya a loading
-mask as default behaviour. To disable this mask and handle it yourself, you can register own events:
-
-**Example #3 Load indicator events**
-
- require(['icinga', 'jquery', 'app/container'], function('Icinga', $, Container) {
- var mainContainer = Container.getMainContainer();
-
- // Detach the default behaviour from container
- mainContainer.removeDefaultLoadIndicator();
-
- var showFunction = function() {
- console.log('container is loading');
- };
-
- var hideFunction = function() {
- console.log('container content refreshed');
- };
-
- // Install new handlers
- mainContainer.registerOnShowLoadIndicator(showFunction);
- mainContainer.registerOnHideLoadIndicator(hideFunction);
- };
-
-**Example #4 Use this for your components**
-
-Please have a look into [components documentation](components.md) for detailed information about components.
-
- define(['components/app/container', 'jquery', 'logging', 'URIjs/URI', 'URIjs/URITemplate'],
- function(Container, $, logger, URI) {
- "use strict";
-
- /**
- * Master/Detail grid component handling history, link behaviour, selection (@TODO 3788) and updates of
- * grids
- *
- * @param {HTMLElement} The outer element to apply the behaviour on
- */
- return function(gridDomNode) {
- /**
- * Constructor method for this component
- */
- this.construct = function(target) {
- // Container object for the component
- this.container = new Container(target);
-
- // Detach default handlers
- this.container.removeDefaultLoadIndicator();
- };
-
- this.construct(gridDomNode);
- };
- };
\ No newline at end of file
diff --git a/icingaweb2.spec b/icingaweb2.spec
index db0929f7b..9d9e11345 100644
--- a/icingaweb2.spec
+++ b/icingaweb2.spec
@@ -31,7 +31,7 @@
%define prefixdir %{_datadir}/%{name}
%define usermodparam -a -G
%define logdir %{_localstatedir}/log/%{name}
-%define docdir %{sharedir}/log
+%define docdir %{sharedir}/doc
%if "%{_vendor}" == "suse"
%define phpname php5
@@ -179,7 +179,8 @@ install -D -m0644 packages/rpm/etc/httpd/conf.d/icingaweb.conf %{buildroot}/%{ap
%{__mkdir} -p %{buildroot}/%{_sysconfdir}/%{name}/modules/monitoring
%{__mkdir} -p %{buildroot}/%{_sysconfdir}/%{name}/enabledModules
-%{__cp} -r application doc library modules public %{buildroot}/%{sharedir}/
+# make sure to install local icingacli for setup wizard token generation & webserver config
+%{__cp} -r application doc library modules public bin %{buildroot}/%{sharedir}/
## config
# authentication is db only
@@ -194,8 +195,8 @@ install -D -m0644 packages/rpm/etc/%{name}/modules/monitoring/instances.ini %{bu
ln -s %{sharedir}/modules/monitoring %{buildroot}/%{_sysconfdir}/%{name}/enabledModules/monitoring
## config
-# install icingacli
-install -D -m0755 packages/rpm/usr/bin/icingacli %{buildroot}/usr/bin/icingacli
+# symlink icingacli
+ln -sf %{buildroot}/%{sharedir}/bin/icingacli %{buildroot}/usr/bin/icingacli
%pre
# Add apacheuser in the icingacmd group
diff --git a/library/Icinga/Application/ApplicationBootstrap.php b/library/Icinga/Application/ApplicationBootstrap.php
index b61a3e3e8..1844486cb 100644
--- a/library/Icinga/Application/ApplicationBootstrap.php
+++ b/library/Icinga/Application/ApplicationBootstrap.php
@@ -13,7 +13,6 @@ use Icinga\Exception\NotReadableError;
use Icinga\Application\Logger;
use Icinga\Util\DateTimeFactory;
use Icinga\Util\Translator;
-use Icinga\Util\TimezoneDetect;
use Icinga\Exception\IcingaException;
/**
@@ -139,7 +138,6 @@ abstract class ApplicationBootstrap
$this->configDir = $canonical ? $canonical : $configDir;
$this->setupAutoloader();
- $this->setupZendAutoloader();
set_include_path(
implode(
@@ -277,6 +275,18 @@ abstract class ApplicationBootstrap
return $this->getDirWithSubDir($this->configDir, $subDir);
}
+ /**
+ * Get the Icinga library directory
+ *
+ * @param string $subDir Optional sub directory to get
+ *
+ * @return string
+ */
+ public function getLibraryDir($subDir = null)
+ {
+ return $this->getDirWithSubDir($this->libDir, $subDir);
+ }
+
/**
* Get the path to the bootstrapping directory
*
@@ -323,7 +333,7 @@ abstract class ApplicationBootstrap
/**
* Register the Zend Autoloader
*
- * @return self
+ * @return $this
*/
protected function setupZendAutoloader()
{
@@ -331,17 +341,12 @@ abstract class ApplicationBootstrap
\Zend_Loader_Autoloader::getInstance();
- // Unfortunately this is needed to get the Zend Plugin loader working:
- set_include_path(
- implode(
- PATH_SEPARATOR,
- array($this->libDir, get_include_path())
- )
+ \Zend_Paginator::addScrollingStylePrefixPath(
+ 'Icinga_Web_Paginator_ScrollingStyle_', $this->libDir . '/Icinga/Web/Paginator/ScrollingStyle'
);
return $this;
}
-
/**
* Setup module manager
*
diff --git a/library/Icinga/Application/EmbeddedWeb.php b/library/Icinga/Application/EmbeddedWeb.php
index 0dd8b5d5c..7ba2ba73e 100644
--- a/library/Icinga/Application/EmbeddedWeb.php
+++ b/library/Icinga/Application/EmbeddedWeb.php
@@ -27,7 +27,9 @@ class EmbeddedWeb extends ApplicationBootstrap
*/
protected function bootstrap()
{
- return $this->loadConfig()
+ return $this
+ ->setupZendAutoloader()
+ ->loadConfig()
->setupErrorHandling()
->setupTimezone()
->setupModuleManager()
diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php
index 461cec59a..443a39e32 100644
--- a/library/Icinga/Application/Modules/Module.php
+++ b/library/Icinga/Application/Modules/Module.php
@@ -763,7 +763,7 @@ class Module
$this->app->getLoader()->registerNamespace('Icinga\\Module\\' . $moduleName, $moduleLibraryDir);
if (is_dir($this->getFormDir())) {
$this->app->getLoader()->registerNamespace(
- 'Icinga\\Module\\' . $moduleName. '\\Form',
+ 'Icinga\\Module\\' . $moduleName. '\\Forms',
$this->getFormDir()
);
}
diff --git a/library/Icinga/Application/Web.php b/library/Icinga/Application/Web.php
index 06a37267d..f227df247 100644
--- a/library/Icinga/Application/Web.php
+++ b/library/Icinga/Application/Web.php
@@ -90,6 +90,7 @@ class Web extends ApplicationBootstrap
protected function bootstrap()
{
return $this
+ ->setupZendAutoloader()
->setupLogging()
->setupErrorHandling()
->loadConfig()
@@ -326,14 +327,14 @@ class Web extends ApplicationBootstrap
}
/**
- * Setup an autoloader namespace for Icinga\Form
+ * Setup an autoloader namespace for Icinga\Forms
*
* @return self
*/
private function setupFormNamespace()
{
$this->getLoader()->registerNamespace(
- 'Icinga\\Form',
+ 'Icinga\\Forms',
$this->getApplicationDir('forms')
);
return $this;
diff --git a/library/Icinga/Cli/Loader.php b/library/Icinga/Cli/Loader.php
index f0aa95499..655ef7c18 100644
--- a/library/Icinga/Cli/Loader.php
+++ b/library/Icinga/Cli/Loader.php
@@ -66,7 +66,7 @@ class Loader
public function __construct(App $app)
{
$this->app = $app;
- $this->coreAppDir = $app->getBaseDir('clicommands');
+ $this->coreAppDir = $app->getApplicationDir('clicommands');
}
/**
diff --git a/library/Icinga/Web/Form.php b/library/Icinga/Web/Form.php
index f315c264e..20484c33e 100644
--- a/library/Icinga/Web/Form.php
+++ b/library/Icinga/Web/Form.php
@@ -11,6 +11,7 @@ use Zend_View_Interface;
use Icinga\Application\Icinga;
use Icinga\Web\Form\Decorator\NoScriptApply;
use Icinga\Web\Form\Element\CsrfCounterMeasure;
+use Icinga\Web\Form\FormElement;
/**
* Base class for forms providing CSRF protection, confirmation logic and auto submission
@@ -36,6 +37,13 @@ class Form extends Zend_Form
*/
protected $created = false;
+ /**
+ * The request associated with this form
+ *
+ * @var Request
+ */
+ protected $request;
+
/**
* The callback to call instead of Form::onSuccess()
*
@@ -111,7 +119,7 @@ class Form extends Zend_Form
* Create a new form
*
* Accepts an additional option `onSuccess' which is a callback that is called instead of this
- * form's method. It is called using the following signature: (Request $request, Form $form).
+ * form's method. It is called using the following signature: (Form $form).
*
* @see Zend_Form::__construct()
*
@@ -355,11 +363,9 @@ class Form extends Zend_Form
*
* Intended to be implemented by concrete form classes. The base implementation returns always FALSE.
*
- * @param Request $request The valid request used to process this form
- *
* @return null|bool Return FALSE in case no redirect should take place
*/
- public function onSuccess(Request $request)
+ public function onSuccess()
{
return false;
}
@@ -368,10 +374,8 @@ class Form extends Zend_Form
* Perform actions when no form dependent data was sent
*
* Intended to be implemented by concrete form classes.
- *
- * @param Request $request The current request
*/
- public function onRequest(Request $request)
+ public function onRequest()
{
}
@@ -437,8 +441,8 @@ class Form extends Zend_Form
* `disableLoadDefaultDecorators' option to any other value than `true'. For loading custom element decorators use
* the 'decorators' option.
*
- * @param string $type String element type
- * @param string $name The name of the element to add
+ * @param string $type The type of the element
+ * @param string $name The name of the element
* @param mixed $options The options for the element
*
* @return Zend_Form_Element
@@ -460,7 +464,9 @@ class Form extends Zend_Form
$options = array('decorators' => static::$defaultElementDecorators);
}
- $el = parent::createElement($type, $name, $options);
+ if (($el = $this->createIcingaFormElement($type, $name, $options)) === null) {
+ $el = parent::createElement($type, $name, $options);
+ }
if ($el && $el->getAttrib('autosubmit')) {
$noScript = new NoScriptApply(); // Non-JS environments
@@ -549,15 +555,17 @@ class Form extends Zend_Form
{
if ($request === null) {
$request = $this->getRequest();
+ } else {
+ $this->request = $request;
}
- $formData = $this->getRequestData($request);
+ $formData = $this->getRequestData();
if ($this->getUidDisabled() || $this->wasSent($formData)) {
$this->populate($formData); // Necessary to get isSubmitted() to work
if (! $this->getSubmitLabel() || $this->isSubmitted()) {
if ($this->isValid($formData)
- && (($this->onSuccess !== null && false !== call_user_func($this->onSuccess, $request, $this))
- || ($this->onSuccess === null && false !== $this->onSuccess($request)))) {
+ && (($this->onSuccess !== null && false !== call_user_func($this->onSuccess, $this))
+ || ($this->onSuccess === null && false !== $this->onSuccess()))) {
$this->getResponse()->redirectAndExit($this->getRedirectUrl());
}
} else {
@@ -565,7 +573,7 @@ class Form extends Zend_Form
$this->isValidPartial($formData);
}
} else {
- $this->onRequest($request);
+ $this->onRequest();
}
return $request;
@@ -691,29 +699,19 @@ class Form extends Zend_Form
}
/**
- * Return the request data based on this form's request method
+ * Return the request associated with this form
*
- * @param Request $request The request to fetch the data from
- *
- * @return array
- */
- public function getRequestData(Request $request)
- {
- if (strtolower($request->getMethod()) === $this->getMethod()) {
- return $request->{'get' . ($request->isPost() ? 'Post' : 'Query')}();
- }
-
- return array();
- }
-
- /**
- * Return the current request
+ * Returns the global request if none has been set for this form yet.
*
* @return Request
*/
public function getRequest()
{
- return Icinga::app()->getFrontController()->getRequest();
+ if ($this->request === null) {
+ $this->request = Icinga::app()->getFrontController()->getRequest();
+ }
+
+ return $this->request;
}
/**
@@ -726,6 +724,39 @@ class Form extends Zend_Form
return Icinga::app()->getFrontController()->getResponse();
}
+ /**
+ * Return the request data based on this form's request method
+ *
+ * @return array
+ */
+ protected function getRequestData()
+ {
+ if (strtolower($this->request->getMethod()) === $this->getMethod()) {
+ return $this->request->{'get' . ($this->request->isPost() ? 'Post' : 'Query')}();
+ }
+
+ return array();
+ }
+
+ /**
+ * Create a new element located in the Icinga Web 2 library
+ *
+ * @param string $type The type of the element
+ * @param string $name The name of the element
+ * @param mixed $options The options for the element
+ *
+ * @return NULL|FormElement NULL in case the element is not found in the Icinga Web 2 library
+ *
+ * @see Form::$defaultElementDecorators For Icinga Web 2's default element decorators.
+ */
+ protected function createIcingaFormElement($type, $name, $options = null)
+ {
+ $className = 'Icinga\\Web\\Form\\Element\\' . ucfirst($type);
+ if (class_exists($className)) {
+ return new $className($name, $options);
+ }
+ }
+
/**
* Render this form
*
diff --git a/library/Icinga/Web/Form/Element/Button.php b/library/Icinga/Web/Form/Element/Button.php
index 00da28d10..1c5499373 100644
--- a/library/Icinga/Web/Form/Element/Button.php
+++ b/library/Icinga/Web/Form/Element/Button.php
@@ -4,14 +4,14 @@
namespace Icinga\Web\Form\Element;
-use Zend_Form_Element;
use Icinga\Web\Request;
use Icinga\Application\Icinga;
+use Icinga\Web\Form\FormElement;
/**
* A button
*/
-class Button extends Zend_Form_Element
+class Button extends FormElement
{
/**
* Use formButton view helper by default
diff --git a/library/Icinga/Web/Form/Element/Note.php b/library/Icinga/Web/Form/Element/Note.php
index fa003a2cf..37bc127e9 100644
--- a/library/Icinga/Web/Form/Element/Note.php
+++ b/library/Icinga/Web/Form/Element/Note.php
@@ -4,12 +4,12 @@
namespace Icinga\Web\Form\Element;
-use Zend_Form_Element;
+use Icinga\Web\Form\FormElement;
/**
* A note
*/
-class Note extends Zend_Form_Element
+class Note extends FormElement
{
/**
* Form view helper to use for rendering
diff --git a/library/Icinga/Web/JavaScript.php b/library/Icinga/Web/JavaScript.php
index 0b64a394b..9fa687042 100644
--- a/library/Icinga/Web/JavaScript.php
+++ b/library/Icinga/Web/JavaScript.php
@@ -118,7 +118,7 @@ class JavaScript
}
if ($minified) {
- require_once 'IcingaVendor/JShrink/Minifier.php';
+ require_once 'JShrink/Minifier.php';
$out .= Minifier::minify($js, array('flaggedComments' => false));
} else {
$out .= $js;
diff --git a/library/Icinga/Web/LessCompiler.php b/library/Icinga/Web/LessCompiler.php
index 16514cf6d..791fdbab0 100644
--- a/library/Icinga/Web/LessCompiler.php
+++ b/library/Icinga/Web/LessCompiler.php
@@ -41,7 +41,7 @@ class LessCompiler
*/
public function __construct()
{
- require_once 'IcingaVendor/lessphp/lessc.inc.php';
+ require_once 'lessphp/lessc.inc.php';
$this->lessc = new lessc();
$this->lessc->setVariables(
diff --git a/library/Icinga/Web/Widget/Chart/InlinePie.php b/library/Icinga/Web/Widget/Chart/InlinePie.php
index d22923131..3ff97b2df 100644
--- a/library/Icinga/Web/Widget/Chart/InlinePie.php
+++ b/library/Icinga/Web/Widget/Chart/InlinePie.php
@@ -73,28 +73,28 @@ EOD;
*
* @var int The value in px
*/
- private $width = 28;
+ private $width = 16;
/**
* The height of the rendered chart
*
* @var int The value in px
*/
- private $height = 28;
+ private $height = 16;
/**
* PieChart border width
*
* @var float
*/
- private $borderWidth = 0;
+ private $borderWidth = 1;
/**
* The color of the border
*
* @var string
*/
- private $borderColor = '#888';
+ private $borderColor = '#fff';
/**
* The title of the chart
diff --git a/library/Icinga/Web/Wizard.php b/library/Icinga/Web/Wizard.php
index 424b46b2c..2cc4abe5a 100644
--- a/library/Icinga/Web/Wizard.php
+++ b/library/Icinga/Web/Wizard.php
@@ -8,7 +8,6 @@ use LogicException;
use InvalidArgumentException;
use Icinga\Web\Session\SessionNamespace;
use Icinga\Web\Form\Decorator\ElementDoubler;
-use Icinga\Web\Form\Element\Button;
/**
* Container and controller for form based wizards
@@ -208,7 +207,7 @@ class Wizard
}
$this->setupPage($page, $request);
- $requestData = $page->getRequestData($request);
+ $requestData = $this->getRequestData($page, $request);
if ($page->wasSent($requestData)) {
if (($requestedPage = $this->getRequestedPage($requestData)) !== null) {
$isValid = false;
@@ -239,6 +238,23 @@ class Wizard
return $request;
}
+ /**
+ * Return the request data based on given form's request method
+ *
+ * @param Form $page The page to fetch the data for
+ * @param Request $request The request to fetch the data from
+ *
+ * @return array
+ */
+ protected function getRequestData(Form $page, Request $request)
+ {
+ if (strtolower($request->getMethod()) === $page->getMethod()) {
+ return $request->{'get' . ($request->isPost() ? 'Post' : 'Query')}();
+ }
+
+ return array();
+ }
+
/**
* Return the name of the requested page
*
@@ -270,7 +286,7 @@ class Wizard
$request = $currentPage->getRequest();
}
- $requestData = $currentPage->getRequestData($request);
+ $requestData = $this->getRequestData($currentPage, $request);
if (isset($requestData[static::BTN_NEXT])) {
return static::FORWARD;
} elseif (isset($requestData[static::BTN_PREV])) {
@@ -427,60 +443,55 @@ class Wizard
$index = array_search($page, $pages, true);
if ($index === 0) {
$page->addElement(
- new Button(
- static::BTN_NEXT,
- array(
- 'type' => 'submit',
- 'value' => $pages[1]->getName(),
- 'label' => t('Next'),
- 'decorators' => array('ViewHelper')
- )
+ 'button',
+ static::BTN_NEXT,
+ array(
+ 'type' => 'submit',
+ 'value' => $pages[1]->getName(),
+ 'label' => t('Next'),
+ 'decorators' => array('ViewHelper')
)
);
} elseif ($index < count($pages) - 1) {
$page->addElement(
- new Button(
- static::BTN_PREV,
- array(
- 'type' => 'submit',
- 'value' => $pages[$index - 1]->getName(),
- 'label' => t('Back'),
- 'decorators' => array('ViewHelper')
- )
+ 'button',
+ static::BTN_PREV,
+ array(
+ 'type' => 'submit',
+ 'value' => $pages[$index - 1]->getName(),
+ 'label' => t('Back'),
+ 'decorators' => array('ViewHelper')
)
);
$page->addElement(
- new Button(
- static::BTN_NEXT,
- array(
- 'type' => 'submit',
- 'value' => $pages[$index + 1]->getName(),
- 'label' => t('Next'),
- 'decorators' => array('ViewHelper')
- )
+ 'button',
+ static::BTN_NEXT,
+ array(
+ 'type' => 'submit',
+ 'value' => $pages[$index + 1]->getName(),
+ 'label' => t('Next'),
+ 'decorators' => array('ViewHelper')
)
);
} else {
$page->addElement(
- new Button(
- static::BTN_PREV,
- array(
- 'type' => 'submit',
- 'value' => $pages[$index - 1]->getName(),
- 'label' => t('Back'),
- 'decorators' => array('ViewHelper')
- )
+ 'button',
+ static::BTN_PREV,
+ array(
+ 'type' => 'submit',
+ 'value' => $pages[$index - 1]->getName(),
+ 'label' => t('Back'),
+ 'decorators' => array('ViewHelper')
)
);
$page->addElement(
- new Button(
- static::BTN_NEXT,
- array(
- 'type' => 'submit',
- 'value' => $page->getName(),
- 'label' => t('Finish'),
- 'decorators' => array('ViewHelper')
- )
+ 'button',
+ static::BTN_NEXT,
+ array(
+ 'type' => 'submit',
+ 'value' => $page->getName(),
+ 'label' => t('Finish'),
+ 'decorators' => array('ViewHelper')
)
);
}
diff --git a/library/IcingaVendor/JShrink/SOURCE b/library/IcingaVendor/JShrink/SOURCE
deleted file mode 100644
index 721d70182..000000000
--- a/library/IcingaVendor/JShrink/SOURCE
+++ /dev/null
@@ -1 +0,0 @@
-https://github.com/tedivm/JShrink/releases/tag/v1.0.0
diff --git a/library/IcingaVendor/htmlpurifier-4.6.0-lite/CREDITS b/library/IcingaVendor/htmlpurifier-4.6.0-lite/CREDITS
deleted file mode 100644
index 7921b45af..000000000
--- a/library/IcingaVendor/htmlpurifier-4.6.0-lite/CREDITS
+++ /dev/null
@@ -1,9 +0,0 @@
-
-CREDITS
-
-Almost everything written by Edward Z. Yang (Ambush Commander). Lots of thanks
-to the DevNetwork Community for their help (see docs/ref-devnetwork.html for
-more details), Feyd especially (namely IPv6 and optimization). Thanks to RSnake
-for letting me package his fantastic XSS cheatsheet for a smoketest.
-
- vim: et sw=4 sts=4
diff --git a/library/IcingaVendor/htmlpurifier-4.6.0-lite/INSTALL b/library/IcingaVendor/htmlpurifier-4.6.0-lite/INSTALL
deleted file mode 100644
index 677c04aa0..000000000
--- a/library/IcingaVendor/htmlpurifier-4.6.0-lite/INSTALL
+++ /dev/null
@@ -1,374 +0,0 @@
-
-Install
- How to install HTML Purifier
-
-HTML Purifier is designed to run out of the box, so actually using the
-library is extremely easy. (Although... if you were looking for a
-step-by-step installation GUI, you've downloaded the wrong software!)
-
-While the impatient can get going immediately with some of the sample
-code at the bottom of this library, it's well worth reading this entire
-document--most of the other documentation assumes that you are familiar
-with these contents.
-
-
----------------------------------------------------------------------------
-1. Compatibility
-
-HTML Purifier is PHP 5 only, and is actively tested from PHP 5.0.5 and
-up. It has no core dependencies with other libraries. PHP
-4 support was deprecated on December 31, 2007 with HTML Purifier 3.0.0.
-HTML Purifier is not compatible with zend.ze1_compatibility_mode.
-
-These optional extensions can enhance the capabilities of HTML Purifier:
-
- * iconv : Converts text to and from non-UTF-8 encodings
- * bcmath : Used for unit conversion and imagecrash protection
- * tidy : Used for pretty-printing HTML
-
-These optional libraries can enhance the capabilities of HTML Purifier:
-
- * CSSTidy : Clean CSS stylesheets using %Core.ExtractStyleBlocks
- * Net_IDNA2 (PEAR) : IRI support using %Core.EnableIDNA
-
----------------------------------------------------------------------------
-2. Reconnaissance
-
-A big plus of HTML Purifier is its inerrant support of standards, so
-your web-pages should be standards-compliant. (They should also use
-semantic markup, but that's another issue altogether, one HTML Purifier
-cannot fix without reading your mind.)
-
-HTML Purifier can process these doctypes:
-
-* XHTML 1.0 Transitional (default)
-* XHTML 1.0 Strict
-* HTML 4.01 Transitional
-* HTML 4.01 Strict
-* XHTML 1.1
-
-...and these character encodings:
-
-* UTF-8 (default)
-* Any encoding iconv supports (with crippled internationalization support)
-
-These defaults reflect what my choices would be if I were authoring an
-HTML document, however, what you choose depends on the nature of your
-codebase. If you don't know what doctype you are using, you can determine
-the doctype from this identifier at the top of your source code:
-
-
-
-...and the character encoding from this code:
-
-
-
-If the character encoding declaration is missing, STOP NOW, and
-read 'docs/enduser-utf8.html' (web accessible at
-http://htmlpurifier.org/docs/enduser-utf8.html). In fact, even if it is
-present, read this document anyway, as many websites specify their
-document's character encoding incorrectly.
-
-
----------------------------------------------------------------------------
-3. Including the library
-
-The procedure is quite simple:
-
- require_once '/path/to/library/HTMLPurifier.auto.php';
-
-This will setup an autoloader, so the library's files are only included
-when you use them.
-
-Only the contents in the library/ folder are necessary, so you can remove
-everything else when using HTML Purifier in a production environment.
-
-If you installed HTML Purifier via PEAR, all you need to do is:
-
- require_once 'HTMLPurifier.auto.php';
-
-Please note that the usual PEAR practice of including just the classes you
-want will not work with HTML Purifier's autoloading scheme.
-
-Advanced users, read on; other users can skip to section 4.
-
-Autoload compatibility
-----------------------
-
- HTML Purifier attempts to be as smart as possible when registering an
- autoloader, but there are some cases where you will need to change
- your own code to accomodate HTML Purifier. These are those cases:
-
- PHP VERSION IS LESS THAN 5.1.2, AND YOU'VE DEFINED __autoload
- Because spl_autoload_register() doesn't exist in early versions
- of PHP 5, HTML Purifier has no way of adding itself to the autoload
- stack. Modify your __autoload function to test
- HTMLPurifier_Bootstrap::autoload($class)
-
- For example, suppose your autoload function looks like this:
-
- function __autoload($class) {
- require str_replace('_', '/', $class) . '.php';
- return true;
- }
-
- A modified version with HTML Purifier would look like this:
-
- function __autoload($class) {
- if (HTMLPurifier_Bootstrap::autoload($class)) return true;
- require str_replace('_', '/', $class) . '.php';
- return true;
- }
-
- Note that there *is* some custom behavior in our autoloader; the
- original autoloader in our example would work for 99% of the time,
- but would fail when including language files.
-
- AN __autoload FUNCTION IS DECLARED AFTER OUR AUTOLOADER IS REGISTERED
- spl_autoload_register() has the curious behavior of disabling
- the existing __autoload() handler. Users need to explicitly
- spl_autoload_register('__autoload'). Because we use SPL when it
- is available, __autoload() will ALWAYS be disabled. If __autoload()
- is declared before HTML Purifier is loaded, this is not a problem:
- HTML Purifier will register the function for you. But if it is
- declared afterwards, it will mysteriously not work. This
- snippet of code (after your autoloader is defined) will fix it:
-
- spl_autoload_register('__autoload')
-
- Users should also be on guard if they use a version of PHP previous
- to 5.1.2 without an autoloader--HTML Purifier will define __autoload()
- for you, which can collide with an autoloader that was added by *you*
- later.
-
-
-For better performance
-----------------------
-
- Opcode caches, which greatly speed up PHP initialization for scripts
- with large amounts of code (HTML Purifier included), don't like
- autoloaders. We offer an include file that includes all of HTML Purifier's
- files in one go in an opcode cache friendly manner:
-
- // If /path/to/library isn't already in your include path, uncomment
- // the below line:
- // require '/path/to/library/HTMLPurifier.path.php';
-
- require 'HTMLPurifier.includes.php';
-
- Optional components still need to be included--you'll know if you try to
- use a feature and you get a class doesn't exists error! The autoloader
- can be used in conjunction with this approach to catch classes that are
- missing. Simply add this afterwards:
-
- require 'HTMLPurifier.autoload.php';
-
-Standalone version
-------------------
-
- HTML Purifier has a standalone distribution; you can also generate
- a standalone file from the full version by running the script
- maintenance/generate-standalone.php . The standalone version has the
- benefit of having most of its code in one file, so parsing is much
- faster and the library is easier to manage.
-
- If HTMLPurifier.standalone.php exists in the library directory, you
- can use it like this:
-
- require '/path/to/HTMLPurifier.standalone.php';
-
- This is equivalent to including HTMLPurifier.includes.php, except that
- the contents of standalone/ will be added to your path. To override this
- behavior, specify a new HTMLPURIFIER_PREFIX where standalone files can
- be found (usually, this will be one directory up, the "true" library
- directory in full distributions). Don't forget to set your path too!
-
- The autoloader can be added to the end to ensure the classes are
- loaded when necessary; otherwise you can manually include them.
- To use the autoloader, use this:
-
- require 'HTMLPurifier.autoload.php';
-
-For advanced users
-------------------
-
- HTMLPurifier.auto.php performs a number of operations that can be done
- individually. These are:
-
- HTMLPurifier.path.php
- Puts /path/to/library in the include path. For high performance,
- this should be done in php.ini.
-
- HTMLPurifier.autoload.php
- Registers our autoload handler HTMLPurifier_Bootstrap::autoload($class).
-
- You can do these operations by yourself--in fact, you must modify your own
- autoload handler if you are using a version of PHP earlier than PHP 5.1.2
- (See "Autoload compatibility" above).
-
-
----------------------------------------------------------------------------
-4. Configuration
-
-HTML Purifier is designed to run out-of-the-box, but occasionally HTML
-Purifier needs to be told what to do. If you answer no to any of these
-questions, read on; otherwise, you can skip to the next section (or, if you're
-into configuring things just for the heck of it, skip to 4.3).
-
-* Am I using UTF-8?
-* Am I using XHTML 1.0 Transitional?
-
-If you answered no to any of these questions, instantiate a configuration
-object and read on:
-
- $config = HTMLPurifier_Config::createDefault();
-
-
-4.1. Setting a different character encoding
-
-You really shouldn't use any other encoding except UTF-8, especially if you
-plan to support multilingual websites (read section three for more details).
-However, switching to UTF-8 is not always immediately feasible, so we can
-adapt.
-
-HTML Purifier uses iconv to support other character encodings, as such,
-any encoding that iconv supports
-HTML Purifier supports with this code:
-
- $config->set('Core.Encoding', /* put your encoding here */);
-
-An example usage for Latin-1 websites (the most common encoding for English
-websites):
-
- $config->set('Core.Encoding', 'ISO-8859-1');
-
-Note that HTML Purifier's support for non-Unicode encodings is crippled by the
-fact that any character not supported by that encoding will be silently
-dropped, EVEN if it is ampersand escaped. If you want to work around
-this, you are welcome to read docs/enduser-utf8.html for a fix,
-but please be cognizant of the issues the "solution" creates (for this
-reason, I do not include the solution in this document).
-
-
-4.2. Setting a different doctype
-
-For those of you using HTML 4.01 Transitional, you can disable
-XHTML output like this:
-
- $config->set('HTML.Doctype', 'HTML 4.01 Transitional');
-
-Other supported doctypes include:
-
- * HTML 4.01 Strict
- * HTML 4.01 Transitional
- * XHTML 1.0 Strict
- * XHTML 1.0 Transitional
- * XHTML 1.1
-
-
-4.3. Other settings
-
-There are more configuration directives which can be read about
-here: They're a bit boring,
-but they can help out for those of you who like to exert maximum control over
-your code. Some of the more interesting ones are configurable at the
-demo and are well worth looking into
-for your own system.
-
-For example, you can fine tune allowed elements and attributes, convert
-relative URLs to absolute ones, and even autoparagraph input text! These
-are, respectively, %HTML.Allowed, %URI.MakeAbsolute and %URI.Base, and
-%AutoFormat.AutoParagraph. The %Namespace.Directive naming convention
-translates to:
-
- $config->set('Namespace.Directive', $value);
-
-E.g.
-
- $config->set('HTML.Allowed', 'p,b,a[href],i');
- $config->set('URI.Base', 'http://www.example.com');
- $config->set('URI.MakeAbsolute', true);
- $config->set('AutoFormat.AutoParagraph', true);
-
-
----------------------------------------------------------------------------
-5. Caching
-
-HTML Purifier generates some cache files (generally one or two) to speed up
-its execution. For maximum performance, make sure that
-library/HTMLPurifier/DefinitionCache/Serializer is writeable by the webserver.
-
-If you are in the library/ folder of HTML Purifier, you can set the
-appropriate permissions using:
-
- chmod -R 0755 HTMLPurifier/DefinitionCache/Serializer
-
-If the above command doesn't work, you may need to assign write permissions
-to all. This may be necessary if your webserver runs as nobody, but is
-not recommended since it means any other user can write files in the
-directory. Use:
-
- chmod -R 0777 HTMLPurifier/DefinitionCache/Serializer
-
-You can also chmod files via your FTP client; this option
-is usually accessible by right clicking the corresponding directory and
-then selecting "chmod" or "file permissions".
-
-Starting with 2.0.1, HTML Purifier will generate friendly error messages
-that will tell you exactly what you have to chmod the directory to, if in doubt,
-follow its advice.
-
-If you are unable or unwilling to give write permissions to the cache
-directory, you can either disable the cache (and suffer a performance
-hit):
-
- $config->set('Core.DefinitionCache', null);
-
-Or move the cache directory somewhere else (no trailing slash):
-
- $config->set('Cache.SerializerPath', '/home/user/absolute/path');
-
-
----------------------------------------------------------------------------
-6. Using the code
-
-The interface is mind-numbingly simple:
-
- $purifier = new HTMLPurifier($config);
- $clean_html = $purifier->purify( $dirty_html );
-
-That's it! For more examples, check out docs/examples/ (they aren't very
-different though). Also, docs/enduser-slow.html gives advice on what to
-do if HTML Purifier is slowing down your application.
-
-
----------------------------------------------------------------------------
-7. Quick install
-
-First, make sure library/HTMLPurifier/DefinitionCache/Serializer is
-writable by the webserver (see Section 5: Caching above for details).
-If your website is in UTF-8 and XHTML Transitional, use this code:
-
-purify($dirty_html);
-?>
-
-If your website is in a different encoding or doctype, use this code:
-
-set('Core.Encoding', 'ISO-8859-1'); // replace with your encoding
- $config->set('HTML.Doctype', 'HTML 4.01 Transitional'); // replace with your doctype
- $purifier = new HTMLPurifier($config);
-
- $clean_html = $purifier->purify($dirty_html);
-?>
-
- vim: et sw=4 sts=4
diff --git a/library/IcingaVendor/htmlpurifier-4.6.0-lite/NEWS b/library/IcingaVendor/htmlpurifier-4.6.0-lite/NEWS
deleted file mode 100644
index 90a054620..000000000
--- a/library/IcingaVendor/htmlpurifier-4.6.0-lite/NEWS
+++ /dev/null
@@ -1,1078 +0,0 @@
-NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
-|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-= KEY ====================
- # Breaks back-compat
- ! Feature
- - Bugfix
- + Sub-comment
- . Internal change
-==========================
-
-4.6.0, released 2013-11-30
-# Secure URI munge hashing algorithm has changed to hash_hmac("sha256", $url, $secret).
- Please update any verification scripts you may have.
-# URI parsing algorithm was made more strict, so only prefixes which
- looks like schemes will actually be schemes. Thanks
- Michael Gusev for fixing.
-# %Core.EscapeInvalidChildren is no longer supported, and no longer does
- anything.
-! New directive %Core.AllowHostnameUnderscore which allows underscores
- in hostnames.
-- Eliminate quadratic behavior in DOMLex by using a proper queue.
- Thanks Ole Laursen for noticing this.
-- Rewritten MakeWellFormed/FixNesting implementation eliminates quadratic
- behavior in the rest of the purificaiton pipeline. Thanks Chedburn
- Networks for sponsoring this work.
-- Made Linkify URL parser a bit less permissive, so that non-breaking
- spaces and commas are not included as part of URL. Thanks nAS for fixing.
-- Fix some bad interactions with %HTML.Allowed and injectors. Thanks
- David Hirtz for reporting.
-- Fix infinite loop in DirectLex. Thanks Ashar Javed (@soaj1664ashar)
- for reporting.
-
-4.5.0, released 2013-02-17
-# Fix bug where stacked attribute transforms clobber each other;
- this also means it's no longer possible to override attribute
- transforms in later modules. No internal code was using this
- but this may break some clients.
-# We now use SHA-1 to identify cached definitions, instead of MD5.
-! Support display:inline-block
-! Support for more white-space CSS values.
-! Permit underscores in font families
-! Support for page-break-* CSS3 properties when proprietary properties
- are enabled.
-! New directive %Core.DisableExcludes; can be set to 'true' to turn off
- SGML excludes checking. If HTML Purifier is removing too much text
- and you don't care about full standards compliance, try setting this to
- 'true'.
-- Use prepend for SPL autoloading on PHP 5.3 and later.
-- Fix bug with nofollow transform when pre-existing rel exists.
-- Fix bug where background:url() always gets lower-cased
- (but not background-image:url())
-- Fix bug with non lower-case color names in HTML
-- Fix bug where data URI validation doesn't remove temporary files.
- Thanks Javier Marín Ros for reporting.
-- Don't remove certain empty tags on RemoveEmpty.
-
-4.4.0, released 2012-01-18
-# Removed PEARSax3 handler.
-# URI.Munge now munges URIs inside the same host that go from https
- to http. Reported by Neike Taika-Tessaro.
-# Core.EscapeNonASCIICharacters now always transforms entities to
- entities, even if target encoding is UTF-8.
-# Tighten up selector validation in ExtractStyleBlocks.
- Non-syntactically valid selectors are now rejected, along with
- some of the more obscure ones such as attribute selectors, the
- :lang pseudoselector, and anything not in CSS2.1. Furthermore,
- ID and class selectors now work properly with the relevant
- configuration attributes. Also, mute errors when parsing CSS
- with CSS Tidy. Reported by Mario Heiderich and Norman Hippert.
-! Added support for 'scope' attribute on tables.
-! Added %HTML.TargetBlank, which adds target="blank" to all outgoing links.
-! Properly handle sub-lists directly nested inside of lists in
- a standards compliant way, by moving them into the preceding
-! Added %HTML.AllowedComments and %HTML.AllowedCommentsRegexp for
- limited allowed comments in untrusted situations.
-! Implement iframes, and allow them to be used in untrusted mode with
- %HTML.SafeIframe and %URI.SafeIframeRegexp. Thanks Bradley M. Froehle
- for submitting an initial version of the patch.
-! The Forms module now works properly for transitional doctypes.
-! Added support for internationalized domain names. You need the PEAR
- Net_IDNA2 module to be in your path; if it is installed, ensure the
- class can be loaded and then set %Core.EnableIDNA to true.
-- Color keywords are now case insensitive. Thanks Yzmir Ramirez
- for reporting.
-- Explicitly initialize anonModule variable to null.
-- Do not duplicate nofollow if already present. Thanks 178
- for reporting.
-- Do not add nofollow if hostname matches our current host. Thanks 178
- for reporting, and Neike Taika-Tessaro for helping diagnose.
-- Do not unset parser variable; this fixes intermittent serialization
- problems. Thanks Neike Taika-Tessaro for reporting, bill
- <10010tiger@gmail.com> for diagnosing.
-- Fix iconv truncation bug, where non-UTF-8 target encodings see
- output truncated after around 8000 characters. Thanks Jörg Ludwig
- for reporting.
-- Fix broken table content model for XHTML1.1 (and also earlier
- versions, although the W3C validator doesn't catch those violations).
- Thanks GlitchMr for reporting.
-
-4.3.0, released 2011-03-27
-# Fixed broken caching of customized raw definitions, but requires an
- API change. The old API still works but will emit a warning,
- see http://htmlpurifier.org/docs/enduser-customize.html#optimized
- for how to upgrade your code.
-# Protect against Internet Explorer innerHTML behavior by specially
- treating attributes with backticks but no angled brackets, quotes or
- spaces. This constitutes a slight semantic change, which can be
- reverted using %Output.FixInnerHTML. Reported by Neike Taika-Tessaro
- and Mario Heiderich.
-# Protect against cssText/innerHTML by restricting allowed characters
- used in fonts further than mandated by the specification and encoding
- some extra special characters in URLs. Reported by Neike
- Taika-Tessaro and Mario Heiderich.
-! Added %HTML.Nofollow to add rel="nofollow" to external links.
-! More types of SPL autoloaders allowed on later versions of PHP.
-! Implementations for position, top, left, right, bottom, z-index
- when %CSS.Trusted is on.
-! Add %Cache.SerializerPermissions option for custom serializer
- directory/file permissions
-! Fix longstanding bug in Flash support for non-IE browsers, and
- allow more wmode attributes.
-! Add %CSS.AllowedFonts to restrict permissible font names.
-- Switch to an iterative traversal of the DOM, which prevents us
- from running out of stack space for deeply nested documents.
- Thanks Maxim Krizhanovsky for contributing a patch.
-- Make removal of conditional IE comments ungreedy; thanks Bernd
- for reporting.
-- Escape CDATA before removing Internet Explorer comments.
-- Fix removal of id attributes under certain conditions by ensuring
- armor attributes are preserved when recreating tags.
-- Check if schema.ser was corrupted.
-- Check if zend.ze1_compatibility_mode is on, and error out if it is.
- This safety check is only done for HTMLPurifier.auto.php; if you
- are using standalone or the specialized includes files, you're
- expected to know what you're doing.
-- Stop repeatedly writing the cache file after I'm done customizing a
- raw definition. Reported by ajh.
-- Switch to using require_once in the Bootstrap to work around bad
- interaction with Zend Debugger and APC. Reported by Antonio Parraga.
-- Fix URI handling when hostname is missing but scheme is present.
- Reported by Neike Taika-Tessaro.
-- Fix missing numeric entities on DirectLex; thanks Neike Taika-Tessaro
- for reporting.
-- Fix harmless notice from indexing into empty string. Thanks Matthijs
- Kooijman for reporting.
-- Don't autoclose no parent elements are able to support the element
- that triggered the autoclose. In particular fixes strange behavior
- of stray tags. Thanks pkuliga@gmail.com for reporting and
- Neike Taika-Tessaro for debugging assistance.
-
-4.2.0, released 2010-09-15
-! Added %Core.RemoveProcessingInstructions, which lets you remove
- ... ?> statements.
-! Added %URI.DisableResources functionality; the directive originally
- did nothing. Thanks David Rothstein for reporting.
-! Add documentation about configuration directive types.
-! Add %CSS.ForbiddenProperties configuration directive.
-! Add %HTML.FlashAllowFullScreen to permit embedded Flash objects
- to utilize full-screen mode.
-! Add optional support for the file
URI scheme, enable
- by explicitly setting %URI.AllowedSchemes.
-! Add %Core.NormalizeNewlines options to allow turning off newline
- normalization.
-- Fix improper handling of Internet Explorer conditional comments
- by parser. Thanks zmonteca for reporting.
-- Fix missing attributes bug when running on Mac Snow Leopard and APC.
- Thanks sidepodcast for the fix.
-- Warn if an element is allowed, but an attribute it requires is
- not allowed.
-
-4.1.1, released 2010-05-31
-- Fix undefined index warnings in maintenance scripts.
-- Fix bug in DirectLex for parsing elements with a single attribute
- with entities.
-- Rewrite CSS output logic for font-family and url(). Thanks Mario
- Heiderich for reporting and Takeshi
- Terada for suggesting the fix.
-- Emit an error for CollectErrors if a body is extracted
-- Fix bug where in background-position for center keyword handling.
-- Fix infinite loop when a wrapper element is inserted in a context
- where it's not allowed. Thanks Lars for reporting.
-- Remove +x bit and shebang from index.php; only supported mode is to
- explicitly call it with php.
-- Make test script less chatty when log_errors is on.
-
-4.1.0, released 2010-04-26
-! Support proprietary height attribute on table element
-! Support YouTube slideshows that contain /cp/ in their URL.
-! Support for data: URI scheme; not enabled by default, add it using
- %URI.AllowedSchemes
-! Support flashvars when using %HTML.SafeObject and %HTML.SafeEmbed.
-! Support for Internet Explorer compatibility with %HTML.SafeObject
- using %Output.FlashCompat.
-! Handle properly, by inserting the necessary - tag.
-- Always quote the insides of url(...) in CSS.
-
-4.0.0, released 2009-07-07
-# APIs for ConfigSchema subsystem have substantially changed. See
- docs/dev-config-bcbreaks.txt for details; in essence, anything that
- had both namespace and directive now have a single unified key.
-# Some configuration directives were renamed, specifically:
- %AutoFormatParam.PurifierLinkifyDocURL -> %AutoFormat.PurifierLinkify.DocURL
- %FilterParam.ExtractStyleBlocksEscaping -> %Filter.ExtractStyleBlocks.Escaping
- %FilterParam.ExtractStyleBlocksScope -> %Filter.ExtractStyleBlocks.Scope
- %FilterParam.ExtractStyleBlocksTidyImpl -> %Filter.ExtractStyleBlocks.TidyImpl
- As usual, the old directive names will still work, but will throw E_NOTICE
- errors.
-# The allowed values for class have been relaxed to allow all of CDATA for
- doctypes that are not XHTML 1.1 or XHTML 2.0. For old behavior, set
- %Attr.ClassUseCDATA to false.
-# Instead of appending the content model to an old content model, a blank
- element will replace the old content model. You can use #SUPER to get
- the old content model.
-! More robust support for name="" and id=""
-! HTMLPurifier_Config::inherit($config) allows you to inherit one
- configuration, and have changes to that configuration be propagated
- to all of its children.
-! Implement %HTML.Attr.Name.UseCDATA, which relaxes validation rules on
- the name attribute when set. Use with care. Thanks Ian Cook for
- sponsoring.
-! Implement %AutoFormat.RemoveEmpty.RemoveNbsp, which removes empty
- tags that contain non-breaking spaces as well other whitespace. You
- can also modify which tags should have maintained with
- %AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.
-! Implement %Attr.AllowedClasses, which allows administrators to restrict
- classes users can use to a specified finite set of classes, and
- %Attr.ForbiddenClasses, which is the logical inverse.
-! You can now maintain your own configuration schema directories by
- creating a config-schema.php file or passing an extra argument. Check
- docs/dev-config-schema.html for more details.
-! Added HTMLPurifier_Config->serialize() method, which lets you save away
- your configuration in a compact serial file, which you can unserialize
- and use directly without having to go through the overhead of setup.
-- Fix bug where URIDefinition would not get cleared if it's directives got
- changed.
-- Fix fatal error in HTMLPurifier_Encoder on certain platforms (probably NetBSD 5.0)
-- Fix bug in Linkify autoformatter involving http://foo
-- Make %URI.Munge not apply to links that have the same host as your host.
-- Prevent stray