Merge "Rename 'wasve' parameter to 'veswitched'"

This commit is contained in:
jenkins-bot 2014-03-12 18:14:12 +00:00 committed by Gerrit Code Review
commit 9eea7240b7
2 changed files with 5 additions and 5 deletions

View file

@ -118,7 +118,7 @@ class VisualEditorHooks {
/**
* Called when the normal wikitext editor is shown.
* Inserts a 'wasve' hidden field if requested by the client
* Inserts a 'veswitched' hidden field if requested by the client
*
* @param $editPage EditPage
* @param $output OutputPage
@ -126,8 +126,8 @@ class VisualEditorHooks {
*/
public static function onEditPageShowEditFormFields( EditPage $editPage, OutputPage $output ) {
$request = RequestContext::getMain()->getRequest();
if ( $request->getBool( 'wasve' ) ) {
$output->addHTML( Xml::input( 'wasve', false, '1', array( 'type' => 'hidden' ) ) );
if ( $request->getBool( 'veswitched' ) ) {
$output->addHTML( Xml::input( 'veswitched', false, '1', array( 'type' => 'hidden' ) ) );
}
return true;
}
@ -154,7 +154,7 @@ class VisualEditorHooks {
$section, $flags, $revision, $status, $baseRevId
) {
$request = RequestContext::getMain()->getRequest();
if ( $request->getBool( 'wasve' ) && $revision ) {
if ( $request->getBool( 'veswitched' ) && $revision ) {
ChangeTags::addTags( 'visualeditor-switched', null, $revision->getId() );
}
return true;

View file

@ -814,7 +814,7 @@ ve.init.mw.ViewPageTarget.prototype.editSource = function () {
// Get Wikitext from the DOM
this.serialize(
this.docToSave || ve.dm.converter.getDomFromModel( doc ),
ve.bind( this.submitWithSaveFields, this, { 'wpDiff': 1, 'wasve': 1 } )
ve.bind( this.submitWithSaveFields, this, { 'wpDiff': 1, 'veswitched': 1 } )
);
};