r35856 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35855‎ | r35856 | r35857 >
Date:12:53, 4 June 2008
Author:aaron
Status:old
Tags:
Comment:
Rename vars
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevision.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevision.php
@@ -44,30 +44,30 @@
4545
4646 /**
4747 * @param Title $title
48 - * @param int $rev_id
 48+ * @param int $revId
4949 * @param bool $getText, fetch fr_text and fr_flags too?
5050 * @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
5252 * @returns mixed FlaggedRevision (null on failure)
5353 * Will not return a revision if deleted
5454 */
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 ) {
5656 $columns = self::selectFields();
5757 if( $getText ) {
5858 $columns += self::selectTextFields();
5959 }
6060 $db = $forUpdate ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE );
6161 $flags = $forUpdate ? GAID_FOR_UPDATE : 0;
62 - $page_id = $page_id ? $page_id : $title->getArticleID( $flags );
 62+ $pageId = $pageId ? $pageId : $title->getArticleID( $flags );
6363 # Short-circuit query
64 - if( !$page_id ) {
 64+ if( !$pageId ) {
6565 return null;
6666 }
6767 # Skip deleted revisions
6868 $row = $db->selectRow( array('flaggedrevs','revision'),
6969 $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,
7272 'rev_id = fr_rev_id',
7373 'rev_page = fr_page_id',
7474 'rev_deleted & '.Revision::DELETED_TEXT => 0 ),

Status & tagging log