Yaron Koren has submitted this change and it was merged.

Change subject: Commented out template-parsing code that was causing problems
......................................................................


Commented out template-parsing code that was causing problems

Change-Id: I736196bb8038fec397d4a626d9f23821b1aeb0a1
---
M PageSchemas.classes.php
1 file changed, 8 insertions(+), 5 deletions(-)

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



diff --git a/PageSchemas.classes.php b/PageSchemas.classes.php
index 0364d44..1818a8e 100644
--- a/PageSchemas.classes.php
+++ b/PageSchemas.classes.php
@@ -431,7 +431,7 @@
                // Index for template objects
                $i = 0 ;
                $inherited_fields = array();
-               foreach ($templateXML->children() as $child) {
+               foreach ( $templateXML->children() as $child ) {
                        if ( $child->getName() == 'InheritsFrom' ) {
                                $schema_to_inherit = (string) 
$child->attributes()->schema;
                                $template_to_inherit = (string) 
$child->attributes()->template;
@@ -445,11 +445,13 @@
                                        }
                                }
                        } elseif ( $child->getName() == "Field" ) {
+                               $fieldObj = new PSTemplateField( $child );
+                               $this->mFields[$i++]= $fieldObj;
+                               // "Ignore" the below code for now; it's not
+                               // needed, and doesn't work yet.
+/*
                                $ignore = (string) $child->attributes()->ignore;
-                               if ( count($child->children()) > 0 ) { //@TODO 
:Can be dealt more efficiently
-                                       $fieldObj = new PSTemplateField( $child 
);
-                                       $this->mFields[$i++]= $fieldObj;
-                               } elseif ( $ignore != "true" ) {
+                               if ( $ignore != "true" ) {
                                        // Code to add fields from inherited 
templates
                                        $field_name = (string) 
$child->attributes()->name;
                                        foreach ( $inherited_fields as 
$inherited_field ) {
@@ -458,6 +460,7 @@
                                                }
                                        }
                                }
+*/
                        }
                }
        }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I736196bb8038fec397d4a626d9f23821b1aeb0a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageSchemas
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