r95372 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95371‎ | r95372 | r95373 >
Date:03:29, 24 August 2011
Author:yaron
Status:deferred
Tags:
Comment:
Fixed bug in page creation for Page Schemas
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_Utils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_Utils.php
@@ -351,12 +351,12 @@
352352 $params['user_id'] = $wgUser->getId();
353353 $params['page_text'] = $template_text;
354354 $jobs[] = new PSCreatePageJob( $title, $params );
355 - Job::batchInsert( $jobs );
356355 }
357356 //Creating Form Templates at this time
358357 $form_template = SFTemplateInForm::create( $template->getName(), $template->getLabel(), $template->isMultiple() );
359358 $form_templates[] = $form_template;
360359 }
 360+ Job::batchInsert( $jobs );
361361 $form_name = $psSchemaObj->getFormName();
362362 $form_array = $psSchemaObj->getFormArray();
363363 if( $form_name == null ){
@@ -373,7 +373,7 @@
374374 $params = array();
375375 $params['user_id'] = $wgUser->getId();
376376 $params['page_text'] = $full_text;
377 - $jobs[] = new PSCreatePageJob( $title, $params );
 377+ $jobs = array( new PSCreatePageJob( $title, $params ) );
378378 Job::batchInsert( $jobs );
379379 }
380380 return true;