openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 869eeb0ee58c4af6730582ce24a55aebd605d1e5
parent 8326e8079de2f8a4608fc4c1c532fc7310c622d2
Author: Jan Dankert <develop@jandankert.de>
Date:   Sat,  2 Jul 2022 00:14:56 +0200

Fix: do not use page extensions in link (if configured in the project)

Diffstat:
Mmodules/cms/generator/link/PublicLink.class.php | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/cms/generator/link/PublicLink.class.php b/modules/cms/generator/link/PublicLink.class.php @@ -60,8 +60,12 @@ class PublicLink implements LinkFormat /** + * Creates a link from an object to another object. + * * @param $from \cms\model\BaseObject * @param $to \cms\model\BaseObject + * + * @return string the url */ public function linkToObject( BaseObject $from, BaseObject $to ) { @@ -134,7 +138,7 @@ class PublicLink implements LinkFormat $withModel = ! $fromProject->content_negotiation && - ! $fromProject->publishPageExtension && + $fromProject->publishPageExtension && (count($allModels) > 1 || $publishConfig->get('filename_type','always') == 'always'); $languagePart = '';