On 27/06/07, Daniel Barrett <danb(a)vistaprint.com> wrote:
I have an app that depends on a particular system
message that might not
exist yet.
What is the correct way to accomplish the following logic in an
extension?
Ordinarily, you would write code that populates the MessageCache such
that it is safe to assume a message exists. There are a large number
of extensions in Subversion which can provide examples for doing this.
In some cases, it might be desirable to alter the behaviour depending
upon if the message does exist. The usual method for checking this is
wfEmptyMsg(), e.g.
$text = wfMsg( 'blah' );
if( wfEmptyMsg( 'blah', $text ) ) {
// ...
Rob Church