r59654 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59653‎ | r59654 | r59655 >
Date:05:39, 2 December 2009
Author:yaron
Status:deferred
Tags:
Comment:
Added handling for MW 1.16
Modified paths:
  • /trunk/extensions/SemanticForms/specials/SF_UploadWindow.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_UploadWindow.php
@@ -942,10 +942,16 @@
943943 $destfilename = wfMsgHtml( 'destfilename' );
944944 $summary = wfMsgExt( 'fileuploadsummary', 'parseinline' );
945945
946 - $licenses = new Licenses();
947946 $license = wfMsgExt( 'license', array( 'parseinline' ) );
948947 $nolicense = wfMsgHtml( 'nolicense' );
949 - $licenseshtml = $licenses->getHtml();
 948+ // class changed in MW 1.16
 949+ if (method_exists('Licenses', 'getInputHtml')) {
 950+ $licenses = new Licenses( array() );
 951+ $licenseshtml = $licenses->getInputHtml( null );
 952+ } else {
 953+ $licenses = new Licenses();
 954+ $licenseshtml = $licenses->getHtml();
 955+ }
950956
951957 $ulb = wfMsgHtml( 'uploadbtn' );
952958

Status & tagging log