$result = $this->trySubmit();
}
- if ( $result === true ) {
+ if ( $result === true ||
+ ( $result instanceof Status && $result->isGood() ) )
+ {
return $result;
}
* @return String
*/
function getErrors( $errors ) {
- if ( is_array( $errors ) ) {
+ if ( $errors instanceof Status ) {
+ global $wgOut;
+ $errorstr = $wgOut->parse( $errors->getWikiText() );
+ } elseif ( is_array( $errors ) ) {
$errorstr = $this->formatErrors( $errors );
} else {
$errorstr = $errors;