Issue:No More Globals

From FollowTheScore
Jump to: navigation, search
Description: Transition from global variables, constants, and functions to class members, constants, and methods
Extension / Version: DPL   /   1.5.3
Type / Status: Change Request   /   closed


Since MediaWiki is slowly moving away from globals (see Manual:Global variables), I recommend that DPL also migrate from both global variables and functions. Static class members and methods are a reasonable alternative. —Sledged (talk) 06:18, 10 October 2007 (CEST)


You are absolutely right. The code is not very well structured. It grew from an old simple implementation to a rather big piece of code. Although I think it is still maintainable I would prefer some restructuring. Quality of open source products comes from several authors contributing to the same source (ideally ..). Would you want to start the restructuring effort? You could download the current sources, make the appropriate changes and then upload again within a time frame of, say four weeks... Gero 08:39, 10 October 2007 (CEST)

Sorry it took so long to get back on this one. Yes, I can do this. In fact, I have transitioned v1.5.3. I've converted all the global variables, constants, and functions to class members, constants, and methods (all static) in all three DPL2 files (except, of course, those defined within the core MediaWiki code). I've done some limited testing, but I'd recommend do some extensive testing of your own to make sure I didn't break any thing. With the transition, I've changed a lot of the constant/variable/function names (mostly the Hungarian notations), and I consolidated the all the extension registry code to one setup function. Submitted for your approval: ZIP-o-DPL2Sledged (talk) 19:55, 21 November 2007 (CET)
How nice that you took 1.5.3. So there is no gap. I will do some testing on a local copy of this wiki and then I will install it here for further testing. -- Gero 15:18, 22 November 2007 (CET)
I found two or three smaller errors and corrected them. All test cases seem to run. Now let us hope for the best. B.t.w. How do you feel about breaking the source monster into smaller pieces? ;-)) -- Gero 17:47, 24 November 2007 (CET)
I feel it would very beneficial, but I never know when I'm going to have the time to do it. So I can do it, and I'd like to do it, but I make no guarantees as to when I'll have the first installment. —Sledged (talk) 22:29, 25 November 2007 (CET)
That´s fine with me.
My further testing showed that the new 1.6 version creates problems with older MW installations. I am preparing a 1.6.1 release which will hopefully solve that problem .
Gero 14:22, 26 November 2007 (CET)