Commit graph

150 commits

Author SHA1 Message Date
Sam Reed
faf34b4073 Per http://www.mediawiki.org/wiki/Special:Code/MediaWiki/66168#c7252 switch while ( $row = $db->fectchObject( $res ) ) to foreach ( $res as row )
On ApiQueryUsers switch $r to row, and remove nested brackets
2010-06-20 18:48:34 +00:00
Sam Reed
a90a0783de Nuke $db->freeResult() from Api stuffs 2010-06-20 17:48:21 +00:00
Derk-Jan Hartman
0fa66a5343 Use the helper function Title::newMainPage() instead of newFromTitle().
Patch by User:Umherirrender
2010-06-19 11:49:26 +00:00
Sam Reed
e55ed729c4 Mixture of things.
Couple of class comments

Normalisation of "." usage at end of lines (removed)

Normalisation of {prefix}parameter as per bug 23461
2010-05-11 22:30:18 +00:00
Jack Phoenix
7ced9bc569 API: fix copyright symbol, coding style cleanup, more braces 2010-02-26 13:18:56 +00:00
Sam Reed
1f9a7d791c Implement 9 modules dieUsage errors 2010-02-13 00:48:31 +00:00
Sam Reed
d2d950d256 Start of blanket coverage of dieUsageMsg in getPossibleErrors
Only basic ones done.

Couple of other modules done manually
2010-02-13 00:09:05 +00:00
Roan Kattouw
e7aeb3f91f API: Support key-params arrays in 'descriptionmsg' in meta=siteinfo&siprop=extensions 2010-01-24 12:11:18 +00:00
Roan Kattouw
72d97f8fea API: (bug 22248) Output extension URLs in meta=siteinfo&siprop=extensions 2010-01-24 10:19:16 +00:00
Roan Kattouw
a94d246f1a Revert r61414 per CR comment: wfTimestampNow() doesn't take a TS_* parameter 2010-01-24 10:05:19 +00:00
Sam Reed
b15f2c8c46 Normalise comment usage (# --> //) 2010-01-23 22:52:40 +00:00
Roan Kattouw
10bafc0edb Followup to r61412: don't use time(), we have our own function for this 2010-01-23 15:05:24 +00:00
Sam Reed
e575b22704 * (bug 22240) - API: include time in siteinfo
Patch by Matthew Britton
2010-01-23 12:37:03 +00:00
Aryeh Gregor
3758769f0d stylize.php on API code
"I wouldn't object to stylizing the API code to bring it in line with
the rest of MW on principle, but I'm not gonna bother myself." --Roan
<http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60657#c5108>

If you're seeing this commit in blames, tell your blame tool to ignore
whitespace, e.g., git blame -w or svn blame -x -w.
2010-01-11 15:55:52 +00:00
Tim Starling
bd8fffe24d Reverted r58646 as per my comments on bug 20554. 2009-12-01 01:55:04 +00:00
Roan Kattouw
1b89cd274a API: (bug 20554) Expose average slave lag (avglag) as well as maxlag. Patch by Sam Reed. 2009-11-06 14:38:55 +00:00
Chad Horohoe
c319cc8968 (bug 13750) $wgCapitalLinks should be a per-namespace setting 2009-10-09 12:52:16 +00:00
Bryan Tong Minh
b17adbc880 (bug 17809) Add number of users in user groups to meta=siteinfo 2009-07-12 12:10:27 +00:00
Tim Starling
23cfebd3d2 * Introduced a new system for localisation caching. The system is based around fast fetches of individual messages, minimising memory overhead and startup time in the typical case. It handles both core messages (formerly in Language.php) and extension messages (formerly in MessageCache.php). Profiling indicates a significant win for average throughput.
* The serialized message cache, which would have been redundant, has been removed. Similar performance characteristics can be achieved with $wgLocalisationCacheConf['manualRecache'] = true;
* Added a maintenance script rebuildLocalisationCache.php for offline rebuilding of the localisation cache.
* Extension i18n files can now contain any of the variables which can be set in Messages*.php. It is possible, and recommended, to use this feature instead of the hooks for special page aliases and magic words. 
* $wgExtensionAliasesFiles, LanguageGetMagic and LanguageGetSpecialPageAliases are retained for backwards compatibility. $wgMessageCache->addMessages() and related functions have been removed. wfLoadExtensionMessages() is a no-op and can continue to be called for b/c. 
* Introduced $wgCacheDirectory as a default location for the various local caches that have accumulated. Suggested $IP/cache as a good place for it in the default LocalSettings.php and created this directory with a deny-all .htaccess.
* Patched Exception.php to avoid using the message cache when an exception is thrown from within LocalisationCache, since this tends to fail horribly.
* Removed Language::getLocalisationArray(), Language::loadLocalisation(), Language::load()
* Fixed FileDependency::__sleep()
* In Cdb.php, fixed newlines in debug messages

In MessageCache::get(): 
* Replaced calls to $wgContLang capitalisation functions with plain PHP functions, reducing the typical case from 99us to 93us. Message cache keys are already documented as being restricted to ASCII.
* Implemented a more efficient way to filter out bogus language codes, reducing the "foo/en" case from 430us to 101us
* Optimised wfRunHooks() in the typical do-nothing case, from ~30us to ~3us. This reduced MessageCache::get() typical case time from 93us to 38us.
* Removed hook MessageNotInMwNs to save an extra 3us per cache hit. Reimplemented the only user (LocalisationUpdate) using the new hook LocalisationCacheRecache.
2009-06-28 07:11:43 +00:00
Roan Kattouw
b6acef6319 Remove unused global left in r51727 2009-06-11 09:05:47 +00:00
Chad Horohoe
83eab2a0ce Per code review: Use Language::getLanguageNames() instead. 2009-06-11 04:49:10 +00:00
Roan Kattouw
72c9341d1d API: (bug 18785) Add siprop=languages to meta=siteinfo 2009-06-07 18:20:01 +00:00
Roan Kattouw
bb54f6c627 API: (bug 18773) Add content flag to siprop=namespaces output 2009-06-07 18:09:57 +00:00
Roan Kattouw
fc32d63609 Fix up r50126: dump $wgDBtype rather than a class name, per CR comment 2009-05-04 07:00:52 +00:00
Roan Kattouw
2e20458e1c API: (bug 18533) Add readonly message to meta=siteinfo output 2009-05-02 14:24:11 +00:00
Roan Kattouw
06687f0d95 API: Add PHP and database version to meta=siteinfo output 2009-05-02 13:35:20 +00:00
Tim Starling
4ba01bff2f Add lots more information to the siteinfo query. Based on the JS variable list. 2009-04-30 05:25:35 +00:00
Chad Horohoe
7748725389 (bug 17795) Make meta=siteinfo respect $wgDisableCounters. 2009-03-05 13:52:14 +00:00
Roan Kattouw
88f35cdf6e API: Some cleanup
* Aggressively intval() numeric things; addresses the concerns raised on bug 11633
* Use ApiQueryBase::addTitleInfo() everywhere
* Remove a drug-induced-looking line from ApiQueryWatchlist.php
2009-02-27 16:03:01 +00:00
Roan Kattouw
8c813c3c92 Redo r47313 in a more readable way (probably more efficient too) by not using all those array_* functions 2009-02-16 12:19:29 +00:00
Roan Kattouw
37070d2e5a API: (bug 17502) meta=siteinfo&siprop=namespacealiases no longer lists namespace aliases already listed in siprop=namespaces 2009-02-16 11:20:58 +00:00
Roan Kattouw
2df33ff098 * API: BREAKING CHANGE: (bug 11430) Return fewer results than the limit in some cases to prevent running out of memory
* This means queries could possibly return fewer results than the limit and still set a query-continue
* Add iicontinue, rvcontinue, cicontinue, incontinue, amfrom to faciliate query-continue for these modules
* Implemented by blocking additions to the ApiResult object if they would make it too large
** Important things like query-continue values and warnings are exempt from this check
** RSS feeds and exported XML are also exempted (size-checking them would be too messy)
** Result size is checked against $wgAPIMaxResultSize, which defaults to 8 MB

For those who really care, per-file details follow:

ApiResult.php:
* Introduced ApiResult::$mSize which keeps track of the result size.
* Introduced ApiResult::size() which calculates an array's size
  (which is the sum of the strlen()s of its elements).
* ApiResult::addValue() now checks that the result size stays below
  $wgAPIMaxResultSize. If the item won't fit, it won't be added and addValue()
  will return false. Callers should check the return value and set a
  query-continue if it's false.
* Closed the back door that is ApiResult::getData(): callers can't manipulate
  the data array directly anymore so they can't bypass the result size limit.
* Added ApiResult::setIndexedTagName_internal() which will call
  setIndexedTagName() on an array already in the result. This is needed for the
  'new' order of adding results, which means addValue()ing one result at a time
  until you hit the limit or run out, then calling this function to set the tag
  name.
* Added ApiResult::disableSizeCheck() and enableSizeCheck() which disable and
  enable size checking in addValue(). This is used for stuff like query-continue
  elements and warnings which shouldn't count towards the result size.
* Added ApiResult::unsetValue() which removes an element from the result and
  decreases $mSize.

ApiBase.php:
* Like ApiResult::getData(), ApiBase::getResultData() no longer returns a
  reference.
* Use ApiResult::disableSizeCheck() in ApiBase::setWarning()

ApiQueryBase.php:
* Added ApiQueryBase::addPageSubItem(), which adds page subitems one item
  at a time.
* addPageSubItem() and addPageSubItems() now return whether the subitem
  fit in the result.
* Use ApiResult::disableSizeCheck() in setContinueEnumParameter()

ApiMain.php:
* Use ApiResult::disableSizeCheck() in ApiMain::substituteResultWithError()
* Use getParameter() rather than $mRequest to obtain requestid

DefaultSettings.php:
* Added $wgAPIMaxResultSize, with a default value of 8 MB

ApiQuery*.php:
* Added results one at a time, and set a query-continue if the result is full.

ApiQueryLangLinks.php and friends:
* Migrated from addPageSubItems() to addPageSubItem(). This eliminates the
  need for $lastId.

ApiQueryAllLinks.php, ApiQueryWatchlist.php, ApiQueryAllimages.php, ApiQuerySearch.php:
* Renamed $data to something more appropriate ($pageids, $ids or $titles)

ApiQuerySiteinfo.php:
* Abuse siprop as a query-continue parameter and set it to all props that
  couldn't be processed.

ApiQueryRandom.php:
* Doesn't do continuations, because the result is supposed to be random.
* Be smart enough to not run the second query if the results of the first
  didn't fit.

ApiQueryImageInfo.php, ApiQueryRevisions.php, ApiQueryCategoryInfo.php, ApiQueryInfo.php:
* Added continue parameter which basically skips the first so many items

ApiQueryBacklinks.php:
* Throw the result in a big array first and addValue() that one element at a time if necessary
** This is necessary because the results aren't retrieved in order
* Introduced $this->pageMap to map namespace and title to page ID
* Rewritten extractRowInfo() and extractRedirRowInfo() a little
* Declared all private member variables explicitly

ApiQueryDeletedrevs.php:
* Use a pagemap just like in Backlinks
* Introduce fake page IDs and keep track of them so we know where to add what
** This doesn't change the output format, because the fake page IDs start at 0 and are consecutive

ApiQueryAllmessages.php:
* Add amfrom to facilitate query-continue

ApiQueryUsers.php:
* Rewrite: put the getOtherUsersInfo() code in execute()
2009-02-05 14:30:59 +00:00
Roan Kattouw
2b6314c9c4 (bug 17327) Normalize API help texts: remove quotes 2009-02-02 23:17:07 +00:00
Roan Kattouw
06b5d0f9d5 API: (bug 17224) Add siprop=rightsinfo to meta=siteinfo. Modified patch by Brianna Laugher 2009-01-31 15:56:52 +00:00
Roan Kattouw
383d826b0f Revert r46138 (Get $wgLegalTitleChars through API) per comments on CodeReview and Bugzilla (bug 17024) 2009-01-27 13:10:16 +00:00
Roan Kattouw
2e5e8808b4 API: (bug 17024) Added legaltitlechars field to meta=siteinfo&siprop=general output, which contains the value of $wgLegalTitleChars 2009-01-24 13:16:24 +00:00
Brion Vibber
5b8a7db0c4 Revert r45810 "API: (bug 17027) Allow all configuration variables in $wgAPIReadableConfigVars to be read through meta=siteinfo&siprop=configvars. I tried my best to only make useful stuff readable and skip stuff that's sensitive (like $wgDBpassword), available already (like $wgExtraNamespaces) or useless (like $wgUpdateRowsPerJob)."
This is way too tightly coupled to internal implementation details. Any and all of those things could change dramatically; they're not appropriate for an external API.
2009-01-20 22:57:05 +00:00
Roan Kattouw
b8d66efbb1 Followup to r45810: remove unused global declaration 2009-01-16 21:10:02 +00:00
Roan Kattouw
d161831223 API: (bug 17027) Allow all configuration variables in $wgAPIReadableConfigVars to be read through meta=siteinfo&siprop=configvars. I tried my best to only make useful stuff readable and skip stuff that's sensitive (like $wgDBpassword), available already (like $wgExtraNamespaces) or useless (like $wgUpdateRowsPerJob). 2009-01-16 21:03:13 +00:00
X!
97da594444 (bug 17025) Add "fileextension" parameter to meta=siteinfo&siprop= 2009-01-14 22:15:50 +00:00
Roan Kattouw
2584890446 Fix up r44860, use $wgContLang instead. 2008-12-20 23:49:16 +00:00
Roan Kattouw
25bf90b363 API: (bug 16726) siprop=namespacealiases should also list localized aliases 2008-12-20 23:20:15 +00:00
Roan Kattouw
cc98ce259b API: Fix up r44676: convert underscores to spaces in canonical names. 2008-12-18 15:00:07 +00:00
Brion Vibber
2f1cee5b91 Cleanup r44683 -- fix E_NOTICE bug in MWNamespace::getCanonicalName() instead of replicating the function. :)
(Also note -- using MWNamespace instead of Namespace for PHP 5.3 compat.)
2008-12-16 23:57:21 +00:00
Alex Z
ddde44606b Fix for r44676, fix E_NOTICE from having no canonical name associated with a namespace (ns 0), move RELEASE-NOTES entry to API section and clarify. 2008-12-16 19:59:37 +00:00
X!
5bf752ee6a * (bug 16672) Add canonical parameter to meta=siteinfo&siprop=namespaces|namespacealiases. 2008-12-16 17:19:05 +00:00
Chad Horohoe
a8a6844e61 Support extension information in meta=siteinfo. 2008-12-14 22:06:32 +00:00
Brion Vibber
4c54e4016f * API siteinfo query no longer throws an exception for empty sifilter parameter.
The parameter is defined as being one of two values ('local' or '!local'), but comes back as array() if it was specified but empty... which then got overly-strictly checked against 'false', which was used internally for the case where it's unspecified, and an exception thrown internally.

Now the filter parameter is nicely ignored whether it's unspecified or specified as empty, which is good clear behavior.

As before, other values return a standard API error about invalid values being passed.
2008-11-17 18:13:11 +00:00
Roan Kattouw
d5ed68afaa API: Self-revert r42811 (BREAKING CHANGE: Putting meta=siteinfo output in <siteinfo> element for consistency with every other API module.). On second thought, it's not really necessary. 2008-10-30 14:43:41 +00:00
Roan Kattouw
20dd6fdb02 API: BREAKING CHANGE: Putting meta=siteinfo output in <siteinfo> element for consistency with every other API module. Previously, it was just put in the <query> element, where it doesn't belong. 2008-10-30 14:36:05 +00:00
Roan Kattouw
ced78b9748 API: (bug 16126) Added siprop=magicwords to meta=siteinfo 2008-10-26 13:57:19 +00:00
Roan Kattouw
58ed5d34bf API: (bug 16047) Added activeusers attribute to meta=siteinfo&siprop=statistics output 2008-10-22 12:16:24 +00:00
Chad Horohoe
14a80040bf Deprecate SiteStats::admins() in favor of SiteStats::numberingroup('sysop'). Should make bug 13471 easy. 2008-07-28 15:49:44 +00:00
Victor Vasiliev
ed66838f12 * (bug 14723) Added time zone and writing direction to meta=siteinfo. Patch by MaxSem
* Some random cleanup
2008-07-04 09:21:11 +00:00
Roan Kattouw
4be00dd978 API:
* (bug 14605) Adding readonly field to meta=siteinfo&siprop=general
* Unifying coding style in ApiQuerySiteinfo
2008-06-21 15:13:26 +00:00
Aryeh Gregor
4ed81df65f Code simplification (-205 bytes :P):
* Add MWNamespace::hasSubpages() and use that instead of $wgNamespacesWithSubpages everywhere
* Put early returns first, and don't else { } the rest of the code
2008-05-23 22:00:14 +00:00
Aryeh Gregor
033fd9b701 * Don't allow moving with subpages to a namespace that doesn't allow subpages. Such a move is only questionably reasonable, and even if reasonable it's not possible to revert it.
* Use a consistent test for whether a namespace permits subpages: empty(), not isset or boolean test with errors suppressed or a combination of those.  The isset test alone (used in isSubpage()) is particularly broken because it returns true if the namespace is explicitly set to *not* allow namespaces, and only returns false if the entry is unset.
* Reshuffle some global declarations, simplify a conditional block
2008-05-23 17:09:28 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Roan Kattouw
5b8213e9ef * Re-applying r34449, r34500 and r34518 which Brion reverted by accident
* Adding ApiQueryBase::addJoinConds() as wrapper for Database::select()'s $join_conds parameter
* Migrating query modules to addJoinConds()
* Using implicit join rather than INNER JOIN in ApiQueryBacklinks
* Using FORCE INDEX (times) on logging table in ApiQueryLogEvents; although MySQL 4 seems to pick this index automatically (evidenced by the fact the WMF servers are still alive), MySQL 5 doesn't and filesorts
* Replacing LEFT JOIN with implicit (inner) join in ApiQueryContributions: revisions without a corresponding page table entry shouldn't be shown anyway
2008-05-10 10:49:26 +00:00
Brion Vibber
4bc02c88ca Revert to r34430 in order to revert r34431 which is breaking the site (unindexed filesorts) 2008-05-09 18:00:15 +00:00
Roan Kattouw
1be49fb8de (bug 14028) Added language attribute to interwiki map in meta=siteinfo 2008-05-09 09:41:53 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Alexandre Emsenhuber
f64888e853 Don't use $wgDBservers to get server ip, it isn't set on Wikimedia and return host="" for all db servers 2008-04-08 20:24:31 +00:00
Roan Kattouw
3cc7e481f4 (bug 13603) Added siprop=usergroups to meta=siteinfo. Patch by Mormegil 2008-04-03 14:33:36 +00:00
Tim Starling
fbfb509df5 * Introduced LBFactory -- an abstract class for configuring database load balancers and connecting to foreign DBs.
* Wrote two concrete implementations. LBFactory_Simple is for general installations. LBFactory_Multi will replace the runtime configuration used on Wikimedia and allow load-balanced connections to any DB. 
* Ported Special:Userrights, CentralAuth and OAI audit to the LBFactory system. 
* Added ForeignDBViaLBRepo, a file repository which uses LBFactory.
* Removed $wgLoadBalancer and $wgAlternateMaster
* Improved the query group concept to allow failover and lag control
* Improved getReaderIndex(), it will now try all servers before waiting, instead of waiting after each.
* Removed the $fail parameter to getConnection(), obsolete. 
* Removed the useless force() function. 
* Abstracted the replication position interface to allow for future non-MySQL support.
* Rearranged Database.php. Added a few debugging features. 
* Removed ancient benet-specific hack from waitForSlave.php
2008-03-30 09:48:15 +00:00
Roan Kattouw
8dd17b2b5c API: Added fallback8bitEncoding to meta=siteinfo output 2008-03-28 13:12:47 +00:00
Roan Kattouw
f227fd9915 (bug 13541) Adding siprop=specialpagealiases to meta=siteinfo 2008-03-28 12:47:21 +00:00
Alexandre Emsenhuber
b3a4f7c0cf Don't show local="" if the interwiki isn't local 2008-03-27 15:12:16 +00:00
Bryan Tong Minh
57100a052b Show whether the WriteApi is enabled in meta=siteinfo. 2008-03-04 17:29:05 +00:00
Roan Kattouw
e0af6c66a9 (bug 13154) Adding subpage info to meta=siteinfo&siprop=namespaces. Also adding RELEASE-NOTES entry for r31260 2008-02-25 22:11:56 +00:00
Rotem Liss
a6822ccda3 Fixing main page display in meta=siteinfo: also showing namespace, if exists (e.g. in enwiktionary). 2008-02-24 18:36:16 +00:00
Bryan Tong Minh
2e8ec6daf0 Added siprop=namespacealiases to meta=siteinfo 2008-02-03 19:29:59 +00:00
Roan Kattouw
19358606a1 API: Changing all modules' getParamDescription(), getAllowedParams() and getDescription() methods to public. ApiParamInfo needs them, and some versions of PHP threw fatal errors because they were protected. Oddly, other versions didn't (maybe because the caller and the callee have a common ancestor?) 2008-01-28 19:05:26 +00:00
Victor Vasiliev
0495f90ebb Revert r28215: incorrectly moved files 2007-12-06 18:33:18 +00:00
Victor Vasiliev
4e4cdf079e Create includes/api/query for Query API and includes/api/edit for Edit API 2007-12-06 18:22:15 +00:00
Daniel Cannon
45e5fca9c8 API: Include, if possible, svn rev in siteinfo query result. 2007-10-06 02:30:00 +00:00
Rob Church
d98d9cc137 (bug 11094) Update API help for 'siteinfo' - based on a patch by VasilievVV 2007-08-28 15:37:31 +00:00
Nick Jenkins
786e93fb37 Static code analysis housekeeping time... things that could be double-checked are marked with "[Note: some-comment]" :
if-if-else without curly braces [api/ApiQuerySiteinfo.php] --> adding
Unused global declaration:  $wgGroupPermissions --> removing 
Unused global declaration:  $wgEmailConfirmToEdit (line 301) --> removing 
Variable $id appears only once (line 1021)  --> removing 
Variable $m was used before it was defined (line 805) --> defining.
Variable $retval was used before it was defined (line 2346) --> renaming to $result
Variable $rcid appears only once (line 244 of RecentChange.php)  --> using this instead of $change [Note: was left over from r24607 refactoring, revert if wrong please]
Unused global declaration:  $wgCommandLineMode (line 11) --> removing
Variable $k appears only once (line 132 of ImagePage.php) --> removing.
Variable $info appears only once (line 311 of ImagePage.php)  --> removing.
Unused global declaration:  $wgTitle (line 569 of ImagePage.php) -> removing.
Variable $handlerParams was used before it was defined (line 616 of Linker.php) --> resolved by Raymond in r24966
Variable $match was used before it was defined (line 1031 of Linker.php) --> defining.
Unused global declaration:  $wgEnotifWatchlist (line 253 of UserMailer.php) --> removing 
Unused global declaration:  $wgShowUpdatedMarker (line 253 of UserMailer.php) --> removing 
Variable $img appears only once (line 446 of SpecialUpload.php) --> added definition, defined as null, flagged with @todo  [Note: should $img be defined in this context, or is it intended to be null? And should the return value after the hook be checked in some way?]
Unused global declaration:  $wgEnableAPI (line 739 of SpecialUpload.php) --> removing.
Unused global declaration:  $wgNamespaceProtection (line 1030 of OutputPage.php) --> removing.
Unused global declaration:  $wgContLang (line 18 of SpecialWatchlist.php) --> removing.
Unused global declaration:  $wgRawHtml (line 269 of SpecialMovepage.php) --> removing.
The value of variable $page was never used (line 331 of SpecialUndelete.php) --> removing line, as $page gets redefined a few lines down.
Variable $synIndex appears only once (line 521 of MagicWord.php) --> commenting out.
Variable $case appears only once (line 539 of MagicWord.php) --> removing from foreach index key usage.
Variable $wgUser appears only once (line 1039 of Title.php) --> adding line to declare as a global, would be null otherwise.
Variable $m was used before it was defined (line 285 of Title.php) --> defining.
Variable $id appears only once (line 1150 of Title.php) --> removing from foreach index key usage.
Variable $subpage appears only once (line 1297 of Title.php) --> commenting out.
Variable $restrictions appears only once (line 1399 of Title.php) --> commenting out.
Variable $mime appears only once (line 210 of filerepo/OldLocalFile.php) --> removing.
Variable $deprefixedName appears only once (line 213 of filerepo/LocalFile.php) --> removing.
Variable $m appears only once (line 541 of filerepo/LocalFile.php) --> removing.
Variable $where appears only once (line 1245 of filerepo/LocalFile.php) --> removing.
Variable $info appears only once (line 1427 of filerepo/LocalFile.php) --> removing.
Variable $rel appears only once (line 138 of filerepo/RepoGroup.php) --> commenting out.
Variable $zone appears only once (line 138 of filerepo/RepoGroup.php) --> commenting out.
Variable $nbytes appears only once (line 208 of media/Generic.php) --> added a return line that uses $nbytes. [Note: I'm assuming that this was the intent]
Variable $offset appears only once (line 201 of SpecialListusers.php) --> removing.
Variable $limit appears only once (line 201 of SpecialListusers.php) --> removing.
Variable $groupTarget appears only once (line 203 of SpecialListusers.php) --> removing.
Unused global declaration:  $wgLang (line 74 of SpecialWantedpages.php) --> removing.
Variable $block appears only once (line 244 of SpecialProtectedpages.php) --> removing.
Variable $offset appears only once (line 281 of SpecialProtectedpages.php) --> removing.
Variable $limit appears only once (line 281 of SpecialProtectedpages.php) --> removing.
Unused global declaration:  $wgLang (line 30 of FileDeleteForm.php) --> removing.
Unused global declaration:  $wgServer (line 30 of FileDeleteForm.php) --> removing.
2007-08-21 03:57:54 +00:00
Yuri Astrakhan
fb3248e6b2 API: Added site statistics (siprop=statistics for meta=siteinfo) 2007-08-09 12:39:41 +00:00
Yuri Astrakhan
c4aad95b10 API: Added meta=userinfo module to get data about the currently logged-in user. 2007-07-31 17:53:37 +00:00
Yuri Astrakhan
5ffae93ef8 Added $wgShowHostnames to shows/hide host names in API results and HTML comments 2007-07-10 13:46:22 +00:00
Yuri Astrakhan
783950af0f API: slightly better naming for db repl lag 2007-07-07 04:58:52 +00:00
Yuri Astrakhan
83743e7bb3 API: (bug 10211) Added db server replication lag information in meta=siteinfo 2007-07-07 04:53:07 +00:00
Yuri Astrakhan
56963caadc API: Fixed site language code to use global instead of user's 2007-06-29 21:44:15 +00:00
Roan Kattouw
b15a7e2b3c Adding language in meta=siteinfo (API) (bug 10411) 2007-06-29 19:00:44 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Yuri Astrakhan
66d6b9aa58 API bug 10096 InterWiki table retrieval through meta=siteinfo
With help from Roan Kattouw
2007-06-14 05:18:58 +00:00
Yuri Astrakhan
cb38c11c84 API: documentation and cleanup. 2007-05-20 23:31:44 +00:00
Nick Jenkins
f9619da3f0 Yet more doc tweaks:
* Add @addtogroup tags to various classes, to try and group conceptually-related classes together.
* Add brief descriptions to various Special pages, thanks to Phil Boswell.
* Moving some docs to be right above the classes they represent, so that they are picked up.
2007-04-20 08:55:14 +00:00
Yuri Astrakhan
64a0bccb6d API * Optimized backlinking query (still needs an index change)
* Added right property to siteinfo
2006-10-27 03:50:34 +00:00
Yuri Astrakhan
550c083a18 API
* Removed slow result SanitizeData
* Fixed watchlist feed bug (reported by nickj)
* Fixed HTML formatting bug (reported & fixed by nickj)
* clarified HTML intro message
2006-10-18 05:27:43 +00:00
Yuri Astrakhan
31775400d8 *API: rewired generator (more work needed)
*API: structure cleanup: module names & parameters
2006-10-03 05:41:55 +00:00
Yuri Astrakhan
04399b2063 * API: added version information to each module (available via api.php?version command) 2006-10-01 21:20:55 +00:00
Yuri Astrakhan
e859600cea * API: pageSet now supports pageids, revised revisions listings, lots of examples. 2006-10-01 20:17:16 +00:00
Yuri Astrakhan
85de1cb74b * Code cleanup per TimStarling's suggestions 2006-10-01 04:38:31 +00:00
Yuri Astrakhan
f97b323e00 * API: result data generation cleanup, minor cleaning 2006-10-01 02:02:13 +00:00
Yuri Astrakhan
5c1ca0fc83 * API: Refactored per brion's suggestions
* API: began query revisions implementation (incomplete)
2006-09-27 05:13:48 +00:00
Yuri Astrakhan
8a7397e8ad * API: Overall query-related cleanup. 2006-09-26 06:37:26 +00:00
Yuri Astrakhan
972b72f879 * API: All pages list
* API: Reworked parameter processing
2006-09-26 05:43:02 +00:00
Yuri Astrakhan
e57335a633 * API: Query Meta SiteInfo module
* API: Improved query help screen
2006-09-26 01:44:13 +00:00