summaryrefslogtreecommitdiff
path: root/skins/Standard.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-06-22 11:28:20 +0200
committerPierre Schmitz <pierre@archlinux.de>2011-06-22 11:28:20 +0200
commit9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch)
tree46d1a0dee7febef5c2d57a9f7b972be16a163b3d /skins/Standard.php
parent78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff)
update to MediaWiki 1.17.0
Diffstat (limited to 'skins/Standard.php')
-rw-r--r--skins/Standard.php59
1 files changed, 26 insertions, 33 deletions
diff --git a/skins/Standard.php b/skins/Standard.php
index e57cfaf9..2ea6896d 100644
--- a/skins/Standard.php
+++ b/skins/Standard.php
@@ -20,34 +20,30 @@ class SkinStandard extends Skin {
*
*/
function setupSkinUserCss( OutputPage $out ){
- if ( 3 == $this->qbSetting() ) { # Floating left
- $out->addStyle( 'common/quickbar.css' );
- } elseif ( 4 == $this->qbSetting() ) { # Floating right
- $out->addStyle( 'common/quickbar-right.css' );
- }
- parent::setupSkinUserCss( $out );
- }
-
- /**
- *
- */
- function reallyGenerateUserStylesheet() {
- $s = parent::reallyGenerateUserStylesheet();
+ global $wgContLang;
$qb = $this->qbSetting();
+ $rules = array();
if ( 2 == $qb ) { # Right
- $s .= "#quickbar { position: absolute; top: 4px; right: 4px; " .
- "border-left: 2px solid #000000; }\n" .
- "#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }\n";
+ $rules[] = "#quickbar { position: absolute; top: 4px; right: 4px; border-left: 2px solid #000000; }";
+ $rules[] = "#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }";
} elseif ( 1 == $qb || 3 == $qb ) {
- $s .= "#quickbar { position: absolute; top: 4px; left: 4px; " .
- "border-right: 1px solid gray; }\n" .
- "#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }\n";
+ $rules[] = "#quickbar { position: absolute; top: 4px; left: 4px; border-right: 1px solid gray; }";
+ $rules[] = "#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }";
+ if( 3 == $qb ) {
+ $rules[] = "#quickbar { position: fixed; padding: 4px; }";
+ }
} elseif ( 4 == $qb ) {
- $s .= "#quickbar { border-right: 1px solid gray; }\n" .
- "#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }\n";
+ $rules[] = "#quickbar { position: fixed; right: 0px; top: 0px; padding: 4px;}";
+ $rules[] = "#quickbar { border-right: 1px solid gray; }";
+ $rules[] = "#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }";
}
- return $s;
+ $style = implode( "\n", $rules );
+ if ( $wgContLang->getDir() === 'rtl' ) {
+ $style = CSSJanus::transform( $style, true, false );
+ }
+ $out->addInlineStyle( $style );
+ parent::setupSkinUserCss( $out );
}
function doAfterContent() {
@@ -81,7 +77,7 @@ class SkinStandard extends Skin {
$s .= "\n<br />" . $wgLang->pipeList( array(
$this->mainPageLink(),
$this->aboutLink(),
- $this->specialLink( 'recentchanges' ),
+ $this->specialLink( 'Recentchanges' ),
$this->searchForm() ) )
. '<br /><span id="pagestats">' . $this->pageStats() . '</span>';
@@ -103,7 +99,6 @@ class SkinStandard extends Skin {
function quickBar() {
global $wgOut, $wgUser, $wgRequest, $wgContLang;
- global $wgEnableUploads, $wgRemoteUploads;
wfProfileIn( __METHOD__ );
@@ -131,7 +126,7 @@ class SkinStandard extends Skin {
}
if( $wgUser->isLoggedIn() ) {
- $s.= $this->specialLink( 'watchlist' ) ;
+ $s.= $this->specialLink( 'Watchlist' ) ;
$s .= $sep . $this->linkKnown(
SpecialPage::getTitleFor( 'Contributions' ),
wfMsg( 'mycontris' ),
@@ -187,7 +182,8 @@ class SkinStandard extends Skin {
}
$link = $this->mTitle->getText();
- if( $nstext = $wgContLang->getNsText( $tns ) ) { # add namespace if necessary
+ $nstext = $wgContLang->getNsText( $tns );
+ if( $nstext ) { # add namespace if necessary
$link = $nstext . ':' . $link;
}
@@ -215,10 +211,6 @@ class SkinStandard extends Skin {
array( 'known', 'noclasses' )
);
- #if( $tns%2 && $action!='edit' && !$wpPreview) {
- #$s.= '<br />'.$this->linkKnown( Title::newFromText( $wgTitle->getPrefixedText() ),wfMsg('postcomment'),array(),array('action'=>'edit','section'=>'new'));
- #}
-
/*
watching could cause problems in edit mode:
if user edits article, then loads "watch this article" in background and then saves
@@ -264,10 +256,11 @@ class SkinStandard extends Skin {
$s .= "\n<br /><hr class='sep' />";
}
- if ( $wgUser->isLoggedIn() && ( $wgEnableUploads || $wgRemoteUploads ) ) {
- $s .= $this->specialLink( 'upload' ) . $sep;
+ if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) {
+ $s .= $this->getUploadLink() . $sep;
}
- $s .= $this->specialLink( 'specialpages' );
+
+ $s .= $this->specialLink( 'Specialpages' );
global $wgSiteSupportPage;
if( $wgSiteSupportPage ) {