From 876bddf6376fe75952735ee3f231f557c2da48d0 Mon Sep 17 00:00:00 2001 From: Kevin Israel Date: Mon, 20 May 2013 01:52:14 -0400 Subject: [PATCH] Change @since and @deprecated notes to 1.22 Using the following command line, I have found doc comments mentioning "1.21" when they should mention "1.22" instead, which I have fixed manually: git diff REL1_21 | grep --color=always -C 10 -iE \ '^\+.*(since|deprecated).*1\.21(\D|$)' | aha > oldver.html I also moved the release notes for I1987190f ("Combine JavaScript and JSON encoding logic") from RELEASE-NOTES-1.21 to RELEASE-NOTES-1.22 because I had reverted the commit on REL1_21 only (see Id3b88102 and bug 47431 for the rationale). Change-Id: I11b917a371e07267dfa98b8449776d0c1cb29b15 Follows-Up: I25cf5a94f6e47f85a9d0b80cc1c9c9f957288478 Follows-Up: I3d72e4105f6244b0695116940e62a2ddef66eb66 Follows-Up: I3faa9c3e8107c6e46cdf21f8c18adda1f42890d7 Follows-Up: I6aab19c8d68bf47beddad42632b0360a7b12f251 Follows-Up: I86368821fc2cd0729df5342b8572eb470c0f77a0 Follows-Up: Id3b88102e768318e3605a19e9952121091a40915 Follows-Up: Ie667088010e24eb6cb569f9e8e8e2553005223eb --- RELEASE-NOTES-1.22 | 15 ++++++++ includes/Block.php | 2 +- includes/cache/LocalisationCache.php | 2 +- includes/db/IORMRow.php | 22 ++++++------ includes/db/ORMRow.php | 42 +++++++++++------------ includes/db/ORMTable.php | 12 +++---- includes/json/FormatJson.php | 8 ++--- includes/logging/DeleteLogFormatter.php | 2 +- includes/logging/MoveLogFormatter.php | 2 +- includes/logging/NewUsersLogFormatter.php | 2 +- includes/logging/PatrolLogFormatter.php | 2 +- includes/logging/RightsLogFormatter.php | 2 +- languages/Language.php | 6 ++-- languages/LanguageConverter.php | 2 +- 14 files changed, 68 insertions(+), 53 deletions(-) diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index 41eaa98417..33c6351240 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -153,6 +153,10 @@ production. * 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. @@ -197,6 +201,17 @@ changes to languages because of Bugzilla reports. * (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. diff --git a/includes/Block.php b/includes/Block.php index d2f430ed8b..f4c5b7931f 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -1092,7 +1092,7 @@ class Block { * @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 ) ) { diff --git a/includes/cache/LocalisationCache.php b/includes/cache/LocalisationCache.php index 0f229f95e8..bdc2d78e55 100644 --- a/includes/cache/LocalisationCache.php +++ b/includes/cache/LocalisationCache.php @@ -551,7 +551,7 @@ class LocalisationCache { /** * 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 ) { diff --git a/includes/db/IORMRow.php b/includes/db/IORMRow.php index f8833f5f67..39411791d9 100644 --- a/includes/db/IORMRow.php +++ b/includes/db/IORMRow.php @@ -37,7 +37,7 @@ interface IORMRow { * 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 @@ -64,9 +64,9 @@ interface IORMRow { * 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 */ @@ -146,7 +146,7 @@ interface IORMRow { * Load the default values, via getDefaults. * * @since 1.20 - * @deprecated since 1.21 + * @deprecated since 1.22 * * @param boolean $override */ @@ -159,7 +159,7 @@ interface IORMRow { * @since 1.20 * * @param string|null $functionName - * @deprecated since 1.21 + * @deprecated since 1.22 * * @return boolean Success indicator */ @@ -169,7 +169,7 @@ interface IORMRow { * Removes the object from the database. * * @since 1.20 - * @deprecated since 1.21 + * @deprecated since 1.22 * * @return boolean Success indicator */ @@ -211,7 +211,7 @@ interface IORMRow { * 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 @@ -233,7 +233,7 @@ interface IORMRow { * 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 */ @@ -243,7 +243,7 @@ interface IORMRow { * Sets the value for the @see $updateSummaries field. * * @since 1.20 - * @deprecated since 1.21 + * @deprecated since 1.22 * * @param boolean $update */ @@ -253,7 +253,7 @@ interface IORMRow { * Sets the value for the @see $inSummaryMode field. * * @since 1.20 - * @deprecated since 1.21 + * @deprecated since 1.22 * * @param boolean $summaryMode */ @@ -263,7 +263,7 @@ interface IORMRow { * Returns the table this IORMRow is a row in. * * @since 1.20 - * @deprecated since 1.21 + * @deprecated since 1.22 * * @return IORMTable */ diff --git a/includes/db/ORMRow.php b/includes/db/ORMRow.php index b21ce40fe0..5ce3794d5b 100644 --- a/includes/db/ORMRow.php +++ b/includes/db/ORMRow.php @@ -48,7 +48,7 @@ class ORMRow implements IORMRow { * 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 */ @@ -59,14 +59,14 @@ class ORMRow implements IORMRow { * 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 */ @@ -77,9 +77,9 @@ class ORMRow implements IORMRow { * * @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; @@ -99,7 +99,7 @@ class ORMRow implements IORMRow { * 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 @@ -164,7 +164,7 @@ class ORMRow implements IORMRow { * 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 * @@ -240,7 +240,7 @@ class ORMRow implements IORMRow { * Gets the fields => values to write to the table. * * @since 1.20 - * @deprecated since 1.21 + * @deprecated since 1.22 * * @return array */ @@ -326,7 +326,7 @@ class ORMRow implements IORMRow { * Load the default values, via getDefaults. * * @since 1.20 - * @deprecated since 1.21 + * @deprecated since 1.22 * * @param boolean $override */ @@ -339,7 +339,7 @@ class ORMRow implements IORMRow { * 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 * @@ -357,7 +357,7 @@ class ORMRow implements IORMRow { * Updates the object in the database. * * @since 1.20 - * @deprecated since 1.21 + * @deprecated since 1.22 * * @param string|null $functionName * @@ -395,7 +395,7 @@ class ORMRow implements IORMRow { * 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 @@ -428,7 +428,7 @@ class ORMRow implements IORMRow { * 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 */ @@ -448,7 +448,7 @@ class ORMRow implements IORMRow { * 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 ); @@ -472,7 +472,7 @@ class ORMRow implements IORMRow { * 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 ); @@ -520,7 +520,7 @@ class ORMRow implements IORMRow { * 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 @@ -535,7 +535,7 @@ class ORMRow implements IORMRow { * Return the names of the fields. * * @since 1.20 - * @deprecated since 1.21 + * @deprecated since 1.22 * * @return array */ @@ -547,7 +547,7 @@ class ORMRow implements IORMRow { * 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 */ @@ -559,7 +559,7 @@ class ORMRow implements IORMRow { * Sets the value for the @see $updateSummaries field. * * @since 1.20 - * @deprecated since 1.21 + * @deprecated since 1.22 * * @param boolean $update */ @@ -571,7 +571,7 @@ class ORMRow implements IORMRow { * Sets the value for the @see $inSummaryMode field. * * @since 1.20 - * @deprecated since 1.21 + * @deprecated since 1.22 * * @param boolean $summaryMode */ @@ -583,7 +583,7 @@ class ORMRow implements IORMRow { * Returns the table this IORMRow is a row in. * * @since 1.20 - * @deprecated since 1.21 + * @deprecated since 1.22 * * @return IORMTable */ diff --git a/includes/db/ORMTable.php b/includes/db/ORMTable.php index 3a432cdc11..5f6723b960 100644 --- a/includes/db/ORMTable.php +++ b/includes/db/ORMTable.php @@ -952,9 +952,9 @@ class ORMTable extends DBAccessBase implements 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 @@ -980,7 +980,7 @@ class ORMTable extends DBAccessBase implements IORMTable { /** * Inserts the provided row into the database. * - * @since 1.21 + * @since 1.22 * * @param IORMRow $row * @param string|null $functionName @@ -1013,7 +1013,7 @@ class ORMTable extends DBAccessBase implements IORMTable { /** * Gets the fields => values to write to the table. * - * @since 1.20 + * @since 1.22 * * @param IORMRow $row * @@ -1047,7 +1047,7 @@ class ORMTable extends DBAccessBase implements IORMTable { /** * Removes the provided row from the database. * - * @since 1.21 + * @since 1.22 * * @param IORMRow $row * @param string|null $functionName @@ -1067,7 +1067,7 @@ class ORMTable extends DBAccessBase implements IORMTable { /** * 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 diff --git a/includes/json/FormatJson.php b/includes/json/FormatJson.php index f17a1a1837..91e1e871a3 100644 --- a/includes/json/FormatJson.php +++ b/includes/json/FormatJson.php @@ -30,7 +30,7 @@ class FormatJson { * 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; @@ -42,7 +42,7 @@ class FormatJson { * - 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; @@ -51,7 +51,7 @@ class FormatJson { * * @warning When generating inline script blocks, use FormatJson::UTF8_OK instead. * - * @since 1.21 + * @since 1.22 */ const ALL_OK = 3; @@ -80,7 +80,7 @@ class FormatJson { * @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. * diff --git a/includes/logging/DeleteLogFormatter.php b/includes/logging/DeleteLogFormatter.php index ef9a2d4092..44334baf5b 100644 --- a/includes/logging/DeleteLogFormatter.php +++ b/includes/logging/DeleteLogFormatter.php @@ -20,7 +20,7 @@ * @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 */ /** diff --git a/includes/logging/MoveLogFormatter.php b/includes/logging/MoveLogFormatter.php index 589b1ba467..0978f97686 100644 --- a/includes/logging/MoveLogFormatter.php +++ b/includes/logging/MoveLogFormatter.php @@ -20,7 +20,7 @@ * @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 */ /** diff --git a/includes/logging/NewUsersLogFormatter.php b/includes/logging/NewUsersLogFormatter.php index ed37b6afc5..602728b4c4 100644 --- a/includes/logging/NewUsersLogFormatter.php +++ b/includes/logging/NewUsersLogFormatter.php @@ -20,7 +20,7 @@ * @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 */ /** diff --git a/includes/logging/PatrolLogFormatter.php b/includes/logging/PatrolLogFormatter.php index 74ab1969af..507039bac7 100644 --- a/includes/logging/PatrolLogFormatter.php +++ b/includes/logging/PatrolLogFormatter.php @@ -20,7 +20,7 @@ * @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 */ /** diff --git a/includes/logging/RightsLogFormatter.php b/includes/logging/RightsLogFormatter.php index 67bd4d0e63..d3daf6ee6b 100644 --- a/includes/logging/RightsLogFormatter.php +++ b/includes/logging/RightsLogFormatter.php @@ -20,7 +20,7 @@ * @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 */ /** diff --git a/languages/Language.php b/languages/Language.php index 00f654b9e7..50cb7f7922 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -2251,7 +2251,7 @@ class Language { * @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 ); @@ -4504,7 +4504,7 @@ class Language { /** * 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() { @@ -4535,7 +4535,7 @@ class Language { * 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 ) { diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php index e13cb59b05..a02fc8ad97 100644 --- a/languages/LanguageConverter.php +++ b/languages/LanguageConverter.php @@ -1363,7 +1363,7 @@ class ConverterRule { * 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 */ -- 2.20.1