jobs to the job table to update pages which use the edited page as a template.
* The LivePreviewPrepare and LivePreviewDone events triggered on "jQuery( mw )"
have been deprecated in favour of using mw.hook.
+* The 'showjumplinks' user preference has been removed, jump links are now
+ always included.
== Compatibility ==
'rows' => 25,
'searchlimit' => 20,
'showhiddencats' => 0,
- 'showjumplinks' => 1,
'shownumberswatching' => 1,
'showtoc' => 1,
'showtoolbar' => 1,
'section' => 'rendering/advancedrendering',
'label-message' => 'tog-showhiddencats'
);
- $defaultPreferences['showjumplinks'] = array(
- 'type' => 'toggle',
- 'section' => 'rendering/advancedrendering',
- 'label-message' => 'tog-showjumplinks',
- );
if ( $wgAllowUserCssPrefs ) {
$defaultPreferences['justify'] = array(
$tpl->set( 'rtl', $userLang->isRTL() );
$tpl->set( 'capitalizeallnouns', $userLang->capitalizeAllNouns() ? ' capitalize-all-nouns' : '' );
- $tpl->set( 'showjumplinks', $user->getOption( 'showjumplinks' ) );
+ $tpl->set( 'showjumplinks', true ); // showjumplinks preference has been removed
$tpl->set( 'username', $this->loggedin ? $this->username : null );
$tpl->setRef( 'userpage', $this->userpage );
$tpl->setRef( 'userpageurl', $this->userpageUrlDetails['href'] );
return $_GET;
}
+ /**
+ * Return the contents of the Query with no decoding. Use when you need to
+ * know exactly what was sent, e.g. for an OAuth signature over the elements.
+ *
+ * @return String
+ */
+ public function getRawQueryString() {
+ return $_SERVER['QUERY_STRING'];
+ }
+
+ /**
+ * Return the contents of the POST with no decoding. Use when you need to
+ * know exactly what was sent, e.g. for an OAuth signature over the elements.
+ *
+ * @return String
+ */
+ public function getRawPostString() {
+ if ( !$this->wasPosted() ) {
+ return '';
+ }
+ return $this->getRawInput();
+ }
+
+ /**
+ * Return the raw request body, with no processing. Cached since some methods
+ * disallow reading the stream more than once. As stated in the php docs, this
+ * does not work with enctype="multipart/form-data".
+ *
+ * @return String
+ */
+ public function getRawInput() {
+ static $input = false;
+ if ( $input === false ) {
+ $input = file_get_contents( 'php://input' );
+ }
+ return $input;
+ }
+
/**
* Get the HTTP method used for this request.
*
return false;
}
+ /**
+ * FauxRequests shouldn't depend on raw request data (but that could be implemented here)
+ * @return String
+ */
+ public function getRawQueryString() {
+ return '';
+ }
+
+ /**
+ * FauxRequests shouldn't depend on raw request data (but that could be implemented here)
+ * @return String
+ */
+ public function getRawPostString() {
+ return '';
+ }
+
+ /**
+ * FauxRequests shouldn't depend on raw request data (but that could be implemented here)
+ * @return String
+ */
+ public function getRawInput() {
+ return '';
+ }
+
/**
* @param array $extWhitelist
* @return bool
}
/**
+ * Get the user language used by the parser for this page.
+ *
* You shouldn't use this. Really. $parser->getFunctionLang() is all you need.
- * Using this fragments the cache and is discouraged. Yes, {{int: }} uses this,
- * producing inconsistent tables (Bug 14404).
+ *
+ * To avoid side-effects where the page will be rendered based on the language
+ * of the user who last saved, this function will triger a cache fragmentation.
+ * Usage of this method is discouraged for that reason.
+ *
+ * When saving, this will return the default language instead of the user's.
+ *
+ * {{int: }} uses this which used to produce inconsistent link tables (bug 14404).
*
* @return Language object
* @since 1.19
'tog-shownumberswatching' => 'Show the number of watching users',
'tog-oldsig' => 'Existing signature:',
'tog-fancysig' => 'Treat signature as wikitext (without an automatic link)',
-'tog-showjumplinks' => 'Enable "jump to" accessibility links',
'tog-uselivepreview' => 'Use live preview (requires JavaScript) (experimental)',
'tog-forceeditsummary' => 'Prompt me when entering a blank edit summary',
'tog-watchlisthideown' => 'Hide my edits from the watchlist',
'tog-shownumberswatching',
'tog-oldsig',
'tog-fancysig',
- 'tog-showjumplinks',
'tog-uselivepreview',
'tog-forceeditsummary',
'tog-watchlisthideown',
$this->error( "MediaWiki isn't configured for Memcached usage", 1 );
}
+ # find out the longest server string to nicely align output later on
+ $maxSrvLen = $servers ? max( array_map( 'strlen', $servers ) ) : 0;
+
foreach ( $servers as $server ) {
- $this->output( $server . " ", $server );
+ $this->output(
+ str_pad( $server, $maxSrvLen ),
+ $server # output channel
+ );
+
$mcc = new MemCachedClientforWiki( array(
'persistant' => true,
'timeout' => $wgMemCachedTimeout
}
$exectime = $this->microtime_float() - $time_start;
- $this->output( "set: $set incr: $incr get: $get time: $exectime", $server );
+ $this->output( " set: $set incr: $incr get: $get time: $exectime", $server );
}
}
$link.attr( 'accesskey', accesskey );
}
- // nextnode is a DOM element (was the only option before MW 1.17, in wikibits.js)
- // so we make it a jQuery object!
- if ( nextnode && nextnode.nodeType ) {
- nextnode = $( nextnode );
- }
-
- // Where to put our node ?
- // - nextnode is a jQuery object that represents exactly one element
- if ( nextnode && nextnode.jquery && nextnode.length === 1 && nextnode[0].parentNode === $ul[0] ) {
- nextnode.before( $item );
-
- // - nextnode is a CSS selector for jQuery
- } else if ( typeof nextnode === 'string' && $ul.find( nextnode ).length !== 0 ) {
- $ul.find( nextnode ).eq( 0 ).before( $item );
-
- // If the jQuery selector isn't found within the <ul>,
- // or if nextnode was invalid or not passed at all,
- // then just append it at the end of the <ul> (this is the default behavior)
- } else {
- $ul.append( $item );
+ if ( nextnode ) {
+ if ( nextnode.nodeType || typeof nextnode === 'string' ) {
+ // nextnode is a DOM element (was the only option before MW 1.17, in wikibits.js)
+ // or nextnode is a CSS selector for jQuery
+ nextnode = $ul.find( nextnode );
+ } else if ( !nextnode.jquery || nextnode[0].parentNode !== $ul[0] ) {
+ // Fallback
+ $ul.append( $item );
+ return $item[0];
+ }
+ if ( nextnode.length === 1 ) {
+ // nextnode is a jQuery object that represents exactly one element
+ nextnode.before( $item );
+ return $item[0];
+ }
}
+ // Fallback (this is the default behavior)
+ $ul.append( $item );
return $item[0];
+
},
/**
<div id="contentSub"<?php $this->html( 'userlangattributes' ) ?>><?php $this->html( 'subtitle' ) ?></div>
<?php if ( $this->data['undelete'] ) { ?><div id="contentSub2"><?php $this->html( 'undelete' ) ?></div><?php } ?>
- <?php if ( $this->data['showjumplinks'] ) { ?><div id="jump-to-nav"><?php $this->msg( 'jumpto' ) ?> <a href="#mw_portlets"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg( 'jumptosearch' ) ?></a></div><?php } ?>
+ <div id="jump-to-nav"><?php $this->msg( 'jumpto' ) ?> <a href="#mw_portlets"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg( 'jumptosearch' ) ?></a></div>
<?php $this->html( 'bodytext' ) ?>
<div class='mw_clear'></div>
<div id="contentSub2"><?php $this->html( 'undelete' ) ?></div>
<?php } ?><?php if ( $this->data['newtalk'] ) { ?>
<div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
-<?php } ?><?php if ( $this->data['showjumplinks'] ) { ?>
- <div id="jump-to-nav" class="mw-jump"><?php $this->msg( 'jumpto' ) ?> <a href="#column-one"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg( 'jumptosearch' ) ?></a></div>
<?php } ?>
+ <div id="jump-to-nav" class="mw-jump"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div>
+
<!-- start content -->
<?php $this->html( 'bodytext' ) ?>
<?php if ( $this->data['catlinks'] ) { $this->html( 'catlinks' ); } ?>
<?php if ( $this->data['newtalk'] ) { ?>
<div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
<?php } ?>
- <?php if ( $this->data['showjumplinks'] ) { ?>
<div id="jump-to-nav" class="mw-jump">
<?php $this->msg( 'jumpto' ) ?>
<a href="#mw-navigation"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?>
<a href="#p-search"><?php $this->msg( 'jumptosearch' ) ?></a>
</div>
- <?php } ?>
<?php $this->html( 'bodycontent' ) ?>
<?php if ( $this->data['printfooter'] ) { ?>
<div class="printfooter">