Index: trunk/phase3/includes/parser/Preprocessor_Hash.php |
— | — | @@ -942,7 +942,7 @@ |
943 | 943 | if ( $contextNode->name == 'template' ) { |
944 | 944 | # Double-brace expansion |
945 | 945 | $bits = $contextNode->splitTemplate(); |
946 | | - if ( $flags & self::NO_TEMPLATES ) { |
| 946 | + if ( $flags & PPFrame::NO_TEMPLATES ) { |
947 | 947 | $newIterator = $this->virtualBracketedImplode( '{{', '|', '}}', $bits['title'], $bits['parts'] ); |
948 | 948 | } else { |
949 | 949 | $ret = $this->parser->braceSubstitution( $bits, $this ); |
— | — | @@ -955,7 +955,7 @@ |
956 | 956 | } elseif ( $contextNode->name == 'tplarg' ) { |
957 | 957 | # Triple-brace expansion |
958 | 958 | $bits = $contextNode->splitTemplate(); |
959 | | - if ( $flags & self::NO_ARGS ) { |
| 959 | + if ( $flags & PPFrame::NO_ARGS ) { |
960 | 960 | $newIterator = $this->virtualBracketedImplode( '{{{', '|', '}}}', $bits['title'], $bits['parts'] ); |
961 | 961 | } else { |
962 | 962 | $ret = $this->parser->argSubstitution( $bits, $this ); |
— | — | @@ -970,13 +970,13 @@ |
971 | 971 | # Remove it in HTML, pre+remove and STRIP_COMMENTS modes |
972 | 972 | if ( $this->parser->ot['html'] |
973 | 973 | || ( $this->parser->ot['pre'] && $this->parser->mOptions->getRemoveComments() ) |
974 | | - || ( $flags & self::STRIP_COMMENTS ) ) |
| 974 | + || ( $flags & PPFrame::STRIP_COMMENTS ) ) |
975 | 975 | { |
976 | 976 | $out .= ''; |
977 | 977 | } |
978 | 978 | # Add a strip marker in PST mode so that pstPass2() can run some old-fashioned regexes on the result |
979 | 979 | # Not in RECOVER_COMMENTS mode (extractSections) though |
980 | | - elseif ( $this->parser->ot['wiki'] && ! ( $flags & self::RECOVER_COMMENTS ) ) { |
| 980 | + elseif ( $this->parser->ot['wiki'] && ! ( $flags & PPFrame::RECOVER_COMMENTS ) ) { |
981 | 981 | $out .= $this->parser->insertStripItem( $contextNode->firstChild->value ); |
982 | 982 | } |
983 | 983 | # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove |
— | — | @@ -988,7 +988,7 @@ |
989 | 989 | # OT_WIKI will only respect <ignore> in substed templates. |
990 | 990 | # The other output types respect it unless NO_IGNORE is set. |
991 | 991 | # extractSections() sets NO_IGNORE and so never respects it. |
992 | | - if ( ( !isset( $this->parent ) && $this->parser->ot['wiki'] ) || ( $flags & self::NO_IGNORE ) ) { |
| 992 | + if ( ( !isset( $this->parent ) && $this->parser->ot['wiki'] ) || ( $flags & PPFrame::NO_IGNORE ) ) { |
993 | 993 | $out .= $contextNode->firstChild->value; |
994 | 994 | } else { |
995 | 995 | //$out .= ''; |
— | — | @@ -1285,7 +1285,7 @@ |
1286 | 1286 | } |
1287 | 1287 | if ( !isset( $this->numberedExpansionCache[$index] ) ) { |
1288 | 1288 | # No trimming for unnamed arguments |
1289 | | - $this->numberedExpansionCache[$index] = $this->parent->expand( $this->numberedArgs[$index], self::STRIP_COMMENTS ); |
| 1289 | + $this->numberedExpansionCache[$index] = $this->parent->expand( $this->numberedArgs[$index], PPFrame::STRIP_COMMENTS ); |
1290 | 1290 | } |
1291 | 1291 | return $this->numberedExpansionCache[$index]; |
1292 | 1292 | } |
— | — | @@ -1297,7 +1297,7 @@ |
1298 | 1298 | if ( !isset( $this->namedExpansionCache[$name] ) ) { |
1299 | 1299 | # Trim named arguments post-expand, for backwards compatibility |
1300 | 1300 | $this->namedExpansionCache[$name] = trim( |
1301 | | - $this->parent->expand( $this->namedArgs[$name], self::STRIP_COMMENTS ) ); |
| 1301 | + $this->parent->expand( $this->namedArgs[$name], PPFrame::STRIP_COMMENTS ) ); |
1302 | 1302 | } |
1303 | 1303 | return $this->namedExpansionCache[$name]; |
1304 | 1304 | } |
Index: trunk/phase3/includes/parser/Preprocessor_DOM.php |
— | — | @@ -975,7 +975,7 @@ |
976 | 976 | $titles = $xpath->query( 'title', $contextNode ); |
977 | 977 | $title = $titles->item( 0 ); |
978 | 978 | $parts = $xpath->query( 'part', $contextNode ); |
979 | | - if ( $flags & self::NO_TEMPLATES ) { |
| 979 | + if ( $flags & PPFrame::NO_TEMPLATES ) { |
980 | 980 | $newIterator = $this->virtualBracketedImplode( '{{', '|', '}}', $title, $parts ); |
981 | 981 | } else { |
982 | 982 | $lineStart = $contextNode->getAttribute( 'lineStart' ); |
— | — | @@ -996,7 +996,7 @@ |
997 | 997 | $titles = $xpath->query( 'title', $contextNode ); |
998 | 998 | $title = $titles->item( 0 ); |
999 | 999 | $parts = $xpath->query( 'part', $contextNode ); |
1000 | | - if ( $flags & self::NO_ARGS ) { |
| 1000 | + if ( $flags & PPFrame::NO_ARGS ) { |
1001 | 1001 | $newIterator = $this->virtualBracketedImplode( '{{{', '|', '}}}', $title, $parts ); |
1002 | 1002 | } else { |
1003 | 1003 | $params = array( |
— | — | @@ -1014,13 +1014,13 @@ |
1015 | 1015 | # Remove it in HTML, pre+remove and STRIP_COMMENTS modes |
1016 | 1016 | if ( $this->parser->ot['html'] |
1017 | 1017 | || ( $this->parser->ot['pre'] && $this->parser->mOptions->getRemoveComments() ) |
1018 | | - || ( $flags & self::STRIP_COMMENTS ) ) |
| 1018 | + || ( $flags & PPFrame::STRIP_COMMENTS ) ) |
1019 | 1019 | { |
1020 | 1020 | $out .= ''; |
1021 | 1021 | } |
1022 | 1022 | # Add a strip marker in PST mode so that pstPass2() can run some old-fashioned regexes on the result |
1023 | 1023 | # Not in RECOVER_COMMENTS mode (extractSections) though |
1024 | | - elseif ( $this->parser->ot['wiki'] && ! ( $flags & self::RECOVER_COMMENTS ) ) { |
| 1024 | + elseif ( $this->parser->ot['wiki'] && ! ( $flags & PPFrame::RECOVER_COMMENTS ) ) { |
1025 | 1025 | $out .= $this->parser->insertStripItem( $contextNode->textContent ); |
1026 | 1026 | } |
1027 | 1027 | # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove |
— | — | @@ -1032,7 +1032,7 @@ |
1033 | 1033 | # OT_WIKI will only respect <ignore> in substed templates. |
1034 | 1034 | # The other output types respect it unless NO_IGNORE is set. |
1035 | 1035 | # extractSections() sets NO_IGNORE and so never respects it. |
1036 | | - if ( ( !isset( $this->parent ) && $this->parser->ot['wiki'] ) || ( $flags & self::NO_IGNORE ) ) { |
| 1036 | + if ( ( !isset( $this->parent ) && $this->parser->ot['wiki'] ) || ( $flags & PPFrame::NO_IGNORE ) ) { |
1037 | 1037 | $out .= $contextNode->textContent; |
1038 | 1038 | } else { |
1039 | 1039 | $out .= ''; |
— | — | @@ -1335,7 +1335,7 @@ |
1336 | 1336 | } |
1337 | 1337 | if ( !isset( $this->numberedExpansionCache[$index] ) ) { |
1338 | 1338 | # No trimming for unnamed arguments |
1339 | | - $this->numberedExpansionCache[$index] = $this->parent->expand( $this->numberedArgs[$index], self::STRIP_COMMENTS ); |
| 1339 | + $this->numberedExpansionCache[$index] = $this->parent->expand( $this->numberedArgs[$index], PPFrame::STRIP_COMMENTS ); |
1340 | 1340 | } |
1341 | 1341 | return $this->numberedExpansionCache[$index]; |
1342 | 1342 | } |
— | — | @@ -1347,7 +1347,7 @@ |
1348 | 1348 | if ( !isset( $this->namedExpansionCache[$name] ) ) { |
1349 | 1349 | # Trim named arguments post-expand, for backwards compatibility |
1350 | 1350 | $this->namedExpansionCache[$name] = trim( |
1351 | | - $this->parent->expand( $this->namedArgs[$name], self::STRIP_COMMENTS ) ); |
| 1351 | + $this->parent->expand( $this->namedArgs[$name], PPFrame::STRIP_COMMENTS ) ); |
1352 | 1352 | } |
1353 | 1353 | return $this->namedExpansionCache[$name]; |
1354 | 1354 | } |