Page MenuHomePhabricator

Remove use of sajax
Closed, ResolvedPublic

Description

Use of sajax should be replaced by jQuery.ajax functionality

extensions/SemanticForms/includes/SF_FormUtils.php
450:function FCK_sajax(func_name, args, target) {
451: sajax_request_type = 'POST' ;
452: sajax_do_call(func_name, args, function (x) {
716: sajax_request_type = 'POST' ;
718: sajax_do_call('wfSajaxWikiToHTML', [SRCtextarea.value], function ( result ){
736: if (!oFCKeditor.ready) return false; sajax_do_call in action
754: sajax_request_type = 'GET' ;
755: sajax_do_call( 'wfSajaxToggleFCKeditor', ['hide'], function(){} ) ;
remember closing in session

extensions/SemanticForms/libs/SF_ajax_form_preview.js
43: var aj = sajax_init_object();
44: var aj2 = sajax_init_object();
70: if (!oFCKeditor.ready) return false; sajax_do_call in action - what do we do?

extensions/SemanticForms/libs/SF_autoedit.js
35: sajax_request_type = 'POST';
37: sajax_do_call( 'SFAutoeditAPI::handleAutoEdit', data, function( ajaxHeader ){

extensions/SemanticForms/libs/SF_submit.js
55: sajax_request_type = 'POST';
58: sajax_do_call( 'SFAutoeditAPI::handleAutoEdit', new Array(collectData( form ), false), function( ajaxHeader ){


Version: unspecified
Severity: normal

Details

Reference
bz40745

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:58 AM
bzimport set Reference to bz40745.

That would be great - I didn't even know that SF code still used sajax. The first two calls are from the code that handles FCKeditor/WYSIWYG, which I've wanted to get rid of anyway, because I'm pretty sure it's useless at this point, so this would be a good excuse to do it. The last two are from autoedit handling - Stephan, I assume you would take care of those?

As soon as I find the time, yes. Although if you want to have a go at it, go ahead. :)

I just removed all support for the FCKeditor extension in the SF code, which felt good - I think the overall code quality doubled. :) That removed the first chunk of sajax calls, and part of the 2nd - though three instances remain. I may able to look into that JS code, though right now all of it is a mystery to me.

(In reply to comment #4)

Fixed in https://gerrit.wikimedia.org/r/34974

This was merged on the 28th of November by Yaron Koren, but has made a new problem - see bug 42624.