Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why "Max made me put this here"?

Every MediaWiki has a load.php.

If called without parameters it returns:

/* No modules requested. Max made me put this here */

As a curious programmer I wonder:

Why did he do this?

I am sure in a big project like this there is a good reason for it. Looks to me like it would be bad to return an empty file to an ajax query or something like it.

BTW: Normally it is called with parameters like this: load.php?debug=true&lang=de&modules=user.options&only=scripts&skin=modern&user=pi&*

like image 321
PiTheNumber Avatar asked Nov 04 '13 14:11

PiTheNumber


1 Answers

This message comes from ResourceLoader.php. In the history of the file, using git blame, you can see the code was written by Roan Kattouw (RK) in this changeset. From the changeset comment:

Make load.php output a comment explaining what's going on when no modules were requested rather than outputting nothing. Max made me do this because he hates blank pages

So, your answer is, because Max hates blank pages, and if you want to know more, you should ask Roan. My guess would be that it's a debugging aid; rather than staring at a blank page wondering why it's blank, at least you know that you did something that caused a module loader request to load nothing...

As @svick points out, there is also a link to the code review, including discussion of whether it's a good idea to mention Max at all. Mentioning Max was seen as a possibility to partially close MediaWiki bug 20281, which notes that there aren't enough Easter Eggs in MediaWiki.

And that's why public repositories of open source software are cool :D

like image 156
Matt Gibson Avatar answered Oct 06 '22 19:10

Matt Gibson