Last modified: 2006-03-02 02:36:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 5140 - Non-virtual calls in Article.php
Non-virtual calls in Article.php
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.6.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-02 00:57 UTC by Juliano F. Ravasi
Modified: 2006-03-02 02:36 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Juliano F. Ravasi 2006-03-02 00:57:56 UTC
There are a few member functions in the Article class, named onArticleCreate(),
onArticleDelete() and onArticleEdit() that, according to the comment near them,
they are a kind of hook functions that are called when articles are created,
deleted or edited. Nevertheless, all calls to these member functions in the same
class are explicitly non-virtual for no apparent reason. I.e., these functions
are called like

        Article::onArticleEdit( $this->mTitle );

instead of

        $this->onArticleEdit( $this->mTitle );

This makes it impossible to override these hooks on derived classes. Is there
any reason why all calls to these functions were made non-virtual? Would it be
possible to make these calls virtual?

I'm designing an extension that needs such functionality. After editing an
article, I need to invalidate the cache of its parent articles, and this would
be cleanest way to do it.

This is somewhat related to bug #5135.
Comment 1 Brion Vibber 2006-03-02 02:36:06 UTC
Those are static (class) methods.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links