Add access modifiers to MagicWord.php
[lhc/web/wiklou.git] / includes / page / Article.php
index caff619..f6b490a 100644 (file)
@@ -636,7 +636,7 @@ class Article implements Page {
                                        # the correct version information.
                                        $outputPage->setRevisionId( $this->getRevIdFetched() );
                                        # Preload timestamp to avoid a DB hit
-                                       $outputPage->setRevisionTimestamp( $this->getTimestamp() );
+                                       $outputPage->setRevisionTimestamp( $this->mPage->getTimestamp() );
 
                                        # Pages containing custom CSS or JavaScript get special treatment
                                        if ( $this->getTitle()->isCssOrJsPage() || $this->getTitle()->isCssJsSubpage() ) {
@@ -1252,8 +1252,7 @@ class Article implements Page {
                if ( $title->getNamespace() == NS_USER
                        || $title->getNamespace() == NS_USER_TALK
                ) {
-                       $parts = explode( '/', $title->getText() );
-                       $rootPart = $parts[0];
+                       $rootPart = explode( '/', $title->getText() )[0];
                        $user = User::newFromName( $rootPart, false /* allow IP users*/ );
                        $ip = User::isIP( $rootPart );
                        $block = Block::newFromTarget( $user, $user );