Merge branch 'master' into next
authorMatthias Schmidt <gravatronics@live.com>
Mon, 5 Sep 2016 19:19:09 +0000 (21:19 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 5 Sep 2016 19:19:09 +0000 (21:19 +0200)
1  2 
files/lib/page/ConversationListPage.class.php

index cf81299719f41e19e87c8d34ab8a3bd39b52e710,a35f918ae326c9087cd399e7c8a76933fca77016..282629883e3c4625603a5dfdea8d6b5b9949becc
@@@ -157,15 -141,25 +157,26 @@@ class ConversationListPage extends Sort
        }
        
        /**
 -       * @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