Why is "Max made me put it here"?

Each MediaWiki has 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 that in such a large project this is a good reason. It seems to me that it would be bad to return an empty file to an ajax request or something like that.

BTW: It is usually called with the following parameters: load.php?debug=true&lang=de&modules=user.options&only=scripts&skin=modern&user=pi&*

+6
source share
2 answers

This message comes from ResourceLoader.php. In the file history , using git blame , you can see that the code was written by Roan Cattuu (RK) in this change set . From the comment on the change:

Make load.php the output of a comment explaining what happens when the modules are not requested and do not output anything. Max made me do it because he hates blank pages

So, your answer is that because Max hates blank pages, and if you want to know more, you should ask Roan. I guess this is debugging help; instead of looking at a blank page, wondering why it's blank, at least you know that you did something that caused the module loader to request nothing to load ...

As @svick notes, there is a link to a code review , including a discussion of whether to mention Max for everything. Mention of Max was considered as an opportunity to partially close MediaWiki Error 20281 , which states that Easter Eggs are not enough in MediaWiki.

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

+12
source

It is just to know what is going on.

If I view the load.php file of my MediaWiki installation using my web browser and want to check if there are any errors, they may appear or leave me a blank page.

A blank white page displays a PHP error that does not print on the screen.

But if I see a comment similar to /* No modules requested. Max made me put this here */ /* No modules requested. Max made me put this here */ . i know him well

And this is the reason why they should have distinguished it.

+1
source

Source: https://habr.com/ru/post/957348/


All Articles