r95156 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95155‎ | r95156 | r95157 >
Date:17:18, 21 August 2011
Author:ankitgarg833
Status:deferred
Tags:
Comment:
changing Property tag to semanticmediawiki_Property
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php
@@ -600,7 +600,7 @@
601601
602602 function smwfParseFieldElements( $field_xml, &$text_object ) {
603603 foreach ( $field_xml->children() as $tag => $child ) {
604 - if ( $tag == "Property" ) {
 604+ if ( $tag == "semanticmediawiki_Property" ) {
605605 $text = "";
606606 $text = PageSchemas::tableMessageRowHTML( "paramAttr", "SemanticMediaWiki", (string)$tag );
607607 $propName = $child->attributes()->name;
@@ -622,7 +622,7 @@
623623 $field_count = 0; //counts the number of fields
624624 foreach( $field_all as $field ) { //for each Field, retrieve smw properties and fill $prop_name , $prop_type
625625 $field_count++;
626 - $smw_array = $field->getObject('Property'); //this returns an array with property values filled
 626+ $smw_array = $field->getObject('semanticmediawiki_Property'); //this returns an array with property values filled
627627 $prop_array = $smw_array['smw'];
628628 if($prop_array != null){
629629 $title = Title::makeTitleSafe( SMW_NS_PROPERTY, $prop_array['name'] );
@@ -641,7 +641,7 @@
642642 foreach ( $wgRequest->getValues() as $var => $val ) {
643643 if(substr($var,0,18) == 'smw_property_name_'){
644644 $templateNum = substr($var,18,1);
645 - $Xmltext .= '<semanticmediawiki:Property name="'.$val.'" >';
 645+ $Xmltext .= '<semanticmediawiki_Property name="'.$val.'" >';
646646 }else if(substr($var,0,18) == 'smw_property_type_'){
647647 $Xmltext .= '<Type>'.$val.'</Type>';
648648 }else if(substr($var,0,11) == 'smw_values_'){
@@ -657,7 +657,7 @@
658658 $Xmltext .= '<AllowedValue>'.$value.'</AllowedValue>';
659659 }
660660 }
661 - $Xmltext .= '</semanticmediawiki:Property>';
 661+ $Xmltext .= '</semanticmediawiki_Property>';
662662 $xml_text_array[] = $Xmltext;
663663 $Xmltext = '';
664664 }
@@ -676,7 +676,7 @@
677677 $field_count = 0; //counts the number of fields
678678 foreach( $field_all as $field ) { //for each Field, retrieve smw properties and fill $prop_name , $prop_type
679679 $field_count++;
680 - $smw_array = $field->getObject('Property'); //this returns an array with property values filled
 680+ $smw_array = $field->getObject('semanticmediawiki_Property'); //this returns an array with property values filled
681681 $prop_array = $smw_array['smw'];
682682 if($prop_array != null){
683683 $html_text .= '<fieldset style="background: #DEF;"><legend>Property</legend>';
@@ -731,7 +731,7 @@
732732 $field_count = 0; //counts the number of fields
733733 foreach( $field_all as $field ) { //for each Field, retrieve smw properties and fill $prop_name , $prop_type
734734 $field_count++;
735 - $smw_array = $field->getObject('Property'); //this returns an array with property values filled
 735+ $smw_array = $field->getObject('semanticmediawiki_Property'); //this returns an array with property values filled
736736 $prop_array = $smw_array['smw'];
737737 if($prop_array != null){
738738 $title = Title::makeTitleSafe( SMW_NS_PROPERTY, $prop_array['name'] );
@@ -786,7 +786,7 @@
787787 */
788788 function smwfCreatePageSchemasObject( $objectName, $xmlForField, &$object ) {
789789 $smw_array = array();
790 - if ( $objectName == "Property" ) {
 790+ if ( $objectName == "semanticmediawiki_Property" ) {
791791 foreach ( $xmlForField->children() as $tag => $child ) {
792792 if ( $tag == $objectName ) {
793793 $propName = $child->attributes()->name;