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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T7140, the corresponding Phabricator task for complete and up-to-date bug report information.
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