From: Niklas Laxström Date: Tue, 5 Jul 2005 19:15:13 +0000 (+0000) Subject: * (bug 2534) Hide edit sections with CSS to make right click to edit section work X-Git-Tag: 1.5.0beta3~45 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=22b7e7c831884259f248b297d5ff5aaf66aac5eb;p=lhc%2Fweb%2Fwiklou.git * (bug 2534) Hide edit sections with CSS to make right click to edit section work * Remove some unneeded stuff!? --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index aa20ded840..86d1b8e76e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -503,6 +503,7 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new. == Changes since 1.5beta2 == * Escaped & correctly in Special:Contributions +* (bug 2534) Hide edit sections with CSS to make right click to edit section work === Caveats === diff --git a/includes/Parser.php b/includes/Parser.php index 163e65462d..bff43b96d6 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3427,7 +3427,7 @@ class ParserOptions $this->mSkin =& $user->getSkin(); wfProfileOut( $fname.'-skin' ); $this->mDateFormat = $user->getOption( 'date' ); - $this->mEditSection = $user->getOption( 'editsection' ); + $this->mEditSection = true; $this->mNumberHeadings = $user->getOption( 'numberheadings' ); $this->mAllowSpecialInclusion = $wgAllowSpecialInclusion; wfProfileOut( $fname ); diff --git a/includes/Skin.php b/includes/Skin.php index ad48e25210..b6405a3dbb 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -293,6 +293,9 @@ END; if( !$wgUser->getOption( 'showtoc' ) ) { $s .= "#toc { display: none; }\n"; } + if( !$wgUser->getOption( 'editsection' ) ) { + $s .= ".editsection { display: none; }\n"; + } return $s; } @@ -495,7 +498,7 @@ END; function doAfterContent() { } function pageTitleLinks() { - global $wgOut, $wgTitle, $wgUser, $wgContLang, $wgUseApproval, $wgRequest; + global $wgOut, $wgTitle, $wgUser, $wgContLang, $wgRequest; extract( $wgRequest->getValues( 'oldid', 'diff' ) ); $action = $wgRequest->getText( 'action' ); @@ -516,16 +519,6 @@ END; $s .= " | {$name}"; } } - # This will show the "Approve" link if $wgUseApproval=true; - if ( isset ( $wgUseApproval ) && $wgUseApproval ) - { - $t = $wgTitle->getDBkey(); - $name = 'Approve this article' ; - $link = "http://test.wikipedia.org/w/magnus/wiki.phtml?title={$t}&action=submit&doit=1" ; - #htmlspecialchars( wfImageUrl( $name ) ); - $style = $this->getExternalLinkAttributes( $link, $name ); - $s .= " | {$name}" ; - } } if ( 'history' == $action || isset( $diff ) || isset( $oldid ) ) { $s .= ' | ' . $this->makeKnownLinkObj( $wgTitle, diff --git a/includes/User.php b/includes/User.php index edf98ef2a1..2d676c6e8f 100644 --- a/includes/User.php +++ b/includes/User.php @@ -1435,7 +1435,6 @@ class User { $confstr = $this->getOption( 'math' ); $confstr .= '!' . $this->getOption( 'stubthreshold' ); - $confstr .= '!' . $this->getOption( 'editsection' ); $confstr .= '!' . $this->getOption( 'date' ); $confstr .= '!' . $this->getOption( 'numberheadings' ); $confstr .= '!' . $this->getOption( 'language' );