Page MenuHomePhabricator

skin-disable-footers.diff.txt

Authored By
bzimport
Nov 21 2014, 8:50 PM
Size
1 KB
Referenced Files
None
Subscribers
None

skin-disable-footers.diff.txt

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

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)

Event Timeline