r54597 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54596‎ | r54597 | r54598 >
Date:19:03, 7 August 2009
Author:tparscal
Status:deferred (Comments)
Tags:
Comment:
Commented out a piece of code that I believe to be a remnant of a now removed feature, and is now just causing js errors.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/OptIn/SpecialOptIn.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/OptIn/SpecialOptIn.php
@@ -113,11 +113,15 @@
114114 UsabilityInitiativeHooks::initialize();
115115 UsabilityInitiativeHooks::addScript( 'OptIn/OptIn.js',
116116 $wgOptInStyleVersion );
 117+ /*
 118+ * What the hell does this do?
 119+ *
117120 $url = $this->getTitle()->getLinkUrl();
118121 $wgOut->addHTML( Xml::tags( 'script',
119122 array( 'type' => $wgJsMimeType ),
120123 "js2AddOnloadHook(function() { \$j.post( \"$url\", optInGetPOSTData() ); } );"
121124 ) );
 125+ */
122126 } else if ( $wgRequest->getVal( 'opt' ) == 'feedback' ) {
123127 if ( $wgRequest->wasPosted() ) {
124128 $this->saveSurvey( $wgOptInFeedBackSurvey,

Follow-up revisions

RevisionCommit summaryAuthorDate
r54663OptIn: Fix browser+OS registration that got borked by r53990 and was commente...catrope15:00, 9 August 2009

Comments

#Comment by Catrope (talk | contribs)   13:17, 8 August 2009

What it does is register the browser, OS and resolution info at opt-in time, as requested by Brion. I now see this causes JS errors if JS2 and jQuery aren't both present (oops); changing js2AddOnloadHook() to $(document).ready() and changing $j to $ (or jQuery or whatever is appropriate) should fix that.

Status & tagging log