mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Interwiki
synced 2024-11-28 00:01:01 +00:00
Add/update parameter docs
Remove unused array key Return a string instead of '' Change-Id: I17776667240b3a2f1a2dd2defb56ad24ec88f49c
This commit is contained in:
parent
c67fe8aff9
commit
1935444338
|
@ -14,6 +14,7 @@ class SpecialInterwiki extends SpecialPage {
|
||||||
/**
|
/**
|
||||||
* Different description will be shown on Special:SpecialPage depending on
|
* Different description will be shown on Special:SpecialPage depending on
|
||||||
* whether the user can modify the data.
|
* whether the user can modify the data.
|
||||||
|
* @return String
|
||||||
*/
|
*/
|
||||||
function getDescription() {
|
function getDescription() {
|
||||||
return $this->msg( $this->canModify() ?
|
return $this->msg( $this->canModify() ?
|
||||||
|
@ -65,8 +66,9 @@ class SpecialInterwiki extends SpecialPage {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns boolean whether the user can modify the data.
|
* Returns boolean whether the user can modify the data.
|
||||||
* @param $out If $wgOut object given, it adds the respective error message.
|
* @param $out OutputPage|bool If $wgOut object given, it adds the respective error message.
|
||||||
* @return Boolean
|
* @throws PermissionsError
|
||||||
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function canModify( $out = false ) {
|
public function canModify( $out = false ) {
|
||||||
global $wgInterwikiCache;
|
global $wgInterwikiCache;
|
||||||
|
@ -94,6 +96,10 @@ class SpecialInterwiki extends SpecialPage {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $action string
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
function showForm( $action ) {
|
function showForm( $action ) {
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
|
|
||||||
|
@ -114,7 +120,7 @@ class SpecialInterwiki extends SpecialPage {
|
||||||
|
|
||||||
if ( !$row ) {
|
if ( !$row ) {
|
||||||
$this->error( 'interwiki_editerror', $prefix );
|
$this->error( 'interwiki_editerror', $prefix );
|
||||||
return;
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$prefix = $row->iw_prefix;
|
$prefix = $row->iw_prefix;
|
||||||
|
@ -309,7 +315,7 @@ class SpecialInterwiki extends SpecialPage {
|
||||||
$selfTitle = $this->getTitle();
|
$selfTitle = $this->getTitle();
|
||||||
|
|
||||||
# Output the existing Interwiki prefixes table rows
|
# Output the existing Interwiki prefixes table rows
|
||||||
foreach ( $iwPrefixes as $i => $iwPrefix ) {
|
foreach ( $iwPrefixes as $iwPrefix ) {
|
||||||
$out .= Html::openElement( 'tr', array( 'class' => 'mw-interwikitable-row' ) );
|
$out .= Html::openElement( 'tr', array( 'class' => 'mw-interwikitable-row' ) );
|
||||||
$out .= Html::element( 'td', array( 'class' => 'mw-interwikitable-prefix' ),
|
$out .= Html::element( 'td', array( 'class' => 'mw-interwikitable-prefix' ),
|
||||||
$iwPrefix['iw_prefix'] );
|
$iwPrefix['iw_prefix'] );
|
||||||
|
@ -350,6 +356,10 @@ class SpecialInterwiki extends SpecialPage {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a row to the documentation table on the top of Special:Interwiki.
|
* Adds a row to the documentation table on the top of Special:Interwiki.
|
||||||
|
* @param $align string
|
||||||
|
* @param $title string
|
||||||
|
* @param $text string
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
static function addInfoRow( $align = 'start', $title, $text ) {
|
static function addInfoRow( $align = 'start', $title, $text ) {
|
||||||
return Html::rawElement( 'tr', null,
|
return Html::rawElement( 'tr', null,
|
||||||
|
@ -370,6 +380,9 @@ class SpecialInterwiki extends SpecialPage {
|
||||||
* Needed to pass the URL as a raw parameter, because it contains $1
|
* Needed to pass the URL as a raw parameter, because it contains $1
|
||||||
*/
|
*/
|
||||||
class InterwikiLogFormatter extends LogFormatter {
|
class InterwikiLogFormatter extends LogFormatter {
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
protected function getMessageParameters() {
|
protected function getMessageParameters() {
|
||||||
$params = parent::getMessageParameters();
|
$params = parent::getMessageParameters();
|
||||||
if ( isset( $params[4] ) ) {
|
if ( isset( $params[4] ) ) {
|
||||||
|
|
Loading…
Reference in a new issue