From: Tyler Anthony Romeo Date: Wed, 15 Aug 2012 20:54:01 +0000 (-0400) Subject: Removing unused method Status::getXML. X-Git-Tag: 1.31.0-rc.0~22689 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/message.php?a=commitdiff_plain;h=cb3ff28cf1e8e1a23de5be66f730a1a36fe1e0a6;p=lhc%2Fweb%2Fwiklou.git Removing unused method Status::getXML. Removed Status::getXML and its single usage in one of the phpunit maintenance scripts. It is not used anywhere in any known extension. Change-Id: I676446647681059449c46c2ff109570a060e0e20 Signed-off-by: Tyler Anthony Romeo --- diff --git a/includes/Status.php b/includes/Status.php index 29dc2f4f45..10dfb516b8 100644 --- a/includes/Status.php +++ b/includes/Status.php @@ -164,35 +164,6 @@ class Status { return $cleanParams; } - /** - * @param $item - * @return string - */ - protected function getItemXML( $item ) { - $params = $this->cleanParams( $item['params'] ); - $xml = "<{$item['type']}>\n" . - Xml::element( 'message', null, $item['message'] ) . "\n" . - Xml::element( 'text', null, wfMessage( $item['message'], $params )->text() ) ."\n"; - foreach ( $params as $param ) { - $xml .= Xml::element( 'param', null, $param ); - } - $xml .= "\n"; - return $xml; - } - - /** - * Get the error list as XML - * @return string - */ - function getXML() { - $xml = "\n"; - foreach ( $this->errors as $error ) { - $xml .= $this->getItemXML( $error ); - } - $xml .= "\n"; - return $xml; - } - /** * Get the error list as a wikitext formatted list * diff --git a/tests/phpunit/maintenance/DumpTestCase.php b/tests/phpunit/maintenance/DumpTestCase.php index b5eb573761..d13443899c 100644 --- a/tests/phpunit/maintenance/DumpTestCase.php +++ b/tests/phpunit/maintenance/DumpTestCase.php @@ -45,7 +45,7 @@ abstract class DumpTestCase extends MediaWikiLangTestCase { return array( $revision_id, $text_id ); } } - throw new MWException( "Could not determine revision id (" . $status->getXML() . ")" ); + throw new MWException( "Could not determine revision id (" . $status->getWikiText() . ")" ); }