dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4775997
)
Made ChangesList generate page links with rcid=x for new pages when $wgUseNPPatrol...
author
Aaron Schulz
<aaron@users.mediawiki.org>
Sat, 19 Nov 2011 05:37:24 +0000
(
05:37
+0000)
committer
Aaron Schulz
<aaron@users.mediawiki.org>
Sat, 19 Nov 2011 05:37:24 +0000
(
05:37
+0000)
includes/ChangesList.php
patch
|
blob
|
history
diff --git
a/includes/ChangesList.php
b/includes/ChangesList.php
index
0462a2b
..
d8eab43
100644
(file)
--- a/
includes/ChangesList.php
+++ b/
includes/ChangesList.php
@@
-483,6
+483,18
@@
class ChangesList extends ContextSource {
public function insertExtra( &$s, &$rc, &$classes ) {
## Empty, used for subclassers to add anything special.
}
public function insertExtra( &$s, &$rc, &$classes ) {
## Empty, used for subclassers to add anything special.
}
+
+ protected function showAsUnpatrolled( RecentChange $rc ) {
+ $unpatrolled = false;
+ if ( !$rc->mAttribs['rc_patrolled'] ) {
+ if ( $this->getUser()->useRCPatrol() ) {
+ $unpatrolled = true;
+ } elseif ( $this->getUser()->useNPPatrol() && $rc->mAttribs['rc_new'] ) {
+ $unpatrolled = true;
+ }
+ }
+ return $unpatrolled;
+ }
}
}
@@
-498,8
+510,9
@@
class OldChangesList extends ChangesList {
public function recentChangesLine( &$rc, $watched = false, $linenumber = null ) {
global $wgRCShowChangedSize;
wfProfileIn( __METHOD__ );
public function recentChangesLine( &$rc, $watched = false, $linenumber = null ) {
global $wgRCShowChangedSize;
wfProfileIn( __METHOD__ );
+
# Should patrol-related stuff be shown?
# Should patrol-related stuff be shown?
- $unpatrolled = $this->
getUser()->useRCPatrol() && !$rc->mAttribs['rc_patrolled']
;
+ $unpatrolled = $this->
showAsUnpatrolled( $rc )
;
$dateheader = ''; // $s now contains only <li>...</li>, for hooks' convenience.
$this->insertDateHeader( $dateheader, $rc->mAttribs['rc_timestamp'] );
$dateheader = ''; // $s now contains only <li>...</li>, for hooks' convenience.
$this->insertDateHeader( $dateheader, $rc->mAttribs['rc_timestamp'] );
@@
-633,11
+646,7
@@
class EnhancedChangesList extends ChangesList {
}
# Should patrol-related stuff be shown?
}
# Should patrol-related stuff be shown?
- if( $this->getUser()->useRCPatrol() ) {
- $rc->unpatrolled = !$rc->mAttribs['rc_patrolled'];
- } else {
- $rc->unpatrolled = false;
- }
+ $rc->unpatrolled = $this->showAsUnpatrolled( $rc );
$showdifflinks = true;
# Make article link
$showdifflinks = true;
# Make article link