Last modified: 2010-06-21 17:18:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 17336 - REQ: Output database queries as XML for AJAX apps
REQ: Output database queries as XML for AJAX apps
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
  Show dependency treegraph
Reported: 2009-02-03 13:22 UTC by Ralph Taylor
Modified: 2010-06-21 17:18 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

patch to add XML output to Database.php (2.81 KB, patch)
2009-02-03 13:22 UTC, Ralph Taylor

Description Ralph Taylor 2009-02-03 13:22:11 UTC
Created attachment 5775 [details]
patch to add XML output to Database.php

When developing extensions or other features that use AJAX and custom database queries there is no current function to return a database query as an XML document to the AJAX script.

Attached is a diff file which introduces a function to create an XML document based on a Database transaction.  Insert, Update and Delete queries should return a boolean value, when parsed through the returnXML() function will generate an XML document as so:

{for queries that have returned as TRUE}

{for queries that have returned as FALSE}

Select queries which should return a ResultWrapper object, when parsed throught the returnXML() function will generate an XML document as so:


Where the row_titles are the field names from the database transaction.
Comment 1 Ralph Taylor 2009-02-06 11:38:45 UTC
My further thoughts on this feature request is that this patch should be moved to the SAJAX class and provide support for error message handling

Marking bug as LATER until I work on the patch
Comment 2 Max Semenik 2010-06-21 17:18:13 UTC
Generic access to SQL queries is available in AskSQL extension and is unlikely to be extended or even cared for due to obvious security concerns.

Note You need to log in before you can comment on or make changes to this bug.