$indent = false;
}
if ( $indent !== false && $arrowPos !== false ) {
- $textToInsert = "$indent$key ";
$arrowIndentLength = $arrowPos - $pos - $indentLength - strlen( $key );
if ( $arrowIndentLength > 0 ) {
$arrowIndent = str_repeat( ' ', $arrowIndentLength );
# Needs the sockets extension
if ( preg_match( '!^(tcp|udp):(?://)?\[([0-9a-fA-F:]+)\]:(\d+)(?:/(.*))?$!', $file, $m ) ) {
// IPv6 bracketed host
- $protocol = $m[1];
$host = $m[2];
$port = intval( $m[3] );
$prefix = isset( $m[4] ) ? $m[4] : false;
$domain = AF_INET6;
} elseif ( preg_match( '!^(tcp|udp):(?://)?([a-zA-Z0-9.-]+):(\d+)(?:/(.*))?$!', $file, $m ) ) {
- $protocol = $m[1];
$host = $m[2];
if ( !IP::isIPv4( $host ) ) {
$host = gethostbyname( $host );
if( count($paramArray) >= 1 ) {
$revdel = SpecialPage::getTitleFor( 'Revisiondelete' );
// $paramArray[1] is a CSV of the IDs
- $Ids = explode( ',', $paramArray[0] );
$query = $paramArray[0];
// Link to each hidden object ID, $paramArray[1] is the url param
$revert = '(' . $this->skin->link(
*/
function getMsgFromNamespace( $title, $code ) {
global $wgAdaptiveMessageCache;
- $big = false;
$this->load( $code );
if ( isset( $this->mCache[$code][$title] ) ) {
*/
function setupUserCss( OutputPage $out ) {
global $wgRequest;
- global $wgUseSiteCss, $wgAllowUserCss, $wgAllowUserCssPrefs, $wgSquidMaxage;
+ global $wgUseSiteCss, $wgAllowUserCss, $wgAllowUserCssPrefs;
wfProfileIn( __METHOD__ );
$this->setupSkinUserCss( $out );
-
- $siteargs = array(
- 'action' => 'raw',
- 'maxage' => $wgSquidMaxage,
- );
-
// Add any extension CSS
foreach ( $out->getExtStyle() as $url ) {
$out->addStyle( $url );
}
# Reject various classes of invalid names
- $name = $t->getText();
global $wgAuth;
$name = $wgAuth->getCanonicalName( $t->getText() );
$keys['$CHANGEDORCREATED'] = wfMsgForContent( 'created' );
}
- if ($wgEnotifImpersonal && $this->oldid)
+ if ($wgEnotifImpersonal && $this->oldid) {
/*
* For impersonal mail, show a diff link to the last
* revision.
*/
$keys['$NEWPAGE'] = wfMsgForContent('enotif_lastdiff',
$this->title->getFullURL("oldid={$this->oldid}&diff=next"));
+ }
$body = strtr( $body, $keys );
$pagetitle = $this->title->getPrefixedText();
} else {
print '<li>Foreign keys done</li>';
}
- $res = null;
// TODO: populate interwiki links
}
# Get a list of available locales.
- $lines = $ret = false;
+ $ret = false;
$lines = wfShellExec( '/usr/bin/locale -a', $ret );
if ( $ret ) {
private function parseOptions( $instring ) {
$opts = array();
- $lines = explode( "\n", $instring );
// foo
// foo=bar
// foo="bar baz"
if ( preg_match_all( $regex, $instring, $matches, PREG_SET_ORDER ) ) {
foreach ( $matches as $bits ) {
- $match = array_shift( $bits );
+ array_shift( $bits );
$key = strtolower( array_shift( $bits ) );
if ( count( $bits ) == 0 ) {
$opts[$key] = true;
<div id="p-namespaces" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
<h5><?php $this->msg('namespaces') ?></h5>
<ul<?php $this->html('userlangattributes') ?>>
- <?php foreach ($this->data['namespace_urls'] as $key => $link ): ?>
+ <?php foreach ($this->data['namespace_urls'] as $link ): ?>
<li <?php echo $link['attributes'] ?>><span><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></span></li>
<?php endforeach; ?>
</ul>
<div id="p-variants" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
<?php if ( $wgVectorShowVariantName ): ?>
<h4>
- <?php foreach ( $this->data['variant_urls'] as $key => $link ): ?>
+ <?php foreach ( $this->data['variant_urls'] as $link ): ?>
<?php if ( stripos( $link['attributes'], 'selected' ) !== false ): ?>
<?php echo htmlspecialchars( $link['text'] ) ?>
<?php endif; ?>
<h5><span><?php $this->msg('variants') ?></span><a href="#"></a></h5>
<div class="menu">
<ul<?php $this->html('userlangattributes') ?>>
- <?php foreach ( $this->data['variant_urls'] as $key => $link ): ?>
+ <?php foreach ( $this->data['variant_urls'] as $link ): ?>
<li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
<?php endforeach; ?>
</ul>