Cenarium has uploaded a new change for review.
https://gerrit.wikimedia.org/r/263863
Change subject: Better guess for patrol action
......................................................................
Better guess for patrol action
The "return to" guess of the patrol action for non-JS users now also
checks uploads, and in that case let users return to Special:NewFiles.
Change-Id: Ib8e472c16b7034524ef3b79a5eb426f7edda6ec2
---
M includes/actions/MarkpatrolledAction.php
1 file changed, 8 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/63/263863/1
diff --git a/includes/actions/MarkpatrolledAction.php
b/includes/actions/MarkpatrolledAction.php
index 4016f67..ec873d9 100644
--- a/includes/actions/MarkpatrolledAction.php
+++ b/includes/actions/MarkpatrolledAction.php
@@ -63,8 +63,14 @@
}
# It would be nice to see where the user had actually come
from, but for now just guess
- $returnto = $rc->getAttribute( 'rc_type' ) == RC_NEW ?
'Newpages' : 'Recentchanges';
- $return = SpecialPage::getTitleFor( $returnto );
+ if ( $rc->getAttribute( 'rc_type' ) == RC_NEW ) {
+ $returnTo = 'Newpages';
+ } elseif ( $rc->getAttribute( 'rc_log_type' ) == 'upload' ) {
+ $returnTo = 'Newfiles';
+ } else {
+ $returnTo = 'Recentchanges';
+ }
+ $return = SpecialPage::getTitleFor( $returnTo );
if ( in_array( array( 'markedaspatrollederror-noautopatrol' ),
$errors ) ) {
$this->getOutput()->setPageTitle( $this->msg(
'markedaspatrollederror' ) );
--
To view, visit https://gerrit.wikimedia.org/r/263863
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib8e472c16b7034524ef3b79a5eb426f7edda6ec2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Cenarium <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits