r92872 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92871‎ | r92872 | r92873 >
Date:18:21, 22 July 2011
Author:ankitgarg833
Status:deferred
Tags:
Comment:
added setPageNameFormula,setCreateTitle,setEditTitle method invocation in generatePages method
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_Utils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_Utils.php
@@ -195,7 +195,7 @@
196196 */
197197 public static function generatePages( $psSchemaObj, $toGenPageList ) {
198198 global $wgOut, $wgUser;
199 - $template_all = $psSchemaObj->getTemplates();
 199+ $template_all = $psSchemaObj->getTemplates();
200200 $form_templates = array();
201201 $jobs = array();
202202 foreach ( $template_all as $template ) {
@@ -231,11 +231,15 @@
232232 $form_templates[] = $form_template;
233233 }
234234 $form_name = $psSchemaObj->getFormName();
 235+ $form_array = $psSchemaObj->getFormArray();
235236 if( $form_name == null ){
236237 return true;
237238 }
238 - $form = SFForm::create( $form_name, $form_templates );
239 - $title = Title::makeTitleSafe( SF_NS_FORM, $form->form_name );
 239+ $form = SFForm::create( $form_name, $form_templates );
 240+ $form->setPageNameFormula( $form_array['PageNameFormula'] );
 241+ $form->setCreateTitle( $form_array['CreateTite'] );
 242+ $form->setEditTitle( $form_array['EditTitle'] );
 243+ $title = Title::makeTitleSafe( SF_NS_FORM, $form->mFormName );
240244 $key_title = PageSchemas::titleString( $title );
241245 if( in_array($key_title, $toGenPageList )){
242246 $full_text = $form->createMarkup();
@@ -255,7 +259,7 @@
256260 if ( $tag == "FormInput" ) {
257261 $text = "";
258262 $text = PageSchemas::tableMessageRowHTML( "paramAttr", "SemanticForms", (string)$tag );
259 - foreach ( $child->children() as $prop ) {
 263+ foreach ( $child->children() as $prop ) {
260264 if( $prop->getName() == 'InputType' ){
261265 $text .= PageSchemas::tableMessageRowHTML("paramAttrMsg", $prop->getName(), $prop );
262266 }else {