Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/271915
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(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms refs/changes/15/271915/1 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: newchange Gerrit-Change-Id: I7304588681b5b67804388531f9e5b512df18c5a5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Yaron Koren <yaro...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits