File tree Expand file tree Collapse file tree
wcfsetup/install/files/lib/page Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ public function readParameters()
5151 if (isset ($ _REQUEST ['filters ' ]) && \is_array ($ _REQUEST ['filters ' ])) {
5252 $ this ->filters = $ _REQUEST ['filters ' ];
5353 }
54+
55+ $ this ->canonicalURL = $ this ->getCanonicalUrl ();
5456 }
5557
5658 #[\Override]
@@ -139,21 +141,19 @@ protected function getHeadContent(): string
139141 );
140142 }
141143
142- $ linkTags [] = \sprintf (
143- '<link rel="canonical" href="%s"> ' ,
144- StringUtil::encodeHTML (
145- LinkHandler::getInstance ()->getControllerLink (static ::class, \array_merge (
146- $ this ->getBaseUrlParameters (),
147- [
148- 'pageNo ' => $ this ->listView ->getPageNo () !== 1 ? $ this ->listView ->getPageNo () : null ,
149- ]
150- ))
151- )
152- );
153-
154144 return \implode ("\n" , $ linkTags );
155145 }
156146
147+ protected function getCanonicalUrl (): string
148+ {
149+ return LinkHandler::getInstance ()->getControllerLink (static ::class, \array_merge (
150+ $ this ->getBaseUrlParameters (),
151+ [
152+ 'pageNo ' => $ this ->pageNo !== 1 ? $ this ->pageNo : null ,
153+ ]
154+ ));
155+ }
156+
157157 /**
158158 * Returns the list view instance for the rendering of this page.
159159 *
You can’t perform that action at this time.
0 commit comments