Commit 032c70d0 authored by Tino Goratsch's avatar Tino Goratsch

Merge branch 'release/v4.26.3'

parents 8e976c0c 686a16cf
Pipeline #19655556 canceled with stages
in 6 minutes and 56 seconds
......@@ -16,7 +16,7 @@ interface BootstrapInterface extends HttpKernelInterface
/**
* Contains the current ACP3 version string.
*/
const VERSION = '4.26.2';
const VERSION = '4.26.3';
/**
* Performs some startup checks.
......
{extends file="asset:`$LAYOUT`"}
{block CONTENT}
<div class="well well-small">
<div class="well well-sm">
<h4>{lang t="acp|access_to_modules"}</h4>
<ul>
{foreach $modules as $module}
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3"
},
"autoload": {
"psr-4": {
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3"
},
"suggest": {
"acp3/module-seo": "Provides additional SEO capabilities"
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3"
},
"autoload": {
"psr-4": {
......
......@@ -4,17 +4,25 @@
*/
/* global onloadCallback:true */
onloadCallback = function() {
jQuery('.recaptcha-placeholder').each(function() {
onloadCallback = function () {
jQuery('.recaptcha-placeholder').each(function () {
if (jQuery(this).children().length === 0) {
grecaptcha.render(this.id, {
var widgetId = grecaptcha.render(this.id, {
'sitekey': this.dataset.sitekey,
'size': this.dataset.size
});
jQuery(this).data('recaptchaId', widgetId);
}
});
};
jQuery(document).on('acp3.captcha.recaptcha', function() {
jQuery(document).on('acp3.captcha.recaptcha', function () {
onloadCallback();
});
jQuery(document).on('acp3.ajaxFrom.submit.fail', function (event, ajaxForm) {
grecaptcha.reset(
jQuery(ajaxForm.element).find('.recaptcha-placeholder').data('recaptchaId')
);
});
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2",
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3",
"google/recaptcha": "^1.1.0"
},
"autoload": {
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3"
},
"autoload": {
"psr-4": {
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3"
},
"suggest": {
"acp3/module-captcha": "Provides basic protection against spam bots."
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3"
},
"suggest": {
"acp3/module-captcha": "Provides basic protection against spam bots."
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3"
},
"autoload": {
"psr-4": {
......
......@@ -17,11 +17,11 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3"
},
"autoload": {
"psr-4": {
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2",
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3",
"mibe/feedwriter": "^1.0"
},
"autoload": {
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3"
},
"autoload": {
"psr-4": {
......
......@@ -17,13 +17,13 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2",
"acp3/module-categories": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3",
"acp3/module-categories": "^4.26.3"
},
"suggest": {
"acp3/module-seo": "Provides additional SEO capabilities"
......
......@@ -69,12 +69,12 @@ class Edit extends AbstractFormAction
if (!empty($picture)) {
$this->breadcrumb
->append($picture['title'], 'acp/gallery/pictures/index/id_' . $picture['gallery_id'])
->append($picture['gallery_title'], 'acp/gallery/pictures/index/id_' . $picture['gallery_id'])
->append($this->translator->t('gallery', 'admin_pictures_edit'));
$this->title
->setPageTitlePrefix(
$picture['title']
$picture['gallery_title']
. $this->title->getPageTitleSeparator()
. $this->translator->t('gallery', 'picture_x', ['%picture%' => $picture['pic']])
);
......
......@@ -93,12 +93,14 @@ class GeneratePictureUriAliasOnModelAfterSaveListener
\sprintf(Gallery\Helpers::URL_KEY_PATTERN_GALLERY, $galleryId)
);
$robotsSetting = array_flip($this->metaStatements->getRobotsMap());
$this->uriAliasManager->insertUriAlias(
\sprintf(Gallery\Helpers::URL_KEY_PATTERN_PICTURE, $pictureId),
$alias,
$seoKeywords,
$seoDescription,
$seoRobots
$robotsSetting[$seoRobots] ?? 0
);
}
}
......
......@@ -58,8 +58,8 @@ services:
- '@gallery.helpers'
- '@gallery.model.picturerepository'
- '@gallery.cache'
calls:
- ['setUriAliasManager', ['@?seo.helper.uri_alias_manager']]
- '@?seo.helper.uri_alias_manager'
- '@?share.helpers.social_sharing_manager'
gallery.controller.admin.pictures.edit:
class: ACP3\Modules\ACP3\Gallery\Controller\Admin\Pictures\Edit
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3"
},
"suggest": {
"acp3/module-seo": "Provides additional SEO capabilities"
......
/*
* Copyright (c) by the ACP3 Developers.
* See the LICENSE file at the top-level module directory for licensing details.
*/
jQuery(document).ready(function ($) {
$('#modal-create').on('shown.bs.modal', function () {
$(this).find('[data-ajax-form="true"]').formSubmit();
});
});
......@@ -11,6 +11,9 @@
<p class="text-center">
<a href="{uri args="guestbook/index/create"}" id="create-link" title="{lang t="guestbook|create"}" data-toggle="modal" data-target="#modal-create">{lang t="guestbook|create"}</a>
</p>
{javascripts}
{include_js module="guestbook" file="frontend/index.index"}
{/javascripts}
{else}
<p class="text-center">
<a href="{uri args="guestbook/index/create"}" id="create-link" title="{lang t="guestbook|create"}">{lang t="guestbook|create"}</a>
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3"
},
"suggest": {
"acp3/module-captcha": "Provides basic protection against spam bots."
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3"
},
"autoload": {
"psr-4": {
......
......@@ -17,13 +17,13 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2",
"acp3/module-categories": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3",
"acp3/module-categories": "^4.26.3"
},
"suggest": {
"acp3/module-seo": "Provides additional SEO capabilities"
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3"
},
"suggest": {
"acp3/module-captcha": "Provides basic protection against spam bots."
......
......@@ -17,11 +17,11 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3"
},
"autoload": {
"psr-4": {
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3"
},
"autoload": {
"psr-4": {
......
......@@ -17,12 +17,12 @@
"prefer-stable": true,
"require": {
"acp3/composer-installer": "^1.0",
"acp3/core": "^4.26.2",
"acp3/setup": "^4.26.2",
"acp3/module-errors": "^4.26.2",
"acp3/module-permissions": "^4.26.2",
"acp3/module-system": "^4.26.2",
"acp3/module-users": "^4.26.2"
"acp3/core": "^4.26.3",
"acp3/setup": "^4.26.3",
"acp3/module-errors": "^4.26.3",
"acp3/module-permissions": "^4.26.3",
"acp3/module-system": "^4.26.3",
"acp3/module-users": "^4.26.3"
},
"autoload": {
"psr-4": {
......
......@@ -63,6 +63,13 @@ class MetaStatements
*/
private $isActive;
private static $robotSettingsMaps = [
1 => 'index,follow',
2 => 'index,nofollow',
3 => 'noindex,follow',
4 => 'noindex,nofollow',
];
/**
* MetaStatements constructor.
*
......@@ -91,7 +98,7 @@ class MetaStatements
*
* @return $this
*/
public function setPageRobotsSettings($metaRobots)
public function setPageRobotsSettings(string $metaRobots)
{
$this->metaRobots = $metaRobots;
......@@ -103,7 +110,7 @@ class MetaStatements
*
* @return array
*/
public function getMetaTags()
public function getMetaTags(): array
{
if ($this->isActive) {
if (!$this->isInAdmin() && empty($this->canonicalUrl)) {
......@@ -126,7 +133,7 @@ class MetaStatements
/**
* @return bool
*/
private function isInAdmin()
private function isInAdmin(): bool
{
return $this->request->getArea() === AreaEnum::AREA_ADMIN;
}
......@@ -136,7 +143,7 @@ class MetaStatements
*
* @return string
*/
public function getPageDescription()
public function getPageDescription(): string
{
$description = $this->getDescription($this->request->getUriWithoutPages());
if (empty($description)) {
......@@ -160,7 +167,7 @@ class MetaStatements
/**
* @return array
*/
protected function getSeoSettings()
protected function getSeoSettings(): array
{
return $this->config->getSettings(Schema::MODULE_NAME);
}
......@@ -172,7 +179,7 @@ class MetaStatements
*
* @return string
*/
public function getDescription($path)
public function getDescription(string $path): string
{
return $this->getSeoInformation($path, 'description');
}
......@@ -182,7 +189,7 @@ class MetaStatements
*
* @return string
*/
public function getPageKeywords()
public function getPageKeywords(): string
{
$keywords = $this->getKeywords($this->request->getUriWithoutPages());
if (empty($keywords)) {
......@@ -202,7 +209,7 @@ class MetaStatements
*
* @return string
*/
public function getKeywords($path)
public function getKeywords(string $path): string
{
return $this->getSeoInformation($path, 'keywords');
}
......@@ -214,7 +221,7 @@ class MetaStatements
*
* @return string
*/
public function getTitle($path)
public function getTitle(string $path): string
{
return $this->getSeoInformation($path, 'title');
}
......@@ -226,7 +233,7 @@ class MetaStatements
*
* @return string
*/
public function getSeoInformation($path, $key, $defaultValue = '')
public function getSeoInformation(string $path, string $key, string $defaultValue = ''): string
{
if (!$this->isActive) {
return '';
......@@ -247,7 +254,7 @@ class MetaStatements
*
* @return string
*/
public function getPageRobotsSetting()
public function getPageRobotsSetting(): string
{
if (!empty($this->metaRobots)) {
return $this->metaRobots;
......@@ -271,17 +278,10 @@ class MetaStatements
*
* @return string
*/
public function getRobotsSetting($path = '')
public function getRobotsSetting(string $path = ''): string
{
$replace = [
1 => 'index,follow',
2 => 'index,nofollow',
3 => 'noindex,follow',
4 => 'noindex,nofollow',
];
if ($path === '') {
return \strtr($this->getSeoSettings()['robots'], $replace);
return \strtr($this->getSeoSettings()['robots'], $this->getRobotsMap());
}
$robot = $this->getSeoInformation($path, 'robots', 0);
......@@ -290,19 +290,24 @@ class MetaStatements
$robot = $this->getSeoSettings()['robots'];
}
return \strtr($robot, $replace);
return \strtr($robot, $this->getRobotsMap());
}
public function getRobotsMap(): array
{
return self::$robotSettingsMaps;
}
/**
* Sets a SEO description postfix for te current page.
*
* @param string $string
* @param string $value
*
* @return $this
*/
public function setDescriptionPostfix($string)
public function setDescriptionPostfix(string $value)
{
$this->metaDescriptionPostfix = $string;
$this->metaDescriptionPostfix = $value;
return $this;
}
......@@ -314,7 +319,7 @@ class MetaStatements
*
* @return $this
*/
public function setCanonicalUri($path)
public function setCanonicalUri(string $path)
{
$this->canonicalUrl = $path;
......@@ -328,7 +333,7 @@ class MetaStatements
*
* @return $this
*/
public function setNextPage($path)
public function setNextPage(string $path)
{
$this->nextPage = $path;