Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php |
— | — | @@ -553,12 +553,15 @@ |
554 | 554 | |
555 | 555 | |
556 | 556 | static function renderAutoEdit ( &$parser ) { |
| 557 | + |
| 558 | + global $wgTitle; |
557 | 559 | |
558 | 560 | // set defaults |
559 | 561 | $formcontent = ''; |
560 | 562 | |
561 | 563 | $linkString = null; |
562 | 564 | $linkType = 'span'; |
| 565 | + $summary = null; |
563 | 566 | |
564 | 567 | $classString = 'autoedit-trigger'; |
565 | 568 | |
— | — | @@ -583,13 +586,16 @@ |
584 | 587 | case 'reload': |
585 | 588 | $classString .= ' reload'; |
586 | 589 | break; |
| 590 | + case 'summary': |
| 591 | + $summary = $parser->recursiveTagParse( $value ); |
| 592 | + break; |
587 | 593 | default : |
588 | 594 | $formcontent .= |
589 | 595 | Xml::input( $key, false, urldecode( $value ) , array( 'type' => 'hidden') ); |
590 | 596 | } |
591 | 597 | } |
592 | 598 | |
593 | | - if ( !$linkString ) return null; |
| 599 | + if ( $linkString == null ) return null; |
594 | 600 | |
595 | 601 | if ( $linkType == 'button' ) { |
596 | 602 | $linkElement = Xml::tags( "button", array( 'class' => $classString ), $linkString ); |
— | — | @@ -599,6 +605,13 @@ |
600 | 606 | $linkElement = Xml::tags( "span", array( 'class' => $classString ), $linkString ); |
601 | 607 | } |
602 | 608 | |
| 609 | + if ( $summary == null ) { |
| 610 | + $summary = wfMsg('sf_autoedit_summary', $wgTitle ); |
| 611 | + } |
| 612 | + |
| 613 | + $formcontent .= |
| 614 | + Xml::input( 'wpSummary', false, urldecode( $summary ), array('type' => 'hidden') ); |
| 615 | + |
603 | 616 | $form = Xml::tags( 'form', array( 'class' => 'autoedit-data' ), $formcontent ); |
604 | 617 | |
605 | 618 | // ensure loading of jQuery and style sheets |
Index: trunk/extensions/SemanticForms/languages/SF_Messages.php |
— | — | @@ -149,6 +149,7 @@ |
150 | 150 | 'sf_autoedit_toomanyformsfound' => "More than one form available for page.", |
151 | 151 | 'sf_autoedit_readonly' => "The database is currently locked to modifications. Reason: $1", |
152 | 152 | 'sf_autoedit_nosemanticform' => "Could not get form $2 for page $1. See [[{{#special:FormEdit}}/$2/$1]] for details.", |
| 153 | + 'sf_autoedit_summary' => "Edited automatically from page [[$1]].", |
153 | 154 | 'runquery' => 'Run query', |
154 | 155 | 'sf_runquery_badurl' => 'You must specify a form name in the URL; |
155 | 156 | the URL should look like \'Special:RunQuery/<form name>\'.', |