* (bug 26811) On DB error pages, server hostnames are now hidden when both
$wgShowHostnames and $wgShowSQLErrors are false.
* (bug 6200) line breaks in <blockquote> are handled like they are in <div>
+* (bug 14931) Default character set now set to 'utf8' when a new MySQL
+ database is created.
=== API changes in 1.22 ===
* (bug 25553) The JSON output formatter now leaves forward slashes unescaped
* (bug 49090) Token-getting functions will fail when using jsonp callbacks.
* (bug 52699) action=upload returns normalized file name on warning
"exists-normalized" instead of filename to be uploaded to.
+* (bug 53884) action=edit will now return an error when the specified section
+ does not exist in the page.
=== Languages updated in 1.22===
"\n*" => "\n*", "\r*" => "\r*",
"\n:" => "\n:", "\r:" => "\r:",
"\n " => "\n ", "\r " => "\r ",
+ "\n\n" => "\n ", "\r\n" => " \n",
+ "\n\r" => "\n ", "\r\r" => "\r ",
+ "\n\t" => "\n	", "\r\t" => "\r	", // "\n\t\n" is treated like "\n\n"
+ "\n----" => "\n----", "\r----" => "\r----",
'__' => '__', '://' => '://',
);
array(
"{$wgCookiePrefix}Token",
"{$wgCookiePrefix}LoggedOut",
+ "forceHTTPS",
session_name()
),
$wgCacheVaryCookies
function __construct() {
parent::__construct( 'CreateAccount', 'Userlogin', 'signup', array( 'uselang' ) );
}
+
+ // No reason to hide this link on Special:Specialpages
+ public function isListed() {
+ return true;
+ }
+
+ protected function getGroupName() {
+ return 'login';
+ }
}
/**
* SpecialMypage, SpecialMytalk and SpecialMycontributions special pages
if ( $section == 0 && $params['section'] != '0' && $params['section'] != 'new' ) {
$this->dieUsage( "The section parameter must be set to an integer or 'new'", "invalidsection" );
}
+ $content = $pageObj->getContent();
+ if ( $section !== 0 && ( !$content || !$content->getSection( $section ) ) ) {
+ $this->dieUsage( "There is no section {$section}.", 'nosuchsection' );
+ }
$requestArray['wpSection'] = $params['section'];
} else {
$requestArray['wpSection'] = '';
/**
* Get the HTML text of the description page, if available
*
+ * @param $lang Language Optional language to fetch description in
* @return string
*/
- function getDescriptionText() {
+ function getDescriptionText( $lang = false ) {
global $wgMemc, $wgLang;
if ( !$this->repo || !$this->repo->fetchDescription ) {
return false;
}
- $renderUrl = $this->repo->getDescriptionRenderUrl( $this->getName(), $wgLang->getCode() );
+ if ( !$lang ) {
+ $lang = $wgLang;
+ }
+ $renderUrl = $this->repo->getDescriptionRenderUrl( $this->getName(), $lang->getCode() );
if ( $renderUrl ) {
if ( $this->repo->descriptionCacheExpiry > 0 ) {
wfDebug( "Attempting to get the description from cache..." );
- $key = $this->repo->getLocalCacheKey( 'RemoteFileDescription', 'url', $wgLang->getCode(),
+ $key = $this->repo->getLocalCacheKey( 'RemoteFileDescription', 'url', $lang->getCode(),
$this->getName() );
$obj = $wgMemc->get( $key );
if ( $obj ) {
}
/**
+ * @param $lang Language Optional language to fetch description in.
* @return string
*/
- function getDescriptionText() {
+ function getDescriptionText( $lang = false ) {
// Restore remote behavior
- return File::getDescriptionText();
+ return File::getDescriptionText( $lang );
}
}
* Get the HTML text of the description page
* This is not used by ImagePage for local files, since (among other things)
* it skips the parser cache.
+ *
+ * @param $lang Language What language to get description in (Optional)
* @return bool|mixed
*/
- function getDescriptionText() {
+ function getDescriptionText( $lang = null ) {
$revision = Revision::newFromTitle( $this->title, false, Revision::READ_NORMAL );
if ( !$revision ) {
return false;
if ( !$content ) {
return false;
}
- $pout = $content->getParserOutput( $this->title, null, new ParserOptions() );
+ $pout = $content->getParserOutput( $this->title, null, new ParserOptions( null, $lang ) );
return $pout->getText();
}
return $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
Html::openElement( 'fieldset' ) .
Html::element( 'legend', array(), wfMessage( 'config-db-wiki-settings' )->text() ) .
- $this->getTextBox( 'wgDBname', 'config-db-name', array( 'dir' => 'ltr' ), $this->parent->getHelpBox( 'config-db-name-help' ) ) .
- $this->getTextBox( 'wgDBprefix', 'config-db-prefix', array( 'dir' => 'ltr' ), $this->parent->getHelpBox( 'config-db-prefix-help' ) ) .
+ $this->getTextBox( 'wgDBname', 'config-db-name', array( 'dir' => 'ltr' ),
+ $this->parent->getHelpBox( 'config-db-name-help' ) ) .
+ $this->getTextBox( 'wgDBprefix', 'config-db-prefix', array( 'dir' => 'ltr' ),
+ $this->parent->getHelpBox( 'config-db-prefix-help' ) ) .
Html::closeElement( 'fieldset' ) .
$this->getInstallUserBox();
}
$conn = $status->value;
$dbName = $this->getVar( 'wgDBname' );
if ( !$conn->selectDB( $dbName ) ) {
- $conn->query( "CREATE DATABASE " . $conn->addIdentifierQuotes( $dbName ), __METHOD__ );
+ $conn->query( "CREATE DATABASE " . $conn->addIdentifierQuotes( $dbName ) . "CHARACTER SET utf8", __METHOD__ );
$conn->selectDB( $dbName );
}
$this->setupSchemaVars();
<?php
/**
- * lessphp v0.4.0
+ * lessphp v0.4.0@785ad53840
* http://leafo.net/lessphp
*
* LESS css compiler, adapted from http://lesscss.org
*
* MIT LICENSE
*
- * Copyright (c) 2010-2012 Leaf Corcoran, http://leafo.net/lessphp
+ * Copyright 2013, Leaf Corcoran <leafot@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
}
protected function lib_round($arg) {
- $value = $this->assertNumber($arg);
- return array("number", round($value), $arg[2]);
+ if($arg[0] != "list") {
+ $value = $this->assertNumber($arg);
+ return array("number", round($value), $arg[2]);
+ } else {
+ $value = $this->assertNumber($arg[2][0]);
+ $precision = $this->assertNumber($arg[2][1]);
+ return array("number", round($value, $precision), $arg[2][0][2]);
+ }
}
protected function lib_unit($arg) {
* Normally we output all numbers in plain en_US style, that is
* 293,291.235 for twohundredninetythreethousand-twohundredninetyone
* point twohundredthirtyfive. However this is not suitable for all
- * languages, some such as Pakaran want ੨੯੩,੨੯੫.੨੩੫ and others such as
+ * languages, some such as Punjabi want ੨੯੩,੨੯੫.੨੩੫ and others such as
* Icelandic just want to use commas instead of dots, and dots instead
* of commas like "293.291,235".
*
return strtr( $matches[1], $xu ) . strtr( $matches[2], $xu );
}
- /**
- * @param $s string
- * @return string
- */
- function checkTitleEncoding( $s ) {
- # Check for X-system backwards-compatibility URLs
- $ishigh = preg_match( '/[\x80-\xff]/', $s );
- $isutf = preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' .
- '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s );
-
- if ( $ishigh and !$isutf ) {
- # Assume Latin1
- $s = utf8_encode( $s );
- } elseif ( preg_match( '/(\xc4[\x88\x89\x9c\x9d\xa4\xa5\xb4\xb5]' .
- '|\xc5[\x9c\x9d\xac\xad])/', $s )
- ) {
- return $s;
- }
-
- // if( preg_match( '/[cghjsu]x/i', $s ) )
- // return $this->iconv( 'x', 'utf-8', $s );
- return $s;
- }
-
function initEncoding() {
global $wgEditEncoding;
$wgEditEncoding = 'x';
}
if ( !$redirectsOnly ) {
- $this->output( "Refreshing links table.\n" );
+ $this->output( "Refreshing links tables.\n" );
$this->output( "Starting from page_id $start of $end.\n" );
for ( $id = $start; $id <= $end; $id++ ) {
/* Public Methods */
return {
+ /**
+ * The module registry is exposed as an aid for debugging and inspecting page
+ * state; it is not a public interface for modifying the registry.
+ *
+ * @see #registry
+ * @property
+ * @private
+ */
+ moduleRegistry: registry,
+
/**
* @inheritdoc #newStyleTag
* @method