Index: trunk/extensions/FlaggedRevs/FlaggedRevision.php |
— | — | @@ -44,30 +44,30 @@ |
45 | 45 | |
46 | 46 | /** |
47 | 47 | * @param Title $title |
48 | | - * @param int $rev_id |
| 48 | + * @param int $revId |
49 | 49 | * @param bool $getText, fetch fr_text and fr_flags too? |
50 | 50 | * @param bool $forUpdate, use master? |
51 | | - * @param int $page_id, optional page ID to use, will defer to $title if not given |
| 51 | + * @param int $pageId, optional page ID to use, will defer to $title if not given |
52 | 52 | * @returns mixed FlaggedRevision (null on failure) |
53 | 53 | * Will not return a revision if deleted |
54 | 54 | */ |
55 | | - public static function newFromTitle( $title, $rev_id, $getText=false, $forUpdate=false, $page_id=false ) { |
| 55 | + public static function newFromTitle( $title, $revId, $getText=false, $forUpdate=false, $pageId=false ) { |
56 | 56 | $columns = self::selectFields(); |
57 | 57 | if( $getText ) { |
58 | 58 | $columns += self::selectTextFields(); |
59 | 59 | } |
60 | 60 | $db = $forUpdate ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE ); |
61 | 61 | $flags = $forUpdate ? GAID_FOR_UPDATE : 0; |
62 | | - $page_id = $page_id ? $page_id : $title->getArticleID( $flags ); |
| 62 | + $pageId = $pageId ? $pageId : $title->getArticleID( $flags ); |
63 | 63 | # Short-circuit query |
64 | | - if( !$page_id ) { |
| 64 | + if( !$pageId ) { |
65 | 65 | return null; |
66 | 66 | } |
67 | 67 | # Skip deleted revisions |
68 | 68 | $row = $db->selectRow( array('flaggedrevs','revision'), |
69 | 69 | $columns, |
70 | | - array( 'fr_page_id' => $page_id, |
71 | | - 'fr_rev_id' => $rev_id, |
| 70 | + array( 'fr_page_id' => $pageId, |
| 71 | + 'fr_rev_id' => $revId, |
72 | 72 | 'rev_id = fr_rev_id', |
73 | 73 | 'rev_page = fr_page_id', |
74 | 74 | 'rev_deleted & '.Revision::DELETED_TEXT => 0 ), |