Commit 2edf73f8 authored by Tino Goratsch's avatar Tino Goratsch

Merge tag 'v4.4.4' into develop

Tagging version v4.4.4

# Conflicts:
#	ACP3/Modules/ACP3/WYSIWYGCKEditor/composer.json
#	CHANGELOG.md
parents 90e69bc7 abd0d419
......@@ -14,7 +14,7 @@ interface BootstrapInterface extends HttpKernelInterface
/**
* Contains the current ACP3 version string
*/
const VERSION = '4.4.3';
const VERSION = '4.4.4';
/**
* Performs some startup checks
......
......@@ -87,7 +87,10 @@ abstract class AbstractModel
) {
$this->dispatchEvent('core.model.before_save', $entryId, $filteredData, $rawData);
$this->dispatchEvent(
static::EVENT_PREFIX . '.model.' . $repository::TABLE_NAME . '.before_save', $entryId, $filteredData
static::EVENT_PREFIX . '.model.' . $repository::TABLE_NAME . '.before_save',
$entryId,
$filteredData,
$rawData
);
}
......@@ -133,7 +136,10 @@ abstract class AbstractModel
) {
$this->dispatchEvent('core.model.after_save', $entryId, $filteredData, $rawData);
$this->dispatchEvent(
static::EVENT_PREFIX . '.model.' . $repository::TABLE_NAME . '.after_save', $entryId, $filteredData
static::EVENT_PREFIX . '.model.' . $repository::TABLE_NAME . '.after_save',
$entryId,
$filteredData,
$rawData
);
}
......
<?php
/**
* Copyright (c) 2016 by the ACP3 Developers.
* See the LICENCE file at the top-level module directory for licencing details.
*/
namespace ACP3\Core\Model\DataProcessor\ColumnType;
class IntegerNullableColumnType extends IntegerColumnType
{
/**
* @param mixed $value
* @return int|null
*/
public function doEscape($value)
{
if ($value !== null) {
$value = parent::doEscape($value);
}
return $value;
}
}
......@@ -12,6 +12,7 @@ interface ColumnTypes
const COLUMN_TYPE_DATETIME = 'datetime';
const COLUMN_TYPE_BOOLEAN = 'boolean';
const COLUMN_TYPE_INT = 'integer';
const COLUMN_TYPE_INT_NULLABLE = 'integer_nullable';
const COLUMN_TYPE_DOUBLE = 'double';
const COLUMN_TYPE_TEXT = 'text';
const COLUMN_TYPE_TEXT_WYSIWYG = 'text_wysiwyg';
......
......@@ -21,6 +21,11 @@ services:
tags:
- { name: core.model.column_type, columnType: 'integer' }
core.model.column_type.integer_nullable_column_type_strategy:
class: ACP3\Core\Model\DataProcessor\ColumnType\IntegerNullableColumnType
tags:
- { name: core.model.column_type, columnType: 'integer_nullable' }
core.model.column_type.raw_column_type_strategy:
class: ACP3\Core\Model\DataProcessor\ColumnType\RawColumnType
tags:
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"autoload": {
"psr-4": {
......
......@@ -23,7 +23,6 @@ class UpdateArticleCacheOnModelSaveAfterListener
*/
public function __construct(Cache $cache)
{
$this->cache = $cache;
}
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"suggest": {
"acp3/module-seo": "Provides additional SEO capabilities"
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"autoload": {
"psr-4": {
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"autoload": {
"psr-4": {
......
......@@ -24,7 +24,7 @@ class CommentsModel extends AbstractModel
'ip' => ColumnTypes::COLUMN_TYPE_RAW,
'date' => ColumnTypes::COLUMN_TYPE_DATETIME,
'name' => ColumnTypes::COLUMN_TYPE_TEXT,
'user_id' => ColumnTypes::COLUMN_TYPE_INT,
'user_id' => ColumnTypes::COLUMN_TYPE_INT_NULLABLE,
'message' => ColumnTypes::COLUMN_TYPE_TEXT,
'module_id' => ColumnTypes::COLUMN_TYPE_INT,
'entry_id' => ColumnTypes::COLUMN_TYPE_INT
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"suggest": {
"acp3/module-captcha": "Provides basic protection against spam bots."
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"suggest": {
"acp3/module-captcha": "Provides basic protection against spam bots."
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"autoload": {
"psr-4": {
......
......@@ -17,11 +17,11 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"autoload": {
"psr-4": {
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3",
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4",
"mibe/feedwriter": "^1.0"
},
"autoload": {
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"autoload": {
"psr-4": {
......
......@@ -17,13 +17,13 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3",
"acp3/module-categories": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4",
"acp3/module-categories": "^4.4.4"
},
"suggest": {
"acp3/module-seo": "Provides additional SEO capabilities"
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"suggest": {
"acp3/module-seo": "Provides additional SEO capabilities"
......
......@@ -136,15 +136,6 @@ class Create extends AbstractAction
$this->sendNotificationEmail($lastId);
}
// Falls es der Benutzer ausgewählt hat, diesen in den Newsletter eintragen
if ($this->newsletterActive === true &&
$this->newsletterSubscribeHelper &&
isset($formData['subscribe_newsletter']) &&
$formData['subscribe_newsletter'] == 1
) {
$this->newsletterSubscribeHelper->subscribeToNewsletter($formData['mail']);
}
return $this->redirectMessages()->setMessage(
$lastId,
$this->translator->t('system', $lastId !== false ? 'create_success' : 'create_error')
......
<?php
/**
* Copyright (c) 2016 by the ACP3 Developers.
* See the LICENCE file at the top-level module directory for licencing details.
*/
namespace ACP3\Modules\ACP3\Guestbook\Event\Listener;
use ACP3\Core\I18n\Translator;
use ACP3\Core\Model\Event\ModelSaveEvent;
use ACP3\Core\Router\RouterInterface;
use ACP3\Core\Settings\SettingsInterface;
use ACP3\Modules\ACP3\Guestbook\Installer\Schema;
use ACP3\Modules\ACP3\Newsletter\Helper\Subscribe;
class SubscribeToNewsletterOnModelAfterSaveListener
{
/**
* @var SettingsInterface
*/
private $settings;
/**
* @var RouterInterface
*/
private $router;
/**
* @var Translator
*/
private $translator;
/**
* @var Subscribe
*/
private $subscribe;
/**
* SubscribeToNewsletterOnModelAfterSaveListener constructor.
* @param SettingsInterface $settings
* @param RouterInterface $router
* @param Translator $translator
*/
public function __construct(
SettingsInterface $settings,
RouterInterface $router,
Translator $translator
) {
$this->settings = $settings;
$this->router = $router;
$this->translator = $translator;
}
/**
* @param Subscribe $subscribe
* @return $this
*/
public function setNewsletterSubscribe(Subscribe $subscribe)
{
$this->subscribe = $subscribe;
return $this;
}
/**
* @param ModelSaveEvent $event
*/
public function subscribeToNewsletter(ModelSaveEvent $event)
{
if ($this->settings->getSettings(Schema::MODULE_NAME)['newsletter_integration'] == 1 && $this->subscribe) {
$formData = $event->getRawData();
if (!empty($formData['subscribe_newsletter']) && !empty($formData['mail'])) {
$this->subscribe->subscribeToNewsletter($formData['mail']);
}
}
}
}
......@@ -24,7 +24,7 @@ class GuestbookModel extends AbstractModel
'date' => ColumnTypes::COLUMN_TYPE_DATETIME,
'ip' => ColumnTypes::COLUMN_TYPE_RAW,
'name' => ColumnTypes::COLUMN_TYPE_TEXT,
'user_id' => ColumnTypes::COLUMN_TYPE_INT,
'user_id' => ColumnTypes::COLUMN_TYPE_INT_NULLABLE,
'message' => ColumnTypes::COLUMN_TYPE_TEXT,
'website' => ColumnTypes::COLUMN_TYPE_TEXT,
'mail' => ColumnTypes::COLUMN_TYPE_RAW,
......
services:
guestbook.events.listener.subscribe_to_newsletter_on_model_after_save_listener:
class: ACP3\Modules\ACP3\Guestbook\Event\Listener\SubscribeToNewsletterOnModelAfterSaveListener
arguments:
- '@core.config'
- '@core.router'
- '@core.lang'
calls:
- ['setNewsletterSubscribe', ['@?newsletter.helper.subscribe']]
tags:
- { name: core.eventListener, event: guestbook.model.guestbook.after_save, method: subscribeToNewsletter }
imports:
- { resource: components/controllers.yml }
- { resource: components/events.yml }
- { resource: components/installer.yml }
- { resource: components/models.yml }
- { resource: components/validation.yml }
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"suggest": {
"acp3/module-captcha": "Provides basic protection against spam bots."
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"autoload": {
"psr-4": {
......
......@@ -17,13 +17,13 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3",
"acp3/module-categories": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4",
"acp3/module-categories": "^4.4.4"
},
"suggest": {
"acp3/module-seo": "Provides additional SEO capabilities"
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"suggest": {
"acp3/module-captcha": "Provides basic protection against spam bots."
......
......@@ -17,11 +17,11 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"autoload": {
"psr-4": {
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"autoload": {
"psr-4": {
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"autoload": {
"psr-4": {
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3",
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4",
"thepixeldeveloper/sitemap": "^4.4.2"
},
"autoload": {
......
......@@ -18,11 +18,11 @@
"require": {
"composer/semver": "^1.4",
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-users": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-users": "^4.4.4"
},
"autoload": {
"psr-4": {
......
......@@ -17,11 +17,11 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3"
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4"
},
"suggest": {
"acp3/module-captcha": "Provides basic protection against spam bots."
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",
"acp3/module-system": "^4.4.3",
"acp3/module-users": "^4.4.3",
"acp3/core": "^4.4.4",
"acp3/setup": "^4.4.4",
"acp3/module-errors": "^4.4.4",
"acp3/module-permissions": "^4.4.4",
"acp3/module-system": "^4.4.4",
"acp3/module-users": "^4.4.4",
"ckeditor/ckeditor": "dev-full/4.6.x"
},
"autoload": {
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "*",
"acp3/core": "^4.4.3",
"acp3/setup": "^4.4.3",
"acp3/module-errors": "^4.4.3",
"acp3/module-permissions": "^4.4.3",