Last modified: 2008-01-15 04:47:57 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 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