}
/**
- * @see \wcf\page\IPage::readData()
+ * @inheritDoc
*/
public function readData() {
+ // if sort field is `username`, `conversation.` has to prepended because `username`
+ // alone is ambiguous
+ if ($this->sortField === 'username') {
+ $this->sortField = 'conversation.username';
+ }
+
parent::readData();
+ // change back to old value
+ if ($this->sortField === 'conversation.username') {
+ $this->sortField = 'username';
+ }
+
if ($this->filter != '') {
// add breadcrumbs
- WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.conversation.conversations'), LinkHandler::getInstance()->getLink('ConversationList')));
+ // TODO: this is not working at the moment as PageLocationManager already sets this as the current page based on request data which is later discarded
+ PageLocationManager::getInstance()->addParentLocation('com.woltlab.wcf.conversation.ConversationList');
}
// read stats