Revert "[MCR] Turn Revision into a proxy to new code."
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderWikiModule.php
index 6eddfc0..bebc188 100644 (file)
@@ -183,10 +183,12 @@ class ResourceLoaderWikiModule extends ResourceLoaderModule {
         * @return Content|null
         */
        protected function getContentObj( Title $title ) {
-               $revision = Revision::newKnownCurrent( wfGetDB( DB_REPLICA ), $title );
+               $revision = Revision::newKnownCurrent( wfGetDB( DB_REPLICA ), $title->getArticleID(),
+                       $title->getLatestRevID() );
                if ( !$revision ) {
                        return null;
                }
+               $revision->setTitle( $title );
                $content = $revision->getContent( Revision::RAW );
                if ( !$content ) {
                        wfDebugLog( 'resourceloader', __METHOD__ . ': failed to load content of JS/CSS page!' );