Merge "Follow-up I0bb4ed7f7: Use correct 'this'"
[lhc/web/wiklou.git] / includes / Revision.php
index d5449b4..d9d3149 100644 (file)
@@ -357,7 +357,7 @@ class Revision implements IDBAccessObject {
                        'rev_sha1',
                ];
 
-               $fields += CommentStore::newKey( 'rev_comment' )->getFields();
+               $fields += CommentStore::getStore()->getFields( 'rev_comment' );
 
                if ( $wgContentHandlerUseDB ) {
                        $fields[] = 'rev_content_format';
@@ -394,7 +394,7 @@ class Revision implements IDBAccessObject {
                        'ar_sha1',
                ];
 
-               $fields += CommentStore::newKey( 'ar_comment' )->getFields();
+               $fields += CommentStore::getStore()->getFields( 'ar_comment' );
 
                if ( $wgContentHandlerUseDB ) {
                        $fields[] = 'ar_content_format';
@@ -906,6 +906,11 @@ class Revision implements IDBAccessObject {
                        return $this->mRecord->getContent( 'main', $audience, $user );
                }
                catch ( RevisionAccessException $e ) {
+                       wfDebugLog(
+                               'T184670',
+                               __METHOD__ . ": Cannot get content: " . $e->getMessage() .
+                               "\n" . $e->getTraceAsString()
+                       );
                        return null;
                }
        }