Bartosz Dziewoński has uploaded a new change for review.
https://gerrit.wikimedia.org/r/94615
Change subject: EnhancedChangesList: Minor formatting fixes
......................................................................
EnhancedChangesList: Minor formatting fixes
* Simplify the logic for inserting separators
* Add missing separator when $wgRCShowWatchingUsers is enabled
* Add closing </td></tr> tags for "title" of changes list row
Salvaged from I795d9c28 (abandoned).
Change-Id: I5500b23bf35f302f0410b6fca3e4d02c490752f9
---
M includes/changes/EnhancedChangesList.php
1 file changed, 12 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/15/94615/1
diff --git a/includes/changes/EnhancedChangesList.php
b/includes/changes/EnhancedChangesList.php
index 3b724f1..150105c 100644
--- a/includes/changes/EnhancedChangesList.php
+++ b/includes/changes/EnhancedChangesList.php
@@ -291,7 +291,7 @@
array_push( $users, $text );
}
- $users = ' <span class="changedby">'
+ $users = '<span class="changedby">'
. $this->msg( 'brackets' )->rawParams(
implode( $this->message['semicolon-separator'],
$users )
)->escaped() . '</span>';
@@ -402,8 +402,6 @@
$r .= $this->msg( 'parentheses' )->rawParams( $logtext
)->escaped();
}
- $r .= ' <span class="mw-changeslist-separator">. .</span> ';
-
# Character difference (does not apply if only log items)
if ( $wgRCShowChangedSize && !$allLogs ) {
$last = 0;
@@ -418,15 +416,20 @@
# Get net change
$chardiff = $this->formatCharacterDifference(
$block[$first], $block[$last] );
- if ( $chardiff == '' ) {
- $r .= ' ';
- } else {
- $r .= ' ' . $chardiff . ' <span
class="mw-changeslist-separator">. .</span> ';
+ if ( $chardiff ) {
+ $r .= ' <span
class="mw-changeslist-separator">. .</span> ' . $chardiff;
}
}
- $r .= $users;
- $r .= $this->numberofWatchingusers(
$block[0]->numberofWatchingusers );
+ $r .= ' <span class="mw-changeslist-separator">. .</span> ' .
$users;
+
+ # This is not shown by default, see $wgRCShowWatchingUsers
+ $watchingUsers = $this->numberofWatchingusers(
$block[0]->numberofWatchingusers );
+ if ( $watchingUsers ) {
+ $r .= ' <span class="mw-changeslist-separator">.
.</span> ' . $watchingUsers;
+ }
+
+ $r .= '</td></tr>';
# Sub-entries
foreach ( $block as $rcObj ) {
--
To view, visit https://gerrit.wikimedia.org/r/94615
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5500b23bf35f302f0410b6fca3e4d02c490752f9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits