Page MenuHomePhabricator

Special:Allmessages_(two_columns).patch

Authored By
bzimport
Nov 21 2014, 7:00 PM
Size
2 KB
Referenced Files
None
Subscribers
None

Special:Allmessages_(two_columns).patch

--- mediawiki-1.3.5/includes/SpecialAllmessages.php 2004-09-09 17:27:16.000000000 -0500
+++ wiki/includes/SpecialAllmessages.php 2004-10-12 02:53:21.000000000 -0500
@@ -72,15 +72,14 @@
$talk = $wgLang->getNsText( NS_TALK );
$mwnspace = $wgLang->getNsText( NS_MEDIAWIKI );
$mwtalk = $wgLang->getNsText( NS_MEDIAWIKI_TALK );
$txt = "
- <table border='1' cellspacing='0' width='100%'>
+ <table border='1' cellspacing='0' cellpadding='3' width='100%'>
<tr bgcolor='#b2b2ff'>
<th>Name</th>
- <th>Default text</th>
- <th>Current text</th>
+ <th>Text</th>
</tr>";
wfProfileIn( "$fname-check" );
# This is a nasty hack to avoid doing independent existence checks
# without sending the links and table through the slow wiki parser.
@@ -100,11 +99,12 @@
foreach( $messages as $key => $m ) {
$title = $wgLang->ucfirst( $key );
$titleObj =& Title::makeTitle( NS_MEDIAWIKI, $title );
$talkPage =& Title::makeTitle( NS_MEDIAWIKI_TALK, $title );
- $colorIt = ($m['statmsg'] == $m['msg']) ? " bgcolor=\"#f0f0ff\"" : " bgcolor=\"#ffe2e2\"";
+ $changed = ($m['statmsg'] != $m['msg']);
+
$message = htmlspecialchars( $m['statmsg'] );
$mw = htmlspecialchars( $m['msg'] );
#$pageLink = $sk->makeLinkObj( $titleObj, htmlspecialchars( $key ) );
#$talkLink = $sk->makeLinkObj( $talkPage, htmlspecialchars( $talk ) );
@@ -117,19 +117,41 @@
$talkLink = $sk->makeKnownLinkObj( $talkPage, htmlspecialchars( $talk ) );
} else {
$talkLink = $sk->makeBrokenLinkObj( $talkPage, htmlspecialchars( $talk ) );
}
+ if ($changed)
+ {
$txt .=
- "<tr$colorIt><td>
+ "<tr bgcolor='#ffe2e2'>
+ <td rowspan='2'>
$pageLink<br />
$talkLink
- </td><td>
+ </td>
+ <td>
$message
- </td><td>
+ </td>
+ </tr>
+ <tr bgcolor='#e2ffe2'>
+ <td>
$mw
- </td></tr>";
+ </td>
+ </tr>";
+ }
+ else
+ {
+ $txt .=
+ "<tr bgcolor='#f0f0ff'>
+ <td>
+ $pageLink<br />
+ $talkLink
+ </td>
+ <td>
+ $mw
+ </td>
+ </tr>";
+ }
}
$txt .= "</table>";
wfProfileOut( "$fname-output" );
wfProfileOut( $fname );

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1234
Default Alt Text
Special:Allmessages_(two_columns).patch (2 KB)

Event Timeline