global $wgLanguageCode, $wgContLanguageCode, $wgContLang;
global $wgUseDatabaseMessages;
- if($wgLanguageCode != $wgContLanguageCode &&
- !in_array($wgLanguageCode, $wgContLang->getVariants())) {
- $err = wfMsg('allmessagesnotsupportedUI');
- $wgOut->addHTML( $err );
- return;
- }
if(!$wgUseDatabaseMessages) {
$wgOut->addHTML(wfMsg('allmessagesnotsupportedDB'));
return;
wfProfileIn( "$fname-setup");
$ot = $wgRequest->getText( 'ot' );
- $mwMsg =& MagicWord::get( MAG_MSG );
- $navText = wfMsg( 'allmessagestext', $mwMsg->getSynonym( 0 ) );
+ $navText = wfMsg( 'allmessagestext' );
$first = true;
} else {
$comment = '';
}
- $txt .= "'".$key."' => \"".str_replace('"','\"',$m['msg'])."\",$comment\n";
+ $txt .= "'$key' => '" . preg_replace( "/(?<!\\\\)'/", "\'", $m['msg']) . "',$comment\n";
}
$txt .= ');';
return $txt;
*
*/
function makeHTMLText( $messages ) {
- global $wgLang, $wgUser, $wgLanguageCode, $wgContLanguageCode;
+ global $wgLang, $wgUser, $wgLanguageCode, $wgContLanguageCode, $wgContLang;
$fname = "makeHTMLText";
wfProfileIn( $fname );
<table border='1' cellspacing='0' width='100%'>
<tr bgcolor='#b2b2ff'>
- <th>Name</th>
- <th>Default text</th>
- <th>Current text</th>
+ <th>" . wfMsg('allmessagesname') . "</th>
+ <th>" . wfMsg('allmessagesdefault') . "</th>
+ <th>" . wfMsg('allmessagescurrent') . "</th>
</tr>";
wfProfileIn( "$fname-check" );
NS_MEDIAWIKI => array(),
NS_MEDIAWIKI_TALK => array()
);
- $sql = "SELECT cur_namespace,cur_title FROM cur WHERE cur_namespace IN (" . NS_MEDIAWIKI . ", " . NS_MEDIAWIKI_TALK . ")";
$dbr =& wfGetDB( DB_SLAVE );
+ $page = $dbr->tableName( 'page' );
+ $sql = "SELECT page_namespace,page_title FROM $page WHERE page_namespace IN (" . NS_MEDIAWIKI . ", " . NS_MEDIAWIKI_TALK . ")";
$res = $dbr->query( $sql );
while( $s = $dbr->fetchObject( $res ) ) {
- $pageExists[$s->cur_namespace][$s->cur_title] = true;
+ $pageExists[$s->page_namespace][$s->page_title] = true;
}
$dbr->freeResult( $res );
wfProfileOut( "$fname-check" );
wfProfileIn( "$fname-output" );
+
foreach( $messages as $key => $m ) {
$title = $wgLang->ucfirst( $key );
if($wgLanguageCode != $wgContLanguageCode)
$title.="/$wgLanguageCode";
+
$titleObj =& Title::makeTitle( NS_MEDIAWIKI, $title );
$talkPage =& Title::makeTitle( NS_MEDIAWIKI_TALK, $title );