<changeFreq>weekly</changeFreq>
<rebuildTime>2592000</rebuildTime>
</type>
+ <type>
+ <name>com.woltlab.wcf.sitemap.object.article</name>
+ <definitionname>com.woltlab.wcf.sitemap.object</definitionname>
+ <classname>wcf\system\sitemap\object\ArticleSitemapObject</classname>
+ <priority>0.5</priority>
+ <changeFreq>monthly</changeFreq>
+ <rebuildTime>259200</rebuildTime>
+ </type>
<!-- /sitemap -->
<!-- deprecated -->
--- /dev/null
+<?php
+namespace wcf\system\sitemap\object;
+use wcf\data\article\content\ArticleContent;
+use wcf\data\article\Article;
+use wcf\data\DatabaseObject;
+
+/**
+ * Article sitemap implementation.
+ *
+ * @author Joshua Ruesweg
+ * @copyright 2001-2017 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\Sitemap\Object
+ * @since 3.1
+ */
+class ArticleSitemapObject extends AbstractSitemapObjectObjectType {
+ /**
+ * @inheritDoc
+ */
+ public function getObjectClass() {
+ return ArticleContent::class;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function canView(DatabaseObject $object) {
+ /** @var $object ArticleContent */
+ if ($object->getArticle()->publicationStatus != Article::PUBLISHED) {
+ return false;
+ }
+
+ if ($object->getArticle()->getCategory()) {
+ return $object->getArticle()->getCategory()->isAccessible(self::getGuestUserProfile()->getDecoratedObject());
+ }
+
+ return self::getGuestUserProfile()->getPermission('user.article.canRead');
+ }
+}
<item name="wcf.acp.sitemap.edit"><![CDATA[Sitemap bearbeiten]]></item>
<item name="wcf.acp.sitemap.objectType.com.woltlab.wcf.sitemap.object.user"><![CDATA[Benutzer]]></item>
<item name="wcf.acp.sitemap.objectType.com.woltlab.wcf.sitemap.object.articleCategory"><![CDATA[Artikel-Kategorien]]></item>
+ <item name="wcf.acp.sitemap.objectType.com.woltlab.wcf.sitemap.object.article"><![CDATA[Artikel]]></item>
</category>
<category name="wcf.acp.stat">
<item name="wcf.acp.sitemap.edit"><![CDATA[Edit Sitemap]]></item>
<item name="wcf.acp.sitemap.objectType.com.woltlab.wcf.sitemap.object.user"><![CDATA[User]]></item>
<item name="wcf.acp.sitemap.objectType.com.woltlab.wcf.sitemap.object.articleCategory"><![CDATA[Article categories]]></item>
+ <item name="wcf.acp.sitemap.objectType.com.woltlab.wcf.sitemap.object.article"><![CDATA[Article]]></item>
</category>
<category name="wcf.acp.stat">