Rename 'wasve' parameter to 'veswitched'

Per Krinkle's comment on I1426d300

Change-Id: Ic99efe9488c98a7f6703142d6061bd2cdbac833b
This commit is contained in:
Krenair 2014-03-08 17:49:53 +00:00 committed by Catrope
parent f8685d94a7
commit 6b2d30c259
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

@ -815,7 +815,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 } )
);
};