Yaron Koren has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390285 )
Change subject: Fix for handling of free text between section tags ...................................................................... Fix for handling of free text between section tags Change-Id: I5f35d2c7fbdbd9c874c3a24b678f3470d3c8ffea --- M includes/PF_FormPrinter.php 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms refs/changes/85/390285/2 diff --git a/includes/PF_FormPrinter.php b/includes/PF_FormPrinter.php index e2bc5ca..ed30c87 100644 --- a/includes/PF_FormPrinter.php +++ b/includes/PF_FormPrinter.php @@ -1271,12 +1271,12 @@ } } - if ( $section_end_loc === -1 ) { - $section_text = $existing_page_content; - $existing_page_content = ''; + if ( $section_end_loc === -1 || $section_end_loc == null ) { + $section_text = substr( $existing_page_content, $section_start_loc ); + $existing_page_content = substr( $existing_page_content, 0, $section_start_loc ); } else { $section_text = substr( $existing_page_content, $section_start_loc, $section_end_loc - $section_start_loc ); - $existing_page_content = substr( $existing_page_content, $section_end_loc ); + $existing_page_content = substr( $existing_page_content, 0, $section_start_loc ) . substr( $existing_page_content, $section_end_loc ); } } -- To view, visit https://gerrit.wikimedia.org/r/390285 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5f35d2c7fbdbd9c874c3a24b678f3470d3c8ffea Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/PageForms Gerrit-Branch: master Gerrit-Owner: Yaron Koren <yaro...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits