X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiParse.php;h=855b73d2e16fc16227f8bca0db9043578562e7c3;hb=4691389fa46f79cbeaf2daffda407cf7daa66fd4;hp=a78cb7f5adf3963cb98aebcdcc8835686af59394;hpb=1dee28cb5f1efd6d9e14d6cc1d0c73c3f69269b4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index a78cb7f5ad..855b73d2e1 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -330,7 +330,7 @@ class ApiParse extends ApiBase { } if ( !is_null( $oldid ) ) { - $result_array['revid'] = intval( $oldid ); + $result_array['revid'] = (int)$oldid; } if ( $params['redirects'] && !is_null( $redirValues ) ) { @@ -487,7 +487,7 @@ class ApiParse extends ApiBase { } $wgParser->startExternalParse( $titleObj, $popts, Parser::OT_PREPROCESS ); - $xml = $wgParser->preprocessToDom( $this->content->getNativeData() )->__toString(); + $xml = $wgParser->preprocessToDom( $this->content->getText() )->__toString(); $result_array['parsetree'] = $xml; $result_array[ApiResult::META_BC_SUBELEMENTS][] = 'parsetree'; } @@ -625,7 +625,7 @@ class ApiParse extends ApiBase { * This mimicks the behavior of EditPage in formatting a summary * * @param Title $title of the page being parsed - * @param Array $params the API parameters of the request + * @param array $params The API parameters of the request * @return Content|bool */ private function formatSummary( $title, $params ) {