Last modified: 2011-03-13 18:05:54 UTC
This is not a bug report but rather a code review remark. Preprocessor_Hash::preprocessToObj says: 00075 if ( strpos( $text, '<onlyinclude>' ) !== false && strpos( $text, '</onlyinclude>' ) !== false ) { 00076 $enableOnlyinclude = true; 00077 } that means "</onlyinclude><onlyinclude>" is covered by the case. Whas that intended? I suppose it was not and this is only some heuristic to detect "<onlyinclude>…</onlyinclude>"; however, an obvious improvement seems to exist. I would rather say this if( ($oip = strpos($text, '<onlyinclude>')) !== false && strpos($text, '</onlyinclude>', $oip + strlen('<onlyinclude>')) != false)
Regexes, anyone?
Regexes are needlessly slow, you just need to compare those two strpos'es.
This isn't really worth adding code complexity and overhead for this case.