Fixing up a variety of GlobalFunctions and also improving queries in Titke.php.
authorDaniel Friesen <dantman@users.mediawiki.org>
Fri, 9 May 2008 23:36:21 +0000 (23:36 +0000)
committerDaniel Friesen <dantman@users.mediawiki.org>
Fri, 9 May 2008 23:36:21 +0000 (23:36 +0000)
commit4ee7da5b097c2defe2cc2b22fc5eca38a0b80836
tree8b213d035850f50f8278dce3cb7491357b29380a
parent7f77eadd5862575dd0960a63683b4e99c1144bc6
Fixing up a variety of GlobalFunctions and also improving queries in Titke.php.
* getFullURL and getLocalUrl now accept arrays and objects as valid input.
* Use wfAppendQuery in getLocalUrl to match up with getFullURL.
* wfArrayToCgi is now a alias to wfBuildQuery (Parameters are in the OPPOSITE order so wfBuildQuery takes defaults as second param and wfArrayToCgi takes them as first parameter like it always did)
* New function wfBuildQuery.
** The code moved here from what once was wfArrayToCgi has been changed from a set of plain loops to a wrapper around http_build_query so that complex data is handled correctly.
** We now support strings and objects as input, and we even parse strings when necessary to merge queries.
* New function wfForeignWikiID to pair with wfWikiID like wfForeignMemcKey. The foreign id can take 2 parameters, if omitted it falls back to the shared db, then to the local db if not set.
* wfMemcKey and wfForeignMemcKey now call the respective wf(Foreign)WikiID function, this simplifies the functions, and avoids code duplication making sure things always match even if for some strange reason it's changed.

I'll likely be using the forign functions later to improve the use of a shared interwiki map to avoid redundant caches.

I could always make the local MemcKey and WikiID functions depend on the foreign ones in a sane way
includes/GlobalFunctions.php
includes/Title.php