[Mediawiki-l] how to access internal info properly

Juriy Katkov katkov.juriy at gmail.com
Wed Dec 1 23:50:25 UTC 2010


Hello!

I have a question about accessing the internal info of mediawiki in an
extension code, e.g. information about revisions for pages.
What interface has less chances to change during the development of Media
Wiki? Is it database structure or mediawiki classes such as User, Article,
Revision?

For example, it's very simple to make select-query for getting all
contributors for the page $thisPageTitle:

SELECT  rev_user_text
    FROM page
    INNER JOIN revision on page.page_id=revision.rev_page
    WHERE
    page_title=\"$thisPageTitle\";

On the other hand I'm sure that there exists a  class method that allows us
to do the same thing.

What of these ways is more proper in terms of portability from one MediaWiki
version to another?

Sincerely yours,
Yury Katkov


More information about the MediaWiki-l mailing list