Index: trunk/extensions/PageSchemas/PageSchemas.classes.php |
— | — | @@ -93,7 +93,7 @@ |
94 | 94 | |
95 | 95 | /*class holds the PageScheme tag equivalent object */ |
96 | 96 | |
97 | | -class PageSchema { |
| 97 | +class PSSchema { |
98 | 98 | |
99 | 99 | public $categoryName=""; |
100 | 100 | public $pageId=0; |
— | — | @@ -107,29 +107,7 @@ |
108 | 108 | function __construct ( $category_name ) { |
109 | 109 | $this->categoryName = $category_name; |
110 | 110 | $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(); |
134 | 112 | $dbr = wfGetDB( DB_SLAVE ); |
135 | 113 | //get the result set, query : slect page_props |
136 | 114 | $res = $dbr->select( 'page_props', |
— | — | @@ -172,7 +150,7 @@ |
173 | 151 | $field_all = $template->getFields(); |
174 | 152 | foreach( $field_all as $field ) { //for each Field, retrieve smw properties and fill $prop_name , $prop_type |
175 | 153 | $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'] ) ); |
177 | 155 | } |
178 | 156 | } |
179 | 157 | } |