public $validSortFields = [
'time',
'comments',
- 'views'
+ 'views',
+ 'random'
];
/**
break;
}
+ if ($this->sortField === 'random') {
+ $this->sortField = 'RAND()';
+ }
+
return $objectList;
}
<item name="wcf.article.commentResponse"><![CDATA[Antwort auf Artikel-Kommentar]]></item>
<item name="wcf.article.sortField.comments"><![CDATA[Kommentare]]></item>
<item name="wcf.article.sortField.cumulativeLikes"><![CDATA[Likes]]></item>
+ <item name="wcf.article.sortField.random"><![CDATA[Zufällig]]></item>
<item name="wcf.article.sortField.time"><![CDATA[Datum]]></item>
<item name="wcf.article.sortField.views"><![CDATA[Zugriffe]]></item>
<item name="wcf.article.markAllAsRead"><![CDATA[Alle Artikel als gelesen markieren]]></item>
<item name="wcf.article.commentResponse"><![CDATA[Reply to Article Comment]]></item>
<item name="wcf.article.sortField.comments"><![CDATA[Comments]]></item>
<item name="wcf.article.sortField.cumulativeLikes"><![CDATA[Likes]]></item>
+ <item name="wcf.article.sortField.random"><![CDATA[Random]]></item>
<item name="wcf.article.sortField.time"><![CDATA[Date]]></item>
<item name="wcf.article.sortField.views"><![CDATA[Views]]></item>
<item name="wcf.article.markAllAsRead"><![CDATA[Mark All Articles as Read]]></item>