Commit 011027d0 authored by Tino Goratsch's avatar Tino Goratsch

Merge branch 'release/v4.8.2'

parents 74088e41 0d3df25d
...@@ -14,7 +14,7 @@ interface BootstrapInterface extends HttpKernelInterface ...@@ -14,7 +14,7 @@ interface BootstrapInterface extends HttpKernelInterface
/** /**
* Contains the current ACP3 version string * Contains the current ACP3 version string
*/ */
const VERSION = '4.8.1'; const VERSION = '4.8.2';
/** /**
* Performs some startup checks * Performs some startup checks
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1" "acp3/module-users": "^4.8.2"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1" "acp3/module-users": "^4.8.2"
}, },
"suggest": { "suggest": {
"acp3/module-seo": "Provides additional SEO capabilities" "acp3/module-seo": "Provides additional SEO capabilities"
......
...@@ -9,7 +9,7 @@ jQuery(document).ready(function ($) { ...@@ -9,7 +9,7 @@ jQuery(document).ready(function ($) {
'captcha.extension.recaptcha_captcha_extension' 'captcha.extension.recaptcha_captcha_extension'
]; ];
$('#captcha').on('change', function() { $(':input[name="captcha"]').on('change', function() {
$recaptchaWrapper.toggle(serviceIds.indexOf(this.value) !== -1); $recaptchaWrapper.toggle(serviceIds.indexOf(this.value) !== -1);
}).filter(':selected').triggerHandler('change'); }).triggerHandler('change');
}); });
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1", "acp3/module-users": "^4.8.2",
"google/recaptcha": "^1.1.0" "google/recaptcha": "^1.1.0"
}, },
"autoload": { "autoload": {
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1" "acp3/module-users": "^4.8.2"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1" "acp3/module-users": "^4.8.2"
}, },
"suggest": { "suggest": {
"acp3/module-captcha": "Provides basic protection against spam bots." "acp3/module-captcha": "Provides basic protection against spam bots."
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1" "acp3/module-users": "^4.8.2"
}, },
"suggest": { "suggest": {
"acp3/module-captcha": "Provides basic protection against spam bots." "acp3/module-captcha": "Provides basic protection against spam bots."
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1" "acp3/module-users": "^4.8.2"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
......
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1" "acp3/module-users": "^4.8.2"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1", "acp3/module-users": "^4.8.2",
"mibe/feedwriter": "^1.0" "mibe/feedwriter": "^1.0"
}, },
"autoload": { "autoload": {
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1" "acp3/module-users": "^4.8.2"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
......
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1", "acp3/module-users": "^4.8.2",
"acp3/module-categories": "^4.8.1" "acp3/module-categories": "^4.8.2"
}, },
"suggest": { "suggest": {
"acp3/module-seo": "Provides additional SEO capabilities" "acp3/module-seo": "Provides additional SEO capabilities"
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1" "acp3/module-users": "^4.8.2"
}, },
"suggest": { "suggest": {
"acp3/module-seo": "Provides additional SEO capabilities" "acp3/module-seo": "Provides additional SEO capabilities"
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1" "acp3/module-users": "^4.8.2"
}, },
"suggest": { "suggest": {
"acp3/module-captcha": "Provides basic protection against spam bots." "acp3/module-captcha": "Provides basic protection against spam bots."
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1" "acp3/module-users": "^4.8.2"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
......
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1", "acp3/module-users": "^4.8.2",
"acp3/module-categories": "^4.8.1" "acp3/module-categories": "^4.8.2"
}, },
"suggest": { "suggest": {
"acp3/module-seo": "Provides additional SEO capabilities" "acp3/module-seo": "Provides additional SEO capabilities"
......
...@@ -29,8 +29,8 @@ class AccountStatus ...@@ -29,8 +29,8 @@ class AccountStatus
protected $accountHistoryRepository; protected $accountHistoryRepository;
/** /**
* @param \ACP3\Core\Date $date * @param \ACP3\Core\Date $date
* @param \ACP3\Modules\ACP3\Newsletter\Model\Repository\AccountRepository $accountRepository * @param \ACP3\Modules\ACP3\Newsletter\Model\Repository\AccountRepository $accountRepository
* @param \ACP3\Modules\ACP3\Newsletter\Model\Repository\AccountHistoryRepository $accountHistoryRepository * @param \ACP3\Modules\ACP3\Newsletter\Model\Repository\AccountHistoryRepository $accountHistoryRepository
*/ */
public function __construct( public function __construct(
...@@ -44,26 +44,24 @@ class AccountStatus ...@@ -44,26 +44,24 @@ class AccountStatus
} }
/** /**
* @param int $status * @param int $status
* @param int|array $id * @param int|array $entryId
* *
* @return bool|int * @return bool|int
*/ */
public function changeAccountStatus($status, $id) public function changeAccountStatus($status, $entryId)
{ {
$bool = $this->accountRepository->update( $result = $this->accountRepository->update(['status' => $status], $entryId);
['status' => $status], $id
);
if (is_array($id)) { if (is_array($entryId)) {
$accountId = $this->retrieveAccountId($id); $accountId = $this->retrieveAccountId($entryId);
$this->addAccountHistory($status, $accountId); $this->addAccountHistory($status, $accountId);
} else { } else {
$this->addAccountHistory($status, $id); $this->addAccountHistory($status, $entryId);
} }
return $bool; return $result;
} }
/** /**
...@@ -83,18 +81,18 @@ class AccountStatus ...@@ -83,18 +81,18 @@ class AccountStatus
} }
/** /**
* @param array $id * @param array $entry
* *
* @return int * @return int
*/ */
protected function retrieveAccountId(array $id) protected function retrieveAccountId(array $entry)
{ {
switch (key($id)) { switch (key($entry)) {
case 'mail': case 'mail':
$account = $this->accountRepository->getOneByEmail($id['mail']); $account = $this->accountRepository->getOneByEmail($entry['mail']);
break; break;
case 'hash': case 'hash':
$account = $this->accountRepository->getOneByHash($id['hash']); $account = $this->accountRepository->getOneByHash($entry['hash']);
} }
return (!empty($account)) ? $account['id'] : 0; return (!empty($account)) ? $account['id'] : 0;
......
...@@ -144,34 +144,40 @@ class Subscribe ...@@ -144,34 +144,40 @@ class Subscribe
$systemSettings = $this->config->getSettings(\ACP3\Modules\ACP3\System\Installer\Schema::MODULE_NAME); $systemSettings = $this->config->getSettings(\ACP3\Modules\ACP3\System\Installer\Schema::MODULE_NAME);
$settings = $this->config->getSettings(Schema::MODULE_NAME); $settings = $this->config->getSettings(Schema::MODULE_NAME);
$subject = $this->translator->t('newsletter', 'subscribe_mail_subject', ['%title%' => $systemSettings['site_title']]); $body = $this->translator->t(
$body = $this->translator->t('newsletter', 'subscribe_mail_body', 'newsletter',
['{host}' => $this->request->getHost()]) . "\n\n"; 'subscribe_mail_body',
['{host}' => $this->request->getHost()]
$from = [ );
'email' => $settings['mail'], $body .= "\n\n";
'name' => $systemSettings['site_title']
]; $data = (new Core\Mailer\MailerMessage())
->setFrom([
$this->mailer 'email' => $settings['mail'],
->reset() 'name' => $systemSettings['site_title']
->setFrom($from) ])
->setSubject($subject) ->setSubject($this->translator->t(
->setMailSignature($settings['mailsig']); 'newsletter',
'subscribe_mail_subject',
['%title%' => $systemSettings['site_title']]
))
->setMailSignature($settings['mailsig'])
->setRecipients($emailAddress);
if ($settings['html'] == 1) { if ($settings['html'] == 1) {
$this->mailer->setTemplate('newsletter/layout.email.tpl'); $data->setTemplate('newsletter/layout.email.subscribe.tpl');
$body .= '<a href="' . $url . '">' . $url . '<a>'; $body .= '<a href="' . $url . '">' . $url . '<a>';
$this->mailer->setHtmlBody($this->stringFormatter->nl2p($body)); $data->setHtmlBody($this->stringFormatter->nl2p($body));
} else { } else {
$body .= $url; $body .= $url;
$this->mailer->setBody($body); $data->setBody($body);
} }
$this->mailer->setRecipients($emailAddress); return $this->mailer
->reset()
return $this->mailer->send(); ->setData($data)
->send();
} }
/** /**
......
{extends file="asset:Newsletter/layout.email.tpl"}
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1" "acp3/module-users": "^4.8.2"
}, },
"suggest": { "suggest": {
"acp3/module-captcha": "Provides basic protection against spam bots." "acp3/module-captcha": "Provides basic protection against spam bots."
......
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1" "acp3/module-users": "^4.8.2"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1" "acp3/module-users": "^4.8.2"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
{include file="asset:System/Partials/form_group.button_group.tpl" options=$search_areas required=true label={lang t="search|search_after_areas"}} {include file="asset:System/Partials/form_group.button_group.tpl" options=$search_areas required=true label={lang t="search|search_after_areas"}}
{include file="asset:System/Partials/form_group.button_group.tpl" options=$sort_hits required=true label={lang t="search|sort_hits"}} {include file="asset:System/Partials/form_group.button_group.tpl" options=$sort_hits required=true label={lang t="search|sort_hits"}}
</div> </div>
{include file="asset:System/Partials/form_group.submit.tpl" submitLabel={lang t="search|submit_search"}} {include file="asset:System/Partials/form_group.submit.tpl" submit_label={lang t="search|submit_search"}}
{javascripts} {javascripts}
{include_js module="search" file="frontend/index.index"} {include_js module="search" file="frontend/index.index"}
{/javascripts} {/javascripts}
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1" "acp3/module-users": "^4.8.2"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"acp3/composer-installer": "*", "acp3/composer-installer": "*",
"acp3/core": "^4.8.1", "acp3/core": "^4.8.2",
"acp3/setup": "^4.8.1", "acp3/setup": "^4.8.2",
"acp3/module-errors": "^4.8.1", "acp3/module-errors": "^4.8.2",
"acp3/module-permissions": "^4.8.1", "acp3/module-permissions": "^4.8.2",
"acp3/module-system": "^4.8.1", "acp3/module-system": "^4.8.2",
"acp3/module-users": "^4.8.1", "acp3/module-users": "^4.8.2",
"thepixeldeveloper/sitemap": "^4.4.2" "thepixeldeveloper/sitemap": "^4.4.2"
}, },
"autoload": { "autoload": {
......
{extends file="asset:System/Partials/form_group.base.tpl"} {extends file="asset:System/Partials/form_group.base.tpl"}
{block FORM_GROUP_FORM_FIELD} {block FORM_GROUP_FORM_FIELD}