User "Krinkle" posted a comment on MediaWiki.r98729.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/98729#c23652
Commit summary:

[RL2] Merge gadget manager into SpecialGadgets

* Rewrite SpecialGadgets to use the new repository backend. While at it, made 
it use context variables instead of globals.--

Comment:

Commit message cut off.
----
<blockquote>
[RL2] Merge gadget manager into SpecialGadgets

* Rewrite SpecialGadgets to use the new repository backend. While at it, made 
it use context variables instead of globals.

* Removed left-overs from SpecialGadgetManager

* Redesign the layout. Previously it was mostly just a long unordered list with 
titles, descriptions and comma-separated lists for the metadata. Redesigned to 
be less tech-savvy. Using Vector-style icons and progressive enhancements.

* The export-feature of the old SpecialGadgets was kept. Although changed to 
use modern core interface and different page collections. The gadget manager 
structor also made an annoying thing obsolete – the need to manually copy-paste 
the definition on to MediaWiki:Gadgets-definition (which Special:Export/Import 
can't do). Since that's a separate wiki page. We can now completely export and 
import an entire gadget including it's definition, js/css resources and 
interface messages and translations. Awesome!

* The permalink-system is still a stub but it's there (Special:Gadgets/id). For 
now this is only linked from the edit summaries used by the gadget manager when 
saving to NS_GADGET_DEFINITION.

* Added a group of boolean variables to gadgetConf in mw.config. Related to 
whether the current logged-in user has the ability to gadgets-edit, 
gadget-definition-create, gadget-definition-edit and gadget-definition-delete. 
We need those in JS.
** In JS checking these variables to determine wether to add a 'Create' tab, 
and whether or not to add the 'modify gadget' and 'delete gadget' tool links to 
each gadget block.

* Reorganize i18n messages since SpecialGadgetManager is no more. (also small 
edit in ApiQueryGadgetCategories.php to use the new message key)

* Moved some logic out of SpecialGadget::execute into their own method. 
SpecialGadgets::execute is now purely an interpreter of the query-string and 
the subpage-syntax and dispatching from there calling the appropriate method.

* Creating modify/delete links from php now instead of from JavaScript. In PHP 
they link to the NS_GADGET_DEFINITION pages (action=[edit/delete]). JavaScript 
then binds events to them to trigger the modal dialogs. This also prevents any 
remote scenario where the links 'jump' as they're already there now.

* Added new utility function getDefinitionTitleFromID to avoid repeating or 
decentralizing this logic. Perhaps this can get a better place in one of the 
backend classes. Put in GadgetHooks for now (next to getIDFromTitle)
</blockquote>

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to