r90769 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90768‎ | r90769 | r90770 >
Date:13:35, 25 June 2011
Author:ankitgarg833
Status:deferred
Tags:
Comment:
adding code to display xml.
Modified paths:
  • /trunk/extensions/PageSchemas/PageSchemas.classes.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PageSchemas/PageSchemas.classes.php
@@ -56,29 +56,30 @@
5757
5858 static function parsePageSchemas($class_schema_xml) {
5959
60 - global $wgTitle;
61 -
 60+ global $wgTitle;
6261 if($wgTitle->getNamespace() == NS_CATEGORY){
6362 $text = "<p>Schema description:</p>\n";
6463 $text .= "<table class=\"pageSchema\">\n";
6564 $name = $class_schema_xml->attributes()->name;
66 - $text = self::tableRowHTML('template_class', 'PageSchema', $name);
67 - foreach ( $class_schema_xml->children() as $tag => $child ) {
68 - if ($tag == 'Template') {
69 - $text .= self::parseTemplate($child);
70 - } else{
71 - echo "Code to be added by other extension\n";
 65+ $text .= self::tableRowHTML('paramGroup', 'PageSchema', $name);
 66+ foreach ( $class_schema_xml->children() as $tag => $child ) {
 67+ if ($tag == 'Template') {
 68+ $text .= self::parseTemplate($child);
 69+ } else{
 70+ echo "Code to be added by other extension\n";
 71+ }
7272 }
73 - }
7473 $text .= "</table>\n";
7574 }else{
7675 $text = "";
7776 }
 77+ wfDebugLog( 'myextension', 'Generate html is:: ' . $text );
7878 return $text;
 79+
7980 }
80 - static function parseTemplate ( $template_xml ) {
 81+ static function parseTemplate ( $template_xml ) {
8182 $name = $template_xml->attributes()->name;
82 - $text = self::tableRowHTML('template_class', 'Template', $name);
 83+ $text = self::tableRowHTML('param', 'Template', $name);
8384 foreach ($template_xml->children() as $child) {
8485 $text .= self::parseField($child);
8586 }
@@ -86,7 +87,7 @@
8788 }
8889 static function parseField ( $field_xml ) {
8990 $name = $field_xml->attributes()->name;
90 - $text = self::tableMessageRowHTML('paramDataField', $name, $field_xml);
 91+ $text = self::tableMessageRowHTML('paramAttr', $name, $field_xml);
9192 return $text;
9293 }
9394 }

Status & tagging log