Last modified: 2008-01-15 04:47:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T14622, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12622 - A JavaScript constant to declare whether api.php is available
A JavaScript constant to declare whether api.php is available
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-14 10:51 UTC by Andrew Dunbar
Modified: 2008-01-15 04:47 UTC (History)
2 users (show)

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


Attachments

Description Andrew Dunbar 2008-01-14 10:51:56 UTC
For JavaScript extensions it will often be useful to know if api.php is installed on the wiki whereby the same function may be implemented more efficiently with it and less efficiently without it.

Currently it is not possible for a JavaScript extension to know whether api.php is installed without sending an ajax request. But since the results of such a check can't be remembered for views of subsequent wiki pages it would be quite wasteful to use such a method.

I propose a variable such as wgEnableAPI which would be set to "true" if api.php is installed and "false" if not. The name of the variable is not terribly important.
Comment 1 Roan Kattouw 2008-01-14 14:42:24 UTC
We might want to pass wgEnableWriteAPI in a similar fashion.
Comment 2 Victor Vasiliev 2008-01-15 04:47:57 UTC
Fixed in r29757

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


Navigation
Links