Last modified: 2013-07-17 14:26:29 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T47167, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45167 - Don't use a closure in $wgExtensionFunctions
Don't use a closure in $wgExtensionFunctions
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Normal trivial (vote)
: MW 1.22 version
Assigned To: Alex Monk
: easy
Depends on:
Blocks: 45166
  Show dependency treegraph
 
Reported: 2013-02-19 19:21 UTC by Sam Reed (reedy)
Modified: 2013-07-17 14:26 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sam Reed (reedy) 2013-02-19 19:21:01 UTC
As Special:Version then outputs it as "(Closure)" which is silly
Comment 1 Alex Monk 2013-02-19 19:40:40 UTC
Gerrit change #49854
Comment 2 Alex Monk 2013-02-19 21:45:37 UTC
Merged by Aude.
Comment 3 abraham.taherivand 2013-02-20 16:19:23 UTC
Verified in Wikidata demp sprint 33
Comment 4 Aude 2013-02-24 05:46:16 UTC
https://gerrit.wikimedia.org/r/#/c/50493/

I don't like the global function, but reintroducing the issue is not great either.

Isn't there some better approach here?
Comment 5 Liangent 2013-06-27 10:54:48 UTC
Maybe introduce a new usage?

$wgExtensionFunctions[] = array(
    'func' => function() { /* ... */ },
    'name' => 'Some descriptive name',
);
Comment 6 Jeroen De Dauw 2013-07-01 15:01:06 UTC
I do not see how the feature we are trying to support here is useful at all. I have never any any use for it, and don't know of someone who did. Why display this random list of functions there? If it was one per extension, and it was the main entry point for these extensions, then I could see some use. This is however not the case. Many extensions don't have a handler for this hook, some have multiple handlers, and in our case, the handler we have is for some feature that is certainly not worth mentioning on Special:Version. If it was, we'd also want to list a lot of other things.

https://gerrit.wikimedia.org/r/#/c/71355/
Comment 7 Gerrit Notification Bot 2013-07-04 10:51:19 UTC
Change 71972 had a related patch set uploaded by Daniel Kinzler:
(bug 45167) use SetupAfterCache to register templates.

https://gerrit.wikimedia.org/r/71972
Comment 8 Gerrit Notification Bot 2013-07-04 15:01:02 UTC
Change 71972 merged by jenkins-bot:
(bug 45167) use SetupAfterCache to register templates.

https://gerrit.wikimedia.org/r/71972
Comment 9 Gerrit Notification Bot 2013-07-09 11:54:13 UTC
Change 71355 had a related patch set uploaded by Krinkle:
Remove list of functions added in wgExtensionFunctions

https://gerrit.wikimedia.org/r/71355
Comment 10 Gerrit Notification Bot 2013-07-09 19:17:00 UTC
Change 71355 merged by jenkins-bot:
Remove list of functions added in wgExtensionFunctions

https://gerrit.wikimedia.org/r/71355
Comment 11 abraham.taherivand 2013-07-17 14:26:29 UTC
Verified in Wikidata demo time July 17th

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links