r107329 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107328‎ | r107329 | r107330 >
Date:16:24, 26 December 2011
Author:krinkle
Status:ok (Comments)
Tags:
Comment:
[Core JS] Remove long deprecated globals 'ta' and 'akeytt'
* Not used anywhere in ./phase3/
* Not used anywhere in ./extensions/
* Deprecated in MediaWiki 1.16 according to HISTORY
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/skins/common/wikibits.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/wikibits.js
@@ -370,11 +370,6 @@
371371 return str;
372372 };
373373
374 -/* Dummy for deprecated function */
375 -window.ta = [];
376 -window.akeytt = function( doId ) {
377 -};
378 -
379374 window.checkboxes = undefined;
380375 window.lastCheckbox = undefined;
381376
Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -233,7 +233,7 @@
234234 changes to languages because of Bugzilla reports.
235235
236236 * Canadian English (en-ca) (new).
237 -* Norwegian (bokmål)‬ (nb) (renamed from no).
 237+* Norwegian (bokmål) (nb) (renamed from no).
238238 * Uighur (Latin) (ug-latn) was incorrectly marked as right-to-left language.
239239 * (bug 30217) Make pt-br a fallback of pt.
240240 * (bug 31193) Set fallback language of Assamese from Bengali to English.
@@ -245,6 +245,8 @@
246246 * (bug 33367) Gendered namespaces for Czech
247247
248248 === Other changes in 1.19 ===
 249+* BREAKING CHANGE: Legacy global array 'ta' and global function 'akeytt' have
 250+ been removed from wikibits.js
249251 * jquery.mwPrototypes module was renamed to jquery.mwExtension.
250252 * The maintenance script populateSha1.php was renamed to the more concise
251253 populateImageSha1.php
@@ -284,6 +286,10 @@
285287 1.19 has several database changes since 1.18, and will not work without schema
286288 updates.
287289
 290+As of 1.19 several JavaScript interfaces that were deprecated or superseeded in
 291+MediaWiki 1.17, MediaWiki 1.16 or even earlier have been removed. They are
 292+listed at the top of the "Other changes" list as a "BREAKING CHANGE".
 293+
288294 If upgrading from before 1.11, and you are using a wiki as a commons
289295 repository, make sure that it is updated as well. Otherwise, errors may arise
290296 due to database schema changes.

Follow-up revisions

RevisionCommit summaryAuthorDate
r108550[Core JS] Remove superfluous comments (follows-up r107329)krinkle21:03, 10 January 2012

Comments

#Comment by 😂 (talk | contribs)   16:30, 26 December 2011

IIRC, these were left in place because site JS used them.

#Comment by Krinkle (talk | contribs)   16:55, 26 December 2011

Yes, but that was 2 years ago. Pretty much every single script ever written before 2011 most likely has some deprecated parts in them. Some harmless, some slowing-down (doing redundant stuff), some alarming and breaking.

In the 2011 Resource Walker edition of Tour dé Wiki it became clear that many wikis have scripts that depend on the HTML structure, even the phrasing in html elements from Special pages and actions that were loaded through XMLHttpRequests, and are calling several functions that may or may not exist anymore. Either they were silently failing or throwing exceptions, but they definitely needed to be ported to new mediaWiki.js library and other ResourceLoader habbits.

If a script is still referring to global ta and/or akeytt then I'm 99% sure that this script:

  • Either is breaking already for other reasons
  • Is in it's entirety redundant (there were (before the Tour dé Wiki) many wikis that had MediaWiki:Monobook.js pages with a long list of ta['....'] = ...; definitions. If those throw a ReferenceError now, that's harmless as the script isn't doing anything anyway.

Anything already ported to ResourceLoader will no longer have these globals used, so this shouldn't break anything. And anything not ported already should be ported anyway.

#Comment by Fomafix (talk | contribs)   13:15, 10 January 2012

Line 52 contains

// Global external objects used by this script.
/*extern ta */

Is this superfluously?

#Comment by Krinkle (talk | contribs)   21:04, 10 January 2012

Previously slimmed down in r107327, now entirely superfluous indeed. Removed in r108550. Thanks :)

Status & tagging log