Index: trunk/extensions/CodeReview/ui/CodeReleaseNotes.php |
— | — | @@ -50,23 +50,23 @@ |
51 | 51 | global $wgOut; |
52 | 52 | $linker = new CodeCommentLinkerHtml( $this->mRepo ); |
53 | 53 | $dbr = wfGetDB( DB_SLAVE ); |
| 54 | + $where = array(); |
54 | 55 | if ( $this->mEndRev ) { |
55 | | - $where = 'cr_id BETWEEN ' . intval( $this->mStartRev ) . ' AND ' . intval( $this->mEndRev ); |
| 56 | + $where[] = 'cr_id BETWEEN ' . intval( $this->mStartRev ) . ' AND ' . intval( $this->mEndRev ); |
56 | 57 | } else { |
57 | | - $where = 'cr_id >= ' . intval( $this->mStartRev ); |
| 58 | + $where[] = 'cr_id >= ' . intval( $this->mStartRev ); |
58 | 59 | } |
59 | 60 | if ( $this->mPath ) { |
60 | | - $where .= ' AND cr_path = ' . $dbr->addQuotes( $this->mPath ); |
| 61 | + $where[] = 'cr_path' => $this->mPath; |
61 | 62 | } |
62 | 63 | # Select commits within this range... |
63 | 64 | $res = $dbr->select( array( 'code_rev', 'code_tags' ), |
64 | 65 | array( 'cr_message', 'cr_author', 'cr_id', 'ct_tag AS rnotes' ), |
65 | | - array( |
| 66 | + array_merge( array( |
66 | 67 | 'cr_repo_id' => $this->mRepo->getId(), // this repo |
67 | 68 | "cr_status NOT IN('reverted','deferred','fixme')", // not reverted/deferred/fixme |
68 | 69 | "cr_message != ''", |
69 | | - $where // in range |
70 | | - ), |
| 70 | + ), $where ), |
71 | 71 | __METHOD__, |
72 | 72 | array( 'ORDER BY' => 'cr_id DESC' ), |
73 | 73 | array( 'code_tags' => array( 'LEFT JOIN', # Tagged for release notes? |