mediawiki-extensions / mediawiki

Automatically exported from code.google.com/p/mediawiki
0 stars 0 forks source link

InterWikiLinkManager does not support multi-lang #18

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The problem is that the namespace mediawiki may change to any language
so we have to overcome it.

I made the next fix in my code, perhaps you could find it useful and add 
it to your code.

I changed the const mPage:
const mPage    = "Registry/InterWikiLinks";

I had to add this function:
public function is_mPage($sText)
{
    $titleName = substr($sText, strripos($sText, ':') + 1 );
    if ($titleName == self::mPage ) return true;
    else return false;
}

And to call it at this location:
// Are we dealing with the page which contains the links to manage?
if ( !self::is_mPage($article->mTitle->getFullText()) ) return true;

And at this location:
// Are we dealing with the page which contains the links to manage?
if ( !self::is_mPage($title->getFullText()) ) return true;

yours,
Nir

Original issue reported on code.google.com by i.blackr...@gmail.com on 26 May 2008 at 12:50

GoogleCodeExporter commented 8 years ago
Hi - this patch does not address a critical issue:  the registry page must be
"secure" and that's why I have located it in the Mediawiki namespace.  Your 
patch
makes this page "exist" in all namespaces at once, an inappropriate situation 
in my
opinion.

I understand the problem and I will fix it when I have time. 

Many thanks for taking the time to report this limitation.
Cheers.

Original comment by JeanLou....@gmail.com on 29 May 2008 at 4:12