r90718 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90717‎ | r90718 | r90719 >
Date:17:13, 24 June 2011
Author:ankitgarg833
Status:deferred
Tags:
Comment:
Modified paths:
  • /trunk/extensions/PageSchemas/PageSchemas.classes.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PageSchemas/PageSchemas.classes.php
@@ -93,7 +93,7 @@
9494
9595 /*class holds the PageScheme tag equivalent object */
9696
97 -class PageSchema {
 97+class PSSchema {
9898
9999 public $categoryName="";
100100 public $pageId=0;
@@ -107,29 +107,7 @@
108108 function __construct ( $category_name ) {
109109 $this->categoryName = $category_name;
110110 $title = Title::newFromText( $category_name, NS_CATEGORY );
111 - $pageId = $title->getArticleID();
112 - /*$pageXmlstr =<<<END
113 - <ClassSchema name="City">
114 - <FormName>City</FormName>
115 - <Template name="City">
116 - <Field name="Population">
117 - <Property name="Has population">
118 - <Type>Number</Type>
119 - </Property>
120 - <FormInput>
121 - <InputType>text</InputType>
122 - <Size>20</Size>
123 - </FormInput>
124 - <Filter>
125 - <Label>Population</Label>
126 - </Filter>
127 - </Field>
128 - </Template>
129 - </ClassSchema>
130 -END;
131 -
132 - */
133 -
 111+ $pageId = $title->getArticleID();
134112 $dbr = wfGetDB( DB_SLAVE );
135113 //get the result set, query : slect page_props
136114 $res = $dbr->select( 'page_props',
@@ -172,7 +150,7 @@
173151 $field_all = $template->getFields();
174152 foreach( $field_all as $field ) { //for each Field, retrieve smw properties and fill $prop_name , $prop_type
175153 $prop_array = $field->getObject('Property'); //this returns an array with property values filled
176 - wfRunHooks( 'PageSchemasGeneratePages', array( $prop_array['name'], $prop_array['Type'], $prop_array['allowed_value_str'] ) );
 154+ wfRunHooks( 'PageSchemasGeneratePages', array( $prop_array['name'], $prop_array['Type'], $prop_array['allowed_value_array'] ) );
177155 }
178156 }
179157 }

Status & tagging log