Yaron Koren has submitted this change and it was merged. Change subject: Fix for removing of all instances of an embedded template ......................................................................
Fix for removing of all instances of an embedded template Change-Id: I7304588681b5b67804388531f9e5b512df18c5a5 --- M includes/SF_FormPrinter.php 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Yaron Koren: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/includes/SF_FormPrinter.php b/includes/SF_FormPrinter.php index be002f4a..4f504c0 100644 --- a/includes/SF_FormPrinter.php +++ b/includes/SF_FormPrinter.php @@ -886,6 +886,13 @@ // convert the values into a string. $cur_value_in_template = self::getStringFromPassedInArray( $cur_value, $delimiter ); } + } elseif ( $form_field->holdsTemplate() ) { + // If this field holds an embedded template, + // and the value is not an array, it means + // there are no instances of the template - + // set the value to null to avoid getting + // whatever is currently on the page. + $cur_value_in_template = null; } else { // value is not an array $cur_value_in_template = $cur_value; } -- To view, visit https://gerrit.wikimedia.org/r/271915 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7304588681b5b67804388531f9e5b512df18c5a5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Yaron Koren <yaro...@gmail.com> Gerrit-Reviewer: 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