X-Git-Url: http://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fparser%2FParser.php;h=75c1faf7129e0d59a3fddd3110c2344656128108;hp=3548da9581e7b0b9ec6f0a6ab56f464eba981323;hb=3d560be428920fd4eb10ea6e9760dafbba8f9ddc;hpb=3c11855351c3caf2333e579e00b4dc3387a6d3a0 diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 3548da9581..75c1faf712 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3108,10 +3108,29 @@ class Parser { throw $ex; } - # The interface for parser functions allows for extracting - # flags into the local scope. Extract any forwarded flags - # here. - extract( $result ); + // Extract any forwarded flags + if ( isset( $result['found'] ) ) { + $found = $result['found']; + } + if ( array_key_exists( 'text', $result ) ) { + // a string or null + $text = $result['text']; + } + if ( isset( $result['nowiki'] ) ) { + $nowiki = $result['nowiki']; + } + if ( isset( $result['isHTML'] ) ) { + $isHTML = $result['isHTML']; + } + if ( isset( $result['forceRawInterwiki'] ) ) { + $forceRawInterwiki = $result['forceRawInterwiki']; + } + if ( isset( $result['isChildObj'] ) ) { + $isChildObj = $result['isChildObj']; + } + if ( isset( $result['isLocalObj'] ) ) { + $isLocalObj = $result['isLocalObj']; + } } } @@ -3862,11 +3881,12 @@ class Parser { } if ( is_array( $output ) ) { - # Extract flags to local scope (to override $markerType) + // Extract flags $flags = $output; $output = $flags[0]; - unset( $flags[0] ); - extract( $flags ); + if ( isset( $flags['markerType'] ) ) { + $markerType = $flags['markerType']; + } } } else { if ( is_null( $attrText ) ) {