r23757 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23756‎ | r23757 | r23758 >
Date:19:46, 5 July 2007
Author:simetrical
Status:old
Tags:
Comment:
Add comment on cacheability of getUserJs() to fend off other wayward devs
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Skin.php
@@ -412,12 +412,17 @@
413413 }
414414
415415 /**
416 - * This returns MediaWiki:Common.js. For some bizarre reason, it does
417 - * *not* return any custom user JS from user subpages. Huh?
 416+ * This returns MediaWiki:Common.js, and derived classes may add other JS.
 417+ * Despite its name, it does *not* return any custom user JS from user
 418+ * subpages. The returned script is sitewide and publicly cacheable and
 419+ * therefore must not include anything that varies according to user,
 420+ * interface language, etc. (although it may vary by skin). See
 421+ * makeGlobalVariablesScript for things that can vary per page view and are
 422+ * not cacheable.
418423 *
419 - * @return string
 424+ * @return string Raw JavaScript to be returned
420425 */
421 - function getUserJs() {
 426+ public function getUserJs() {
422427 wfProfileIn( __METHOD__ );
423428
424429 global $wgStylePath;

Follow-up revisions

RevisionCommit summaryAuthorDate
r23912Merged revisions 23662-23909 via svnmerge from...david18:11, 9 July 2007

Status & tagging log