(bug 18487) Another fix for r48379: move up getMemcKey() as well
[lhc/web/wiklou.git] / includes / Article.php
index e56a384..339199e 100644 (file)
@@ -1174,7 +1174,7 @@ class Article {
        }
 
        public function deletetrackback() {
-               global $wgUser, $wgRequest, $wgOut, $wgTitle;
+               global $wgUser, $wgRequest, $wgOut;
                if( !$wgUser->matchEditToken($wgRequest->getVal('token')) ) {
                        $wgOut->addWikiMsg( 'sessionfailure' );
                        return;
@@ -2185,18 +2185,16 @@ class Article {
 
                // Find out if there was only one contributor
                // Only scan the last 20 revisions
-               $limit = 20;
                $res = $dbw->select( 'revision', 'rev_user_text',
-                       array( 'rev_page' => $this->getID() ), __METHOD__,
-                       array( 'LIMIT' => $limit )
+                       array( 'rev_page' => $this->getID(), 'rev_deleted & '.Revision::DELETED_USER.'=0' ),
+                       __METHOD__,
+                       array( 'LIMIT' => 20 )
                );
                if( $res === false )
                        // This page has no revisions, which is very weird
                        return false;
-               if( $res->numRows() > 1 )
-                               $hasHistory = true;
-               else
-                               $hasHistory = false;
+                       
+               $hasHistory = ( $res->numRows() > 1 );
                $row = $dbw->fetchObject( $res );
                $onlyAuthor = $row->rev_user_text;
                // Try to find a second contributor
@@ -2413,10 +2411,10 @@ class Article {
                if( $wgUser->isAllowed( 'suppressrevision' ) ) {
                        $suppress = "<tr id=\"wpDeleteSuppressRow\" name=\"wpDeleteSuppressRow\">
                                        <td></td>
-                                       <td class='mw-input'>" .
+                                       <td class='mw-input'><strong>" .
                                                Xml::checkLabel( wfMsg( 'revdelete-suppress' ),
                                                        'wpSuppress', 'wpSuppress', false, array( 'tabindex' => '4' ) ) .
-                                       "</td>
+                                       "</strong></td>
                                </tr>";
                } else {
                        $suppress = '';
@@ -3439,7 +3437,7 @@ class Article {
         * @param $title Title object
         * @return array
         */
-       protected function pageCountInfo( $title ) {
+       public function pageCountInfo( $title ) {
                $id = $title->getArticleId();
                if( $id == 0 ) {
                        return false;