Index: trunk/phase3/includes/Article.php |
— | — | @@ -571,34 +571,17 @@ |
572 | 572 | |
573 | 573 | /** |
574 | 574 | * Read/write accessor to select FOR UPDATE |
| 575 | + * @FIXME: remove, does nothing |
575 | 576 | * |
576 | 577 | * @param $x Mixed: FIXME |
577 | 578 | * @return mixed value of $x, or value stored in Article::mForUpdate |
578 | 579 | */ |
579 | 580 | public function forUpdate( $x = null ) { |
| 581 | + wfDeprecated(); |
580 | 582 | return wfSetVar( $this->mForUpdate, $x ); |
581 | 583 | } |
582 | 584 | |
583 | 585 | /** |
584 | | - * Get options for all SELECT statements |
585 | | - * |
586 | | - * @param $options Array: an optional options array which'll be appended to |
587 | | - * the default |
588 | | - * @return Array: options |
589 | | - */ |
590 | | - protected function getSelectOptions( $options = '' ) { |
591 | | - if ( $this->mForUpdate ) { |
592 | | - if ( is_array( $options ) ) { |
593 | | - $options[] = 'FOR UPDATE'; |
594 | | - } else { |
595 | | - $options = 'FOR UPDATE'; |
596 | | - } |
597 | | - } |
598 | | - |
599 | | - return $options; |
600 | | - } |
601 | | - |
602 | | - /** |
603 | 586 | * @return int Page ID |
604 | 587 | */ |
605 | 588 | public function getID() { |
— | — | @@ -638,8 +621,7 @@ |
639 | 622 | $this->mCounter = $dbr->selectField( 'page', |
640 | 623 | 'page_counter', |
641 | 624 | array( 'page_id' => $id ), |
642 | | - __METHOD__, |
643 | | - $this->getSelectOptions() |
| 625 | + __METHOD__ |
644 | 626 | ); |
645 | 627 | } |
646 | 628 | } |
— | — | @@ -2939,10 +2921,11 @@ |
2940 | 2922 | 'page_namespace' => $this->mTitle->getNamespace(), |
2941 | 2923 | 'page_title' => $this->mTitle->getDBkey(), |
2942 | 2924 | 'rev_page = page_id' |
2943 | | - ), __METHOD__, $this->getSelectOptions( array( |
| 2925 | + ), __METHOD__, |
| 2926 | + array( |
2944 | 2927 | 'ORDER BY' => 'rev_timestamp DESC', |
2945 | 2928 | 'LIMIT' => $num |
2946 | | - ) ) |
| 2929 | + ) |
2947 | 2930 | ); |
2948 | 2931 | |
2949 | 2932 | if ( !$res ) { |
— | — | @@ -4127,8 +4110,7 @@ |
4128 | 4111 | 'watchlist', |
4129 | 4112 | 'COUNT(*)', |
4130 | 4113 | $wl_clause, |
4131 | | - __METHOD__, |
4132 | | - $this->getSelectOptions() ); |
| 4114 | + __METHOD__ ); |
4133 | 4115 | |
4134 | 4116 | $pageInfo = $this->pageCountInfo( $page ); |
4135 | 4117 | $talkInfo = $this->pageCountInfo( $page->getTalkPage() ); |
— | — | @@ -4172,15 +4154,13 @@ |
4173 | 4155 | 'revision', |
4174 | 4156 | 'COUNT(rev_page)', |
4175 | 4157 | $rev_clause, |
4176 | | - __METHOD__, |
4177 | | - $this->getSelectOptions() |
| 4158 | + __METHOD__ |
4178 | 4159 | ); |
4179 | 4160 | $authors = $dbr->selectField( |
4180 | 4161 | 'revision', |
4181 | 4162 | 'COUNT(DISTINCT rev_user_text)', |
4182 | 4163 | $rev_clause, |
4183 | | - __METHOD__, |
4184 | | - $this->getSelectOptions() |
| 4164 | + __METHOD__ |
4185 | 4165 | ); |
4186 | 4166 | |
4187 | 4167 | return array( 'edits' => $edits, 'authors' => $authors ); |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -987,7 +987,6 @@ |
988 | 988 | # Article exists. Check for edit conflict. |
989 | 989 | |
990 | 990 | $this->mArticle->clear(); # Force reload of dates, etc. |
991 | | - $this->mArticle->forUpdate( true ); # Lock the article |
992 | 991 | |
993 | 992 | wfDebug( "timestamp: {$this->mArticle->getTimestamp()}, edittime: {$this->edittime}\n" ); |
994 | 993 | |