r74145 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74144‎ | r74145 | r74146 >
Date:16:11, 2 October 2010
Author:nikerabbit
Status:ok (Comments)
Tags:
Comment:
Fix personal user styles being broken since introduction in r73024
Modified paths:
  • /trunk/phase3/includes/ResourceLoaderModule.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ResourceLoaderModule.php
@@ -933,9 +933,9 @@
934934 if ( $wgAllowUserCssPrefs ) {
935935 // Verify identity -- this is a private module
936936 if ( $context->getUser() === $wgUser->getName() ) {
937 - $options = FormatJson::encode( $wgUser->getOptions() );
 937+ $options = $wgUser->getOptions();
938938 } else {
939 - $options = FormatJson::encode( User::getDefaultOptions() );
 939+ $options = User::getDefaultOptions();
940940 }
941941
942942 // Build CSS rules

Follow-up revisions

RevisionCommit summaryAuthorDate
r74181Extract common code in ResourceLoaderUserOptionsModule (sloppy copy-pasting o...brion01:03, 3 October 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r73024* Added exporting of user preferences...tparscal21:47, 14 September 2010

Comments

#Comment by Brion VIBBER (talk | contribs)   01:04, 3 October 2010

I've further cleaned this up in r74181 by extracting the two instances of common code (that were probably incorrectly copy-pasted) into a single method that can be called twice, and encoding only applied after in the one place it's needed.

Status & tagging log