Commit graph

57 commits

Author SHA1 Message Date
Reedy
7e386ab639 Minor stylize, add some braces
Couple of bits of member variable docs

Change-Id: Iccf861b1b93543f21f43c50864107ec6bb233bd1
2012-07-05 23:53:57 +01:00
Antoine Musso
f7ea837eb5 (bug 1) doc for SiteConfiguration
SiteConfiguration was lacking some basic example and a very basic
introduction.

Change-Id: I306f7427ca17b0e271784f4a3e959ca8848dabea
2012-05-31 10:16:16 +02:00
Alexandre Emsenhuber
bc9d9f1f9c Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent and removed a duplicate comment from SpecialPageFactory.php in SpecialPage.php.

Change-Id: I99dd2de7fe461f2fad4e0bd315ebc2899958a90f
2012-05-10 17:51:44 +02:00
Sam Reed
0a626db6e1 Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 19:29:36 +00:00
Chad Horohoe
daacd1b3d3 Remove no-op initialise from configuration. Nothing outside of Ext:Configure needs/uses it 2011-08-04 20:55:20 +00:00
Aaron Schulz
19d66a6668 Fixed typo. w/s cleanup. 2011-07-28 07:27:40 +00:00
Chad Horohoe
ab99b52bd1 Followup r91224: stupid syntax error 2011-06-30 21:32:55 +00:00
Chad Horohoe
226b5730a3 Remove superfluous inclusion of SiteConfiguration in doMaintenance. It's in the AutoLoader and has already been initialized by DefaultSettings by this point.
As a result: rm DIY inclusion protection, since this was the only reason it was still needed.
2011-06-30 21:25:52 +00:00
Sam Reed
36cb6833e4 More documentation updates and additions
Getting bored of this tonight now I think...
2011-05-21 20:06:57 +00:00
Sam Reed
e76775e06f More unused variables 2010-11-30 18:44:50 +00:00
Alexandre Emsenhuber
289ee10df6 Fixed some doxygen warnings 2010-05-10 20:43:54 +00:00
Tim Starling
e5fbb46f51 Pass the SiteConfiguration object as a parameter to fullLoadCallback. 2009-06-12 04:11:15 +00:00
Andrew Garrett
af184614e5 Phase 1 in fixing up SiteConfiguration: Replace the hack of including InitialiseSettings.php with a generic system for loading full configuration data, involving a callback. 2009-06-02 09:49:31 +00:00
Alexandre Emsenhuber
2869888b02 Redo r39954, without regression this time. Sorry :( 2008-08-26 15:10:12 +00:00
Brion Vibber
4bbe226739 Revert r39954, 39958 "Tweaks for SiteConfiguration:"
This seems to have broken upload dirs on live site (eg http://upload.wikimedia.org/wiki/commons/6/66/Diemetrie.png in place of http://upload.wikimedia.org/wikipedia/commons/6/66/Diemetrie.png)
Please make no further changes without some regression testing...
2008-08-25 22:06:03 +00:00
Alexandre Emsenhuber
c32fec76e0 rm useless comment :) 2008-08-25 17:12:20 +00:00
Alexandre Emsenhuber
68ed90f748 Tweaks for SiteConfiguration:
* Introduced SiteConfiguration::$siteParamsCallback, a callback function that returns an array of params to define custom parameters to replace and wiki tags so that they can be used at run time (e.g. for CentralAuth or SiteMatrix), can also override SiteConfiguration::siteFromDB(). See the documentation of that variable for further information. Backward compatibility is maintened for paramters passed to SiteConfiguration::get() and similar functions but the vaules returned by the callback function will override them.
* Added SiteConfiguration::arrayMerge() for merging arrays, written by Werdna. Warning: as array_merge(), it may change numeric keys, so don't use it for settings having namespaces index in keys.
* Removed SiteFromDB hook, deprecated by the callback function
* document a bit
2008-08-25 16:46:34 +00:00
Andrew Garrett
7ce4ef5002 Only run hooks if Hooks.php has been loaded (i.e. we CAN run them) 2008-08-22 13:02:49 +00:00
Andrew Garrett
0742c5f99c *ahem* 2008-08-22 12:09:37 +00:00
Andrew Garrett
8e22becd1b Quick hook to allow reusers of SiteConfiguration to customise siteFromDB, which is pretty wikimedia-specific 2008-08-22 12:08:21 +00:00
Andrew Garrett
5a2a85a1b4 *ahem* self-revert. Something weird happened with getAll() 2008-08-20 14:12:52 +00:00
Andrew Garrett
4b5d8c21a8 Use a nice fancy deep-merge function for merging arrays in SiteConfiguration (newly written), and move the merging of config options and globals deeper into get(), so we don't need to duplicate the same functionality in the entry points. 2008-08-20 14:08:50 +00:00
Andrew Garrett
8736d07448 Add "+setting" type code (adding to the existing global) into getAll, since that is what we use on Wikimedia 2008-08-20 12:56:59 +00:00
Brion Vibber
969f3bf3ec Revert r39623 "Use array_merge_recursive instead of array_merge for merging settings."
I do not think array_merge_recursive does what you think it does. It looks like it would spectacularly corrupt things.
2008-08-19 19:05:23 +00:00
Andrew Garrett
612fdcfc53 Use array_merge_recursive instead of array_merge for merging settings. 2008-08-19 01:11:02 +00:00
Rotem Liss
ef48f1f435 Avoid notices: Before checking if retval is an array, check if it is defined. 2008-08-18 14:51:10 +00:00
Andrew Garrett
d475d6c2cb Allow use of +setting to add to that setting as it is (for arrays), rather than to replace it. Together with the previous commit to this file, we don't need to use groupOverrides/groupOverrides2 anymore 2008-08-18 12:50:30 +00:00
Andrew Garrett
0df393bb8e Allowed array-merging for site config. You can now set a setting for '+whatever', and it's the same as setting it for 'whatever', merged with the contents of the next level up. Should mean we're able to deprecate the ugly groupOverrides/groupOverrides2 syntax in InitialiseSettings.php. 2008-08-18 09:26:48 +00:00
Fran Rogers
851eaecd50 Wrapped certain tricky constructs in @cond/@endcond to prevent Doxygen
from choking on them and segfaulting.
2008-08-06 03:55:49 +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
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
Tim Starling
e91d944a66 typo, thanks ialex 2008-02-06 16:53:21 +00:00
Tim Starling
3b5becc91d Allow a list of tags for settings fallback, in addition to wiki name, suffix and default. Committing for test on server. 2008-02-06 15:56:25 +00:00
Brion Vibber
2bd5acda1a Commit ver of doReplace that *doesn't* cause infinite recursion and stack death 2008-01-19 06:26:39 +00:00
Brion Vibber
43d58f74c8 SiteConfiguration was smashing all variables into strings (or arrays of strings) with the str_replace.
This broke on things that wanted an actual 'false' or 'null' value exactly (or ints, though haven't run across such).
Changed to a type-safe replace that only does replaces on strings and strings in subarrays
2008-01-19 06:06:49 +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
Nick Jenkins
bd23ec29c6 Doc tweaks:
* Seems like an opportune time to introduce "@addtogroup Media" documentation tags.
* Merge "@addtogroup Metadata" (used by Exif.php) into "@addtogroup Media".
* Few more moving comment blocks to above classes.
2007-04-24 06:53:31 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Tim Starling
c1a789c620 rv useless feature 2006-06-04 05:37:31 +00:00
Tim Starling
f65abf71c9 support for array overrides and appends 2006-06-04 05:18:52 +00:00
Antoine Musso
7ebdb6de89 Revert to r14165 . Did too many changes, didnt even run parserTests (i am bad) 2006-05-11 22:40:38 +00:00
Antoine Musso
bc14eb8045 Replacing var keyword with private / public as we now require PHP5. 2006-05-11 19:10:41 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Ævar Arnfjörð Bjarmason
7bbe971aec * s~ +$~~ 2006-01-07 13:09:30 +00:00
Tim Starling
09eaa53177 Simpler structure for wgLocalDatabases, for faster setup. SiteConfiguration::getAll() to get all settings as an array 2006-01-04 22:48:35 +00:00
Tim Starling
054a83e77e don't produce warnings in get() if the item is missing 2005-08-14 07:22:36 +00:00
Brion Vibber
4ab22c2ed9 * (bug 2769) Use '-' form for language consistently on command-line
* Fixlets to rebuildImages.php: clear memcached, indicate missing
2005-07-11 00:47:00 +00:00
Antoine Musso
157861bc31 fix some issues with phpdoc 2005-07-05 21:22:25 +00:00
Tim Starling
bf452fdc63 Made a SiteConfiguration object generally available. Added functions for performing an HTTP client request using curl. This will be used in the SpamBlacklist extension, and hopefully Lucene as well. 2005-06-26 06:34:13 +00:00
Tim Starling
0c0c2dcde7 protection from multiple includes (from REL1_3A) 2004-09-26 08:06:04 +00:00