Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2331
skin-disable-footers.diff.txt
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 8:50 PM
2014-11-21 20:50:45 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
skin-disable-footers.diff.txt
View Options
Index: Skin.php
===================================================================
--- Skin.php (revision 19925)
+++ Skin.php (working copy)
@@ -1202,29 +1202,29 @@
return $s;
}
- function privacyLink() {
- $privacy = wfMsg( 'privacy' );
- if ($privacy == '-') {
+ private function footerLink ( $desc, $page ) {
+ // if the link description has been set to "-" in the default language,
+ if ( wfMsgForContent( $desc ) == '-') {
+ // then it is disabled, for all languages.
return '';
} else {
- return $this->makeKnownLink( wfMsgForContent( 'privacypage' ), $privacy);
+ // Otherwise, we display the link for the user, described in their
+ // language (which may or may not be the same as the default language),
+ // but we make the link target be the one site-wide page.
+ return $this->makeKnownLink( wfMsgForContent( $page ), wfMsg( $desc ) );
}
}
+ function privacyLink() {
+ return $this->footerLink( 'privacy', 'privacypage' );
+ }
+
function aboutLink() {
- $s = $this->makeKnownLink( wfMsgForContent( 'aboutpage' ),
- wfMsg( 'aboutsite' ) );
- return $s;
+ return $this->footerLink( 'aboutsite', 'aboutpage' );
}
function disclaimerLink() {
- $disclaimers = wfMsg( 'disclaimers' );
- if ($disclaimers == '-') {
- return '';
- } else {
- return $this->makeKnownLink( wfMsgForContent( 'disclaimerpage' ),
- $disclaimers );
- }
+ return $this->footerLink( 'disclaimers', 'disclaimerpage' );
}
function editThisPage() {
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1907
Default Alt Text
skin-disable-footers.diff.txt (1 KB)
Attached To
Mode
T5678: Allow disabling MediaWiki:aboutsite in the same way as MediaWiki:Disclaimers
Attached
Detach File
Event Timeline
Log In to Comment