* Special:Recentchangeslinked will now include upload log entries
=== API changes in 1.22 ===
+* (bug 25553) The JSON output formatter now leaves forward slashes unescaped
+ to improve human readability of URLs and similar strings. Also, a "utf8"
+ option is now provided to use UTF-8 encoding instead of hex escape codes
+ for most non-ASCII characters.
* (bug 46626) xmldoublequote parameter was removed. Because of a bug, the
parameter has had no effect since MediaWiki 1.16, and so its removal is
unlikely to impact existing clients.
* (bug 46751) Made Buryat (Russia) (буряад) (bxr) fallback to Russian.
=== Other changes in 1.22 ===
+* BREAKING CHANGE: Implementation of MediaWiki's JS and JSON value encoding
+ has changed:
+** MediaWiki no longer supports PHP installations in which the native JSON
+ extension is missing or disabled.
+** XmlJsCode objects can no longer be nested inside objects or arrays.
+ (For Xml::encodeJsCall(), this individually applies to each argument.)
+** The sets of characters escaped by default, along with the precise escape
+ sequences used, have changed (except for the Xml::escapeJsString()
+ function, which is now deprecated).
+* BREAKING CHANGE: The Services_JSON class has been removed. If necessary,
+ be sure to upgrade affected extensions at the same time (e.g. Collection).
* redirect.php was removed. It was unused.
* ClickTracking integration was dropped from the mediaWiki.user.bucket
JavaScript function. The 'tracked' option is now ignored.
* @param Bool $isAnon Exclude anonymous-only blocks if false
* @param Bool $fromMaster Whether to query the master or slave database
* @return Array of Blocks
- * @since 1.21
+ * @since 1.22
*/
public static function getBlocksForIPList( array $ipChain, $isAnon, $fromMaster = false ) {
if ( !count( $ipChain ) ) {
/**
* Get the plural rule types for a given language from the XML files.
* Cached.
- * @since 1.21
+ * @since 1.22
*/
public function getPluralRuleTypes( $code ) {
if ( $this->pluralRuleTypes === null ) {
* Load the specified fields from the database.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @param array|null $fields
* @param boolean $override
* Gets the value of a field but first loads it if not done so already.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
- * @param string$name
+ * @param string $name
*
* @return mixed
*/
* Load the default values, via getDefaults.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @param boolean $override
*/
* @since 1.20
*
* @param string|null $functionName
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @return boolean Success indicator
*/
* Removes the object from the database.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @return boolean Success indicator
*/
* Add an amount (can be negative) to the specified field (needs to be numeric).
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @param string $field
* @param integer $amount
* Computes and updates the values of the summary fields.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @param array|string|null $summaryFields
*/
* Sets the value for the @see $updateSummaries field.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @param boolean $update
*/
* Sets the value for the @see $inSummaryMode field.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @param boolean $summaryMode
*/
* Returns the table this IORMRow is a row in.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @return IORMTable
*/
* Settings this to false can prevent needless updating work in situations
* such as deleting a university, which will then delete all it's courses.
*
- * @deprecated since 1.21
+ * @deprecated since 1.22
* @since 1.20
* @var bool
*/
* This mode indicates that only summary fields got updated,
* which allows for optimizations.
*
- * @deprecated since 1.21
+ * @deprecated since 1.22
* @since 1.20
* @var bool
*/
protected $inSummaryMode = false;
/**
- * @deprecated since 1.21
+ * @deprecated since 1.22
* @since 1.20
* @var ORMTable|null
*/
*
* @since 1.20
*
- * @param IORMTable|null $table Deprecated since 1.21
+ * @param IORMTable|null $table Deprecated since 1.22
* @param array|null $fields
- * @param boolean $loadDefaults Deprecated since 1.21
+ * @param boolean $loadDefaults Deprecated since 1.22
*/
public function __construct( IORMTable $table = null, $fields = null, $loadDefaults = false ) {
$this->table = $table;
* Load the specified fields from the database.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @param array|null $fields
* @param boolean $override
* Gets the value of a field but first loads it if not done so already.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @param $name string
*
* Gets the fields => values to write to the table.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @return array
*/
* Load the default values, via getDefaults.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @param boolean $override
*/
* when it already exists, or inserting it when it doesn't.
*
* @since 1.20
- * @deprecated since 1.21 Use IORMTable->updateRow or ->insertRow
+ * @deprecated since 1.22 Use IORMTable->updateRow or ->insertRow
*
* @param string|null $functionName
*
* Updates the object in the database.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @param string|null $functionName
*
* Inserts the object into the database.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @param string|null $functionName
* @param array|null $options
* Removes the object from the database.
*
* @since 1.20
- * @deprecated since 1.21, use IROMtable->removeRow
+ * @deprecated since 1.22, use IORMTable->removeRow
*
* @return boolean Success indicator
*/
* Gets called before an object is removed from the database.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*/
protected function beforeRemove() {
$this->loadFields( $this->getBeforeRemoveFields(), false, true );
* Can be overridden to get rid of linked data.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*/
protected function onRemoved() {
$this->setField( 'id', null );
* Add an amount (can be negative) to the specified field (needs to be numeric).
*
* @since 1.20
- * @deprecated since 1.21, use IORMTable->addToField
+ * @deprecated since 1.22, use IORMTable->addToField
*
* @param string $field
* @param integer $amount
* Return the names of the fields.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @return array
*/
* Computes and updates the values of the summary fields.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @param array|string|null $summaryFields
*/
* Sets the value for the @see $updateSummaries field.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @param boolean $update
*/
* Sets the value for the @see $inSummaryMode field.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @param boolean $summaryMode
*/
* Returns the table this IORMRow is a row in.
*
* @since 1.20
- * @deprecated since 1.21
+ * @deprecated since 1.22
*
* @return IORMTable
*/
}
/**
- * Updated the provided row in the database.
+ * Updates the provided row in the database.
*
- * @since 1.21
+ * @since 1.22
*
* @param IORMRow $row The row to save
* @param string|null $functionName
/**
* Inserts the provided row into the database.
*
- * @since 1.21
+ * @since 1.22
*
* @param IORMRow $row
* @param string|null $functionName
/**
* Gets the fields => values to write to the table.
*
- * @since 1.20
+ * @since 1.22
*
* @param IORMRow $row
*
/**
* Removes the provided row from the database.
*
- * @since 1.21
+ * @since 1.22
*
* @param IORMRow $row
* @param string|null $functionName
/**
* Add an amount (can be negative) to the specified field (needs to be numeric).
*
- * @since 1.21
+ * @since 1.22
*
* @param array $conditions
* @param string $field
* This encoding option saves 3 to 8 bytes (uncompressed) for each such character;
* however, it could break compatibility with systems that incorrectly handle UTF-8.
*
- * @since 1.21
+ * @since 1.22
*/
const UTF8_OK = 1;
* - HTML5, §4.3.1.2 Restrictions for contents of script elements
* - XML 1.0 (5th Ed.), §2.4 Character Data and Markup
*
- * @since 1.21
+ * @since 1.22
*/
const XMLMETA_OK = 2;
*
* @warning When generating inline script blocks, use FormatJson::UTF8_OK instead.
*
- * @since 1.21
+ * @since 1.22
*/
const ALL_OK = 3;
* @note Empty arrays are encoded as numeric arrays, not as objects, so cast any associative
* array that might be empty to an object before encoding it.
*
- * @note In pre-1.21 versions of MediaWiki, using this function for generating inline script
+ * @note In pre-1.22 versions of MediaWiki, using this function for generating inline script
* blocks may result in an XSS vulnerability, and quite likely will in XML documents
* (cf. FormatJson::XMLMETA_OK). Use Xml::encodeJsVar() instead in such cases.
*
* @file
* @author Niklas Laxström
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
- * @since 1.21
+ * @since 1.22
*/
/**
* @file
* @author Niklas Laxström
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
- * @since 1.21
+ * @since 1.22
*/
/**
* @file
* @author Niklas Laxström
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
- * @since 1.21
+ * @since 1.22
*/
/**
* @file
* @author Niklas Laxström
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
- * @since 1.21
+ * @since 1.22
*/
/**
* @file
* @author Alexandre Emsenhuber
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
- * @since 1.21
+ * @since 1.22
*/
/**
* @param MWTimestamp $relativeTo Base timestamp
* @param User $user User preferences to use
* @return string Human timestamp
- * @since 1.21
+ * @since 1.22
*/
public function getHumanTimestamp( MWTimestamp $ts, MWTimestamp $relativeTo, User $user ) {
$diff = $ts->diff( $relativeTo );
/**
* Get the plural rule types for the language
- * @since 1.21
+ * @since 1.22
* @return array Associative array with plural form number and plural rule type as key-value pairs
*/
public function getPluralRuleTypes() {
* Find the plural rule type appropriate for the given number
* For example, if the language is set to Arabic, getPluralType(5) should
* return 'few'.
- * @since 1.21
+ * @since 1.22
* @return string The name of the plural rule type, e.g. one, two, few, many
*/
public function getPluralRuleType( $number ) {
* and may return false in this case (so this title conversion rule
* will be ignored and the original title is shown).
*
- * @since 1.21
+ * @since 1.22
* @param $variant The variant code to display page title in
* @return String|false The converted title or false if just page name
*/