Index: trunk/phase3/includes/diff/DifferenceEngine.php |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | } |
168 | 168 | |
169 | 169 | // Prepare a change patrol link, if applicable |
170 | | - if( $wgUseRCPatrol && $wgUser->isAllowed( 'patrol' ) ) { |
| 170 | + if( $wgUseRCPatrol && $this->mTitle->userCan('patrol') ) { |
171 | 171 | // If we've been given an explicit change identifier, use it; saves time |
172 | 172 | if( $this->mRcidMarkPatrolled ) { |
173 | 173 | $rcid = $this->mRcidMarkPatrolled; |
— | — | @@ -177,10 +177,10 @@ |
178 | 178 | array( |
179 | 179 | // Add redundant user,timestamp condition so we can use the existing index |
180 | 180 | 'rc_user_text' => $this->mNewRev->getUserText( Revision::FOR_THIS_USER ), |
181 | | - 'rc_timestamp' => $db->timestamp( $this->mNewRev->getTimestamp() ), |
| 181 | + 'rc_timestamp' => $db->timestamp( $this->mNewRev->getTimestamp() ), |
182 | 182 | 'rc_this_oldid' => $this->mNewid, |
183 | 183 | 'rc_last_oldid' => $this->mOldid, |
184 | | - 'rc_patrolled' => 0 |
| 184 | + 'rc_patrolled' => 0 |
185 | 185 | ), |
186 | 186 | __METHOD__ |
187 | 187 | ); |
— | — | @@ -194,10 +194,10 @@ |
195 | 195 | // Build the link |
196 | 196 | if( $rcid ) { |
197 | 197 | $patrol = ' <span class="patrollink">[' . $sk->makeKnownLinkObj( |
198 | | - $this->mTitle, |
199 | | - wfMsgHtml( 'markaspatrolleddiff' ), |
200 | | - "action=markpatrolled&rcid={$rcid}" |
201 | | - ) . ']</span>'; |
| 198 | + $this->mTitle, |
| 199 | + wfMsgHtml( 'markaspatrolleddiff' ), |
| 200 | + "action=markpatrolled&rcid={$rcid}" |
| 201 | + ) . ']</span>'; |
202 | 202 | } else { |
203 | 203 | $patrol = ''; |
204 | 204 | } |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -914,7 +914,7 @@ |
915 | 915 | |
916 | 916 | # If we have been passed an &rcid= parameter, we want to give the user a |
917 | 917 | # chance to mark this new article as patrolled. |
918 | | - if( !is_null( $rcid ) && $rcid != 0 && $wgUser->isAllowed( 'patrol' ) && $this->mTitle->exists() ) { |
| 918 | + if( !empty($rcid) && $this->mTitle->exists() && $this->mTitle->userCan('patrol') ) { |
919 | 919 | $wgOut->addHTML( |
920 | 920 | "<div class='patrollink'>" . |
921 | 921 | wfMsgHtml( 'markaspatrolledlink', |