Merge "Tests for Revision::userCanBitfield"
[lhc/web/wiklou.git] / includes / page / Article.php
index 3767ecc..c9dc273 100644 (file)
@@ -590,7 +590,7 @@ class Article implements Page {
                                                        $outputPage->setRobotPolicy( 'noindex,nofollow' );
 
                                                        $errortext = $error->getWikiText( false, 'view-pool-error' );
-                                                       $outputPage->addWikiText( '<div class="errorbox">' . $errortext . '</div>' );
+                                                       $outputPage->addWikiText( Html::errorBox( $errortext ) );
                                                }
                                                # Connection or timeout error
                                                return;
@@ -1179,7 +1179,8 @@ class Article implements Page {
                $cache = MediaWikiServices::getInstance()->getMainObjectStash();
                $key = $cache->makeKey( 'page-recent-delete', md5( $title->getPrefixedText() ) );
                $loggedIn = $this->getContext()->getUser()->isLoggedIn();
-               if ( $loggedIn || $cache->get( $key ) ) {
+               $sessionExists = $this->getContext()->getRequest()->getSession()->isPersistent();
+               if ( $loggedIn || $cache->get( $key ) || $sessionExists ) {
                        $logTypes = [ 'delete', 'move', 'protect' ];
 
                        $dbr = wfGetDB( DB_REPLICA );
@@ -1196,7 +1197,7 @@ class Article implements Page {
                                        'lim' => 10,
                                        'conds' => $conds,
                                        'showIfEmpty' => false,
-                                       'msgKey' => [ $loggedIn
+                                       'msgKey' => [ $loggedIn || $sessionExists
                                                ? 'moveddeleted-notice'
                                                : 'moveddeleted-notice-recent'
                                        ]