On 15/02/13 09:16, Waldir Pimenta wrote:
While trying to add some more information to
https://www.mediawiki.org/wiki/Manual:Code, I came across a slightly
peculiar issue regarding the entry points for MediaWiki:
Right now, among all the entry points that I know of (those are listed in
Manual:Code), only mw-config/index.php doesn't sit in the root folder.
Furthermore, it's related to the installer at includes/installer/, but that
is not clear at all from the code organization, specifically the directory
names (and the lack of documentation both in the file and on
mediawiki.org).
I have two questions, then:
1) should all access points be on the root directory of the wiki, for
consistency?
No. The installer is on its on folder on purpose, so that you can delete
that folder once you have installed the wiki.
2) should the name "mw-config" be changed to
something that more clearly
indicates its relationship with the installer?
Note that these aren't merely nitpicking: a consistent structure and
intuitive names for files and directories play an important role in the
self-documenting nature of the code, and make the learning curve smoother
for new developers (e.g. yours truly :-)).
It was originally named "config". It came from the link that sent you
there: "You need to configure your wiki first". Then someone had
problems with other program that was installed sitewide on his host
appropiating the /config/ folder, so it was renamed to mw-config.
Also, I used Tim Starling's suggestion on IRC to
make sure the list of
entry point scripts listed in Manual:Code was complete: git grep -l
/includes/WebStart.php
I am not sure that exhausts the list, however, since thumb_handler.php
doesn't show up on its results. Any pointers regarding potential entry
points currently omitted from that list are most welcome.
That's probably because it doesn't include WebStart (it included
thumb.php, which is the one including WebStart).
Take a look at tools/code-utils/find-entries.php I have updated it to
add a few new rules in
https://gerrit.wikimedia.org/r/49230
It will give you about 100 files to check, most of them cli scripts.
Although there are a few web-enabled ones, such as
tests/qunit/data/styleTest.css.php
Use -d to see why that file was considered an entry point. As you'll
see, it is very strict -with reason- in what it considers safe.