test in monobook if a message page exists

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

test in monobook if a message page exists


I created a message page for some articles:
My_Page --> MediaWiki:Head:My_Page

I inserted the message in MonoBook.php

<?php if($this->data['nscanonical'] == 0)
$this->msgHtml('Head:'.$this->data['titleprefixeddbkey']); ?>

But instead of being silent when there is no message page for an
article, this code returns the name of the message page: the html is broken.

How to test if the message page
exists so that nothing is displayed whatsoever when it doesn't exist?

I tested a simple:
if( ($this->data['nscanonical'] == 0) &&
but it didn't change anything, which is not a surprise.

Thank you for any hint.


# MediaWiki: 1.8.2
# PHP: 5.2.0 (cgi)
# MySQL: 4.0.27

MediaWiki-l mailing list
[hidden email]