Add $wgAvailableRights and message 'right-interwiki'

This commit is contained in:
Siebrand Mazeland 2008-05-29 18:38:56 +00:00
parent ac714ab85e
commit f981fb1e67
Notes: Raimond Spekking 2009-03-28 22:26:10 +00:00
3 changed files with 14 additions and 11 deletions

View file

@ -66,6 +66,8 @@ Possibly it does not exist.',
'interwiki_logpagetext' => 'This is a log of changes to the [[Special:Interwiki|interwiki table]].',
'interwiki_defaultreason' => 'no reason given',
'interwiki_logentry' => '', # do not translate this message
'right-interwiki' => 'Edit interwiki data',
);
/** Afrikaans (Afrikaans)
@ -1395,4 +1397,3 @@ $messages['zh-hant'] = array(
'interwiki_delfailed' => '無法從連結表刪除連結字串"$1"',
'interwiki_addtext' => '新增跨語連結字串',
);

View file

@ -16,12 +16,12 @@
if (!defined('MEDIAWIKI')) die();
$wgExtensionCredits['specialpage'][] = array(
'name' => 'SpecialInterwiki',
'url' => 'http://mediawiki.org/wiki/Extension:SpecialInterwiki',
'description' => 'Adds a [[Special:Interwiki|special page]] to view and edit the interwiki table',
'svn-date' => '$LastChangedDate$',
'svn-revision' => '$LastChangedRevision$',
'author' => array( 'Stephanie Amanda Stevens', 'SPQRobin', 'others' ),
'name' => 'SpecialInterwiki',
'url' => 'http://mediawiki.org/wiki/Extension:SpecialInterwiki',
'description' => 'Adds a [[Special:Interwiki|special page]] to view and edit the interwiki table',
'svn-date' => '$LastChangedDate$',
'svn-revision' => '$LastChangedRevision$',
'author' => array( 'Stephanie Amanda Stevens', 'SPQRobin', 'others' ),
'descriptionmsg' => 'interwiki-desc',
);
@ -30,10 +30,12 @@ $wgExtensionMessagesFiles['Interwiki'] = dirname( __FILE__ ) . '/SpecialInterwik
$wgSpecialPages['Interwiki'] = 'SpecialInterwiki';
$wgAutoloadClasses['SpecialInterwiki'] = dirname( __FILE__ ) . '/SpecialInterwiki_body.php';
$wgAvailableRights[] = 'interwiki';
$wgLogTypes[] = 'interwiki';
$wgLogNames['interwiki'] = 'interwiki_logpagename';
$wgLogHeaders['interwiki'] = 'interwiki_logpagetext';
$wgLogActions['interwiki/interwiki'] = 'interwiki_logentry';
$wgLogActions['interwiki/iw_add'] = 'interwiki_log_added';
$wgLogActions['interwiki/iw_delete'] = 'interwiki_log_deleted';
$wgLogActions['interwiki/iw_edit'] = 'interwiki_log_edited';
$wgLogActions['interwiki/iw_edit'] = 'interwiki_log_edited';

View file

@ -107,7 +107,7 @@ class SpecialInterwiki extends SpecialPage {
$token = htmlspecialchars( $wgUser->editToken() );
$defaultreason = wfMsgForContent( 'interwiki_defaultreason' );
$wgOut->addHTML(
$wgOut->addHTML(
"<fieldset>
<legend>$topmessage</legend>
$intromessage
@ -168,7 +168,7 @@ class SpecialInterwiki extends SpecialPage {
$theurl = $wgRequest->getVal('theurl');
$local = $wgRequest->getCheck('local') ? 1 : 0;
$trans = $wgRequest->getCheck('trans') ? 1 : 0;
$data = array( 'iw_prefix' => $prefix, 'iw_url' => $theurl,
$data = array( 'iw_prefix' => $prefix, 'iw_url' => $theurl,
'iw_local' => $local, 'iw_trans' => $trans );
if( $do == 'add' ){
@ -249,4 +249,4 @@ class SpecialInterwiki extends SpecialPage {
$wgOut->addHTML($out);
}
}
}
}