Yaron Koren has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326018 )

Change subject: Attempted fix for b071fb1b09c0
......................................................................


Attempted fix for b071fb1b09c0

Change-Id: I4b9e87d835459111523af22b4993b73e0b4489b2
---
M includes/PF_Template.php
1 file changed, 3 insertions(+), 5 deletions(-)

Approvals:
  Yaron Koren: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/PF_Template.php b/includes/PF_Template.php
index 37cd345..a838ab4 100644
--- a/includes/PF_Template.php
+++ b/includes/PF_Template.php
@@ -84,14 +84,14 @@
                // they're part of an "#if" statement), so they're only
                // recorded the first time they're found.
 
-               // Replace all calls to #set with with standard SMW tags. This
-               // is done so that calls of #set within #arraymap will get
+               // Replace all calls to #set within #arraymap with standard
+               // SMW tags. This is done so that they will later get
                // parsed correctly.
                // This is "cheating", since it modifies the template text
                // (the rest of the function doesn't do that), but trying to
                // get the #arraymap check regexp to find both kinds of SMW
                // property tags seemed too hard to do.
-               $this->mTemplateText = preg_replace( 
'/{{\s*#set:\s*([^=]*)=([^}]*)}}/', '[[$1:$2]]', $this->mTemplateText );
+               $this->mTemplateText = preg_replace( 
'/#arraymap.*{{\s*#set:\s*([^=]*)=([^}]*)}}/', '[[$1:$2]]', 
$this->mTemplateText );
 
                // Look for "arraymap" parser function calls that map a
                // property onto a list.
@@ -125,8 +125,6 @@
 
                // Then, get calls to #set, #set_internal and #subobject.
                // (Thankfully, they all have similar syntax).
-               // (The #set check isn't actually necessary, since they were
-               // all replaced earlier.)
                if ( preg_match_all( 
'/#(set|set_internal|subobject):(.*?}}})\s*}}/mis', $this->mTemplateText, 
$matches ) ) {
                        foreach ( $matches[2] as $match ) {
                                if ( preg_match_all( 
'/([^|{]*?)=\s*{{{([^|}]*)/mis', $match, $matches2 ) ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/326018
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b9e87d835459111523af22b4993b73e0b4489b2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageForms
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

Reply via email to