r65900 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65899‎ | r65900 | r65901 >
Date:15:26, 4 May 2010
Author:platonides
Status:resolved (Comments)
Tags:
Comment:
Follow up r65864 comments. Changing unserialize() to Json::decode().
Modified paths:
  • /branches/new-installer/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: branches/new-installer/phase3/includes/installer/Installer.php
@@ -354,13 +354,13 @@
355355 /** Check if we're installing the latest version */
356356 function envLatestVersion() {
357357 global $wgVersion;
358 - $latestInfoUrl = 'http://www.mediawiki.org/w/api.php?action=mwreleases&format=php';
 358+ $latestInfoUrl = 'http://www.mediawiki.org/w/api.php?action=mwreleases&format=json';
359359 $latestInfo = Http::get( $latestInfoUrl );
360360 if( !$latestInfo ) {
361361 $this->showMessage( 'config-env-latest-can-not-check', $latestInfoUrl );
362362 return;
363363 }
364 - $latestInfo = unserialize($latestInfo);
 364+ $latestInfo = FormatJson::decode($latestInfo);
365365 if ($latestInfo === false || !isset( $latestInfo['mwreleases'] ) ) {
366366 # For when the request is successful but there's e.g. some silly man in
367367 # the middle firewall blocking us, e.g. one of those annoying airport ones

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r65864Warn if we *can* get data from mediawiki.org but the returned data is bad...avar16:01, 3 May 2010

Comments

#Comment by MZMcBride (talk | contribs)   04:39, 5 May 2010

I <3 JSON.

#Comment by Ævar Arnfjörð Bjarmason (talk | contribs)   18:15, 6 May 2010

This was broken but fixed in r65957.

Status & tagging log