r77771 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77770‎ | r77771 | r77772 >
Date:05:25, 5 December 2010
Author:jeroendedauw
Status:deferred (Comments)
Tags:
Comment:
Added copy of Html class for bc
Modified paths:
  • /trunk/extensions/SemanticResultFormats/SemanticResultFormats.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/SemanticResultFormats.php
@@ -30,6 +30,11 @@
3131
3232 $wgExtensionMessagesFiles['SemanticResultFormats'] = dirname( __FILE__ ) . '/SRF_Messages.php';
3333
 34+// To ensure Maps remains compatible with pre 1.16.
 35+if ( !class_exists( 'Html' ) ) {
 36+ $wgAutoloadClasses['Html'] = dirname( __FILE__ ) . '/compat/Html.php';
 37+}
 38+
3439 // FIXME: hardcoded path
3540 $srfgScriptPath = $wgScriptPath . '/extensions/SemanticResultFormats';
3641 $srfgIP = dirname( __FILE__ );

Follow-up revisions

RevisionCommit summaryAuthorDate
r77812follow up to r77771 - added stuff I forgot to svn addjeroendedauw16:55, 5 December 2010

Comments

#Comment by Nikerabbit (talk | contribs)   09:48, 5 December 2010

That will unconditionally load Html class on every request if it exists - you could instead see if $wgAutloadClasses already has entry for Html.

Also, did you forget to commit the actual file?

#Comment by Jeroen De Dauw (talk | contribs)   16:57, 5 December 2010

Oops - I indeed forgot to add the file :)

I'm a bit fuzzy about what the exact reason was for this, but the check has changed from what you suggest (and I originally also assumed was the way to go) to this code, in both Maps and SMW, after someone complained about something.

#Comment by Nikerabbit (talk | contribs)   17:07, 5 December 2010

Would be interesting to know what that something is.

#Comment by 😂 (talk | contribs)   13:30, 6 December 2010

It's because Html won't be in $wgAutoloadClasses, it will be in $wgAutoloadLocalClasses.

Status & tagging log