Commit graph

6 commits

Author SHA1 Message Date
Chad Horohoe
b74d5311f6 Change CdbException to subclass Exception
Nothing really makes use of this yet outside of core, so should be
ok and minimal impact.

Change-Id: Iab9f7fe0df41d8020d6ccd4e860af6d045948aee
2013-11-26 15:28:54 -08:00
Chad Horohoe
db7d95de27 Don't use wfIsWindows() in CDB writers
Uses the same logic, but without the dependency on MediaWiki.
Planning to use this in the het-deploy code.

Change-Id: I5d6baf6fe63d135c679e4795287daa0a8722dde6
2013-11-08 17:20:41 -08:00
Chad Horohoe
03c5605526 Clean up CDB classes
- Inheritance was a little funny, reduced some duplication
- Throw CdbException instead of plain MWException
- Abstracted wfDebug() to encourage reuse
- Declare visibility on a couple of public methods
- Move DBA implementations to their own file

Change-Id: I2edfeabaf62e39927abe869764ff2bd676821cd0
2013-11-08 17:19:50 -08:00
Siebrand Mazeland
45de3c8057 Remove underscore from CdbReader_[DBA|PHP] classes and related file
Also gets rid of some CodeSniffer errors. There are more cases in core
(cache, pool counter, installer, database, load balancer, diff, CSS
Janus, less (argh!), media, parser, revdel, ...), that have class names
with underscores I'd be trying to get rid of later.

Change-Id: I33709c05e597978a5574a445fa43c583cbd7e12b
2013-11-07 13:16:56 -08:00
Siebrand Mazeland
655a03d26f Update formatting
Change-Id: I5ec6257295261caab6cb2d9eb9d32ce76cae08a2
2013-11-04 10:29:25 +01:00
Tim Starling
e4bcbe722e Introduce includes/utils directory
These are classes that provide facilities for use by any caller, are
independent of user interface, and have a limited set of dependencies on
the rest of MediaWiki. See the README file for a more precise
definition.

These classes cannot go in includes/libs because of a dependency on the
MediaWiki framework, such as wfDebug() or MWException, but they are
otherwise similar. I thought it would be useful to put them in their own
directory, to make them more discoverable, and as part of a general
program of reducing clutter in the base includes/ directory.

I've probably missed a few classes which could be included here, but the
following classes were considered and were rejected for now:

* Fallback: single caller only
* GitInfo: getViewers() has inappropriate dependencies
* HttpFunctions: depends on configuration, $wgTitle
* PoolCounter: depends on configuration
* CacheHelper: depends on IContextSource, wfMemc()

Also moved a couple of classes into libs/ instead, where that seemed to
be more appropriate.

Change-Id: I274cff805b7d694b728a89b764a049cd62d320fe
2013-11-04 11:00:42 +11:00
Renamed from includes/Cdb.php (Browse further)