Fix bug 4048 by adding a new 'privacy' link in footer. Disable it with '-'
authorAntoine Musso <hashar@users.mediawiki.org>
Tue, 29 Nov 2005 20:25:20 +0000 (20:25 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Tue, 29 Nov 2005 20:25:20 +0000 (20:25 +0000)
includes/Skin.php
includes/SkinTemplate.php
languages/Language.php
skins/MonoBook.php
skins/common/commonPrint.css

index 3560140..e2b3c4f 100644 (file)
@@ -526,6 +526,10 @@ END;
                if( $disclaimer ) {
                        $s .= ' | ' . $disclaimer;
                }
+               $privacy = $this->privacyLink(); # may be empty too
+               if( $privacy ) {
+                       $s .= ' | ' . $privacy;
+               }
 
                if ( $wgOut->isArticleRelated() ) {
                        if ( $wgTitle->getNamespace() == NS_IMAGE ) {
@@ -981,13 +985,21 @@ END;
                return $s;
        }
 
+       function privacyLink() {
+               $privacy = wfMsg( 'privacy' );
+               if ($privacy == '-') {
+                       return '';
+               } else {
+                       return $this->makeKnownLink( wfMsgForContent( 'privacypage' ), $privacy);
+               }
+       }
+
        function aboutLink() {
                $s = $this->makeKnownLink( wfMsgForContent( 'aboutpage' ),
                  wfMsg( 'aboutsite' ) );
                return $s;
        }
 
-
        function disclaimerLink() {
                $disclaimers = wfMsg( 'disclaimers' );
                if ($disclaimers == '-') {
index e743260..5b80782 100644 (file)
@@ -357,6 +357,7 @@ class SkinTemplate extends Skin {
                $tpl->set( 'copyrightico', $this->getCopyrightIcon() );
                $tpl->set( 'poweredbyico', $this->getPoweredBy() );
                $tpl->set( 'disclaimer', $this->disclaimerLink() );
+               $tpl->set( 'privacy', $this->privacyLink() );
                $tpl->set( 'about', $this->aboutLink() );
 
                $tpl->setRef( 'debug', $out->mDebugtext );
index 72304ff..d9c9ee3 100644 (file)
@@ -414,6 +414,8 @@ parent class in order maintain consistency across languages.
 
 'disclaimers' => 'Disclaimers',
 'disclaimerpage' => 'Project:General_disclaimer',
+'privacy' => 'Privacy policy',
+'privacypage' => 'Project:Privacy_policy',
 'errorpagetitle' => 'Error',
 'returnto'             => 'Return to $1.',
 'tagline'              => 'From {{SITENAME}}',
index 32ebab1..547eb9e 100644 (file)
@@ -223,6 +223,7 @@ class MonoBookTemplate extends QuickTemplate {
          <?php if($this->data['numberofwatchingusers' ]) { ?><li id="f-numberofwatchingusers"><?php  $this->html('numberofwatchingusers') ?></li><?php } ?>
          <?php if($this->data['credits'   ]) { ?><li id="f-credits"><?php    $this->html('credits')    ?></li><?php } ?>
          <?php if($this->data['copyright' ]) { ?><li id="f-copyright"><?php  $this->html('copyright')  ?></li><?php } ?>
+         <?php if($this->data['privacy'   ]) { ?><li id="f-privacy"><?php    $this->html('privacy')    ?></li><?php } ?>
          <?php if($this->data['about'     ]) { ?><li id="f-about"><?php      $this->html('about')      ?></li><?php } ?>
          <?php if($this->data['disclaimer']) { ?><li id="f-disclaimer"><?php $this->html('disclaimer') ?></li><?php } ?>
          <?php if($this->data['tagline']) { ?><li id="f-tagline"><?php echo $this->data['tagline'] ?></li><?php } ?>
index 5ad5e66..7dcb570 100644 (file)
@@ -105,7 +105,8 @@ div#f-poweredbyico,
 div#f-copyrightico,
 li#f-viewcount,
 li#f-about,
-li#f-disclaimer {
+li#f-disclaimer,
+li#f-privacy {
     /* Hides all the elements irrelevant for printing */
     display: none;
 }