r69995 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69994‎ | r69995 | r69996 >
Date:10:18, 27 July 2010
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
Drop OAI repository check for newSchema

IT's comparing against 1.5 alpha

And then on [[Extension:OAIRepository]]

Warning: The current version of OAI won't work with MW1.12 or lower, since the add of wfGetLB() (LBFactory abstract class) in rev:32578. To uses with 1.12, download this version of the files. Make sure you use the ExtensionDistributor by going to the "download snapshot" link in the infobox to help you get the right version.
Modified paths:
  • /trunk/extensions/OAI/OAIRepo_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OAI/OAIRepo_body.php
@@ -565,11 +565,6 @@
566566 return new OAIDumpWriter;
567567 }
568568
569 - function newSchema() {
570 - global $wgVersion;
571 - return version_compare( $wgVersion, '1.5alpha', 'ge' );
572 - }
573 -
574569 function fetchRecord( $pageid ) {
575570 $db = $this->_db;
576571
@@ -874,11 +869,8 @@
875870 array( 'img_name' => $this->_row->page_title ),
876871 $fname );
877872 if( $imageRow ) {
878 - if( OAIRepo::newSchema() ) {
879 - $url = Image::imageUrl( $imageRow->img_name );
880 - } else {
881 - $url = Image::wfImageUrl( $imageRow->img_name );
882 - }
 873+ $url = Image::imageUrl( $imageRow->img_name );
 874+
883875 if( $url{0} == '/' ) {
884876 global $wgServer;
885877 $url = $wgServer . $url;

Follow-up revisions

RevisionCommit summaryAuthorDate
r80770Fixup deprecated method call fixme on r69995reedy21:09, 22 January 2011

Comments

#Comment by 😂 (talk | contribs)   00:24, 22 January 2011

Image class is also deprecated, it's been that way for awhile. Use wfFindFile() to get an appropriate File object.

#Comment by Reedy (talk | contribs)   20:59, 22 January 2011

Pffft. I was just removing some really shitty old code :(

Status & tagging log