Merge "Set context on RedirectSpecialPage in MediaWiki.php"
[lhc/web/wiklou.git] / includes / specialpage / QueryPage.php
index 2d25710..bb26cf3 100644 (file)
@@ -275,11 +275,14 @@ abstract class QueryPage extends SpecialPage {
        }
 
        /**
-        * Some special pages (for example SpecialListusers) might not return the
+        * Some special pages (for example SpecialListusers used to) might not return the
         * current object formatted, but return the previous one instead.
         * Setting this to return true will ensure formatResult() is called
         * one more time to make sure that the very last result is formatted
         * as well.
+        *
+        * @deprecated since 1.27
+        *
         * @return bool
         */
        function tryLastResult() {
@@ -333,13 +336,12 @@ abstract class QueryPage extends SpecialPage {
                                        );
                                }
 
-                               $that = $this;
                                $dbw->doAtomicSection(
                                        __METHOD__,
-                                       function ( IDatabase $dbw, $fname ) use ( $that, $vals ) {
+                                       function ( IDatabase $dbw, $fname ) use ( $vals ) {
                                                # Clear out any old cached data
                                                $dbw->delete( 'querycache',
-                                                       array( 'qc_type' => $that->getName() ),
+                                                       array( 'qc_type' => $this->getName() ),
                                                        $fname
                                                );
                                                # Save results into the querycache table on the master
@@ -348,11 +350,11 @@ abstract class QueryPage extends SpecialPage {
                                                }
                                                # Update the querycache_info record for the page
                                                $dbw->delete( 'querycache_info',
-                                                       array( 'qci_type' => $that->getName() ),
+                                                       array( 'qci_type' => $this->getName() ),
                                                        $fname
                                                );
                                                $dbw->insert( 'querycache_info',
-                                                       array( 'qci_type' => $that->getName(),
+                                                       array( 'qci_type' => $this->getName(),
                                                                'qci_timestamp' => $dbw->timestamp() ),
                                                        $fname
                                                );
@@ -660,12 +662,9 @@ abstract class QueryPage extends SpecialPage {
                                // @codingStandardsIgnoreEnd
                                $line = $this->formatResult( $skin, $row );
                                if ( $line ) {
-                                       $attr = ( isset( $row->usepatrol ) && $row->usepatrol && $row->patrolled == 0 )
-                                               ? ' class="not-patrolled"'
-                                               : '';
                                        $html[] = $this->listoutput
                                                ? $line
-                                               : "<li{$attr}>{$line}</li>\n";
+                                               : "<li>{$line}</li>\n";
                                }
                        }
 
@@ -674,12 +673,9 @@ abstract class QueryPage extends SpecialPage {
                                $row = null;
                                $line = $this->formatResult( $skin, $row );
                                if ( $line ) {
-                                       $attr = ( isset( $row->usepatrol ) && $row->usepatrol && $row->patrolled == 0 )
-                                               ? ' class="not-patrolled"'
-                                               : '';
                                        $html[] = $this->listoutput
                                                ? $line
-                                               : "<li{$attr}>{$line}</li>\n";
+                                               : "<li>{$line}</li>\n";
                                }
                        }