Index: trunk/phase3/includes/Title.php |
— | — | @@ -2932,8 +2932,13 @@ |
2933 | 2933 | public function getPreviousRevisionID( $revision, $flags=0 ) { |
2934 | 2934 | $db = ($flags & GAID_FOR_UPDATE) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE ); |
2935 | 2935 | return $db->selectField( 'revision', 'rev_id', |
2936 | | - 'rev_page=' . intval( $this->getArticleId($flags) ) . |
2937 | | - ' AND rev_id<' . intval( $revision ) . ' ORDER BY rev_id DESC' ); |
| 2936 | + array( |
| 2937 | + 'rev_page' => $this->getArticleId($flags), |
| 2938 | + 'rev_id < ' . intval( $revision ) |
| 2939 | + ), |
| 2940 | + __METHOD__, |
| 2941 | + array( 'ORDER BY' => 'rev_id DESC' ) |
| 2942 | + ); |
2938 | 2943 | } |
2939 | 2944 | |
2940 | 2945 | /** |
— | — | @@ -2946,8 +2951,13 @@ |
2947 | 2952 | public function getNextRevisionID( $revision, $flags=0 ) { |
2948 | 2953 | $db = ($flags & GAID_FOR_UPDATE) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE ); |
2949 | 2954 | return $db->selectField( 'revision', 'rev_id', |
2950 | | - 'rev_page=' . intval( $this->getArticleId($flags) ) . |
2951 | | - ' AND rev_id>' . intval( $revision ) . ' ORDER BY rev_id' ); |
| 2955 | + array( |
| 2956 | + 'rev_page' => $this->getArticleId($flags), |
| 2957 | + 'rev_id > ' . intval( $revision ) |
| 2958 | + ), |
| 2959 | + __METHOD__, |
| 2960 | + array( 'ORDER BY' => 'rev_id' ) |
| 2961 | + ); |
2952 | 2962 | } |
2953 | 2963 | |
2954 | 2964 | /** |