Commit graph

195 commits

Author SHA1 Message Date
Tim Starling
d411e0b1e0 Renamed CacheManager to HTMLFileCache, to avoid confusion with the other sort of cache. 2006-10-11 08:25:26 +00:00
Brion Vibber
4b589d2b41 fix typo in debug line 2006-10-10 22:21:30 +00:00
Tim Starling
3005679b0e * Removed lots of explicit require_once statements. The autoloader should theoretically be faster, because it always uses an absolute path, eliminating the need for a search, and it is never called unnecessarily. Absolute paths are also more robust in the face of odd configurations or usage patterns. Moved a few constants around to support this, they always have to be available before the method call.
* Deleted DatabaseMysql.php, no longer necessary, database classes are autoloaded. 
* Moved wfGetMimeMagic() to MimeMagic::singleton()
* Fixed a couple of __CLASS__.'::'.__FUNCTION__ things.
2006-10-03 13:00:52 +00:00
Brion Vibber
626eb19cbb Include retry number on connect loop errors 2006-10-02 17:30:44 +00:00
Brion Vibber
da8a4436f3 whitespace 2006-10-02 17:07:15 +00:00
Brion Vibber
bf63ffaa2c Committed a bunch of live hacks from Wikimedia servers
A few left, but these don't look too evil
2006-10-02 17:04:13 +00:00
Brion Vibber
9f27c5e2a3 * (bug 7324) Fix error message for failure of Database::sourceFile() 2006-09-14 17:08:46 +00:00
Brion Vibber
4ea6737fba * (bug 7312) Don't emit SET NAMES utf8 if connection failed 2006-09-13 15:27:04 +00:00
Greg Sabino Mullane
cae1350eb2 Add concept of "strict IPs" so we don't attempt to add "" as an IP address. 2006-08-16 00:58:42 +00:00
Tim Starling
bcb9f9e1c0 Log exceptions 2006-08-02 17:40:09 +00:00
Tim Starling
b3607055ea Profiling 2006-07-21 15:26:07 +00:00
Greg Sabino Mullane
f3b22cd894 Add mCascadingDeletes and mCleanupTriggers properties to Database*, use accessor methods to determine what to delete in Article.php 2006-07-17 00:54:40 +00:00
Domas Mituzas
5793fd7ddb use object error retrieval functions, that work properly within connection context 2006-07-15 19:22:37 +00:00
Greg Sabino Mullane
a24ce453a0 Add decodeBlob() function to complement encodeBlob() 2006-07-05 03:56:48 +00:00
Tim Starling
2ff288720c Various performance and initialisation issues:
* Made autoloader work for unserialize()
* Made XmlFunctions.php and HttpFunctions.php autoloadable modules, via Http:: and Xml::
* Made Image class autoloadable, global functions moved to ImageFunctions.php where they can be loaded on every invocation.
* Removed some unnecessary require_once() calls
* Deferred $wgValidSkinNames initialisation
* Fixed a couple of silly construct/initialise splits. My idea from C++ experience, bad practice in PHP.
* Deferred skin initialisation in ParserOptions
* Removed $wgMwRedir during an attempt to make MagicWord autoloadable. Didn't complete that, but removing the global is still the right direction.
2006-07-02 15:57:59 +00:00
Brion Vibber
f85cf00884 didn't get around to this before since it was PHP 4.3+ only...
* Use mysql_real_escape_string instead of addslashes for string escaping in
  the MySQL Database class. This may fix some rare breakage with binary fields.
  Note that MediaWiki does not support the multibyte character sets where a
  "dumb" byte replacement can be actively dangerous; UTF-8 is always safe
  in this regard due to the bit patterns which make head and tail bytes
  distinct.
2006-06-30 17:21:29 +00:00
Brion Vibber
d3d587dac6 Remove useless reference markers which aren't used anyway 2006-06-27 22:55:15 +00:00
Brion Vibber
908c51e127 Revert to r15092; massive breakage, unable to connect to MySQL at all 2006-06-27 16:11:47 +00:00
Greg Sabino Mullane
ef89ec541c Add concept of a distinct port separate from a server.
Add some functions to DatabasePostgres.php.
2006-06-27 15:37:35 +00:00
Domas Mituzas
a07dac02fd oops, better skip i/o thread states :) 2006-06-21 16:47:15 +00:00
Domas Mituzas
6e1a263279 fix lag detection - do not assume that second 'system user' line gives that value, better use first system user thread with db selected. 2006-06-21 16:34:56 +00:00
Tim Starling
af4cfa71c0 Changed transaction semantics: made begin() and commit() work all the time and not be broken and counterintuitive. Also fixed a minor bug in ResultWrapper. 2006-06-18 12:30:57 +00:00
Tim Starling
2d03f52598 removed obsolete function 2006-06-07 04:17:51 +00:00
Tim Starling
410986abf8 Some initial work on exceptions. More to follow. 2006-06-06 23:07:26 +00:00
Brion Vibber
0a26267688 Revert to r14512; domas introduced massive breakage with incomplete experimental changes. They will be recommitted when they work. :) 2006-06-01 08:19:02 +00:00
Domas Mituzas
bda0b8e104 Use AutoLoader to load classes:
* remove require_once() throughout whole code, yet left in few places
* move global functions in HttpUtils, ProxyTools, Credits to class methods
* php5 only: __autoload() now used, combined with class->file map and require()
* move initialization of $wgValidSkinNames to Skin::getSkinNames()
* few more changes that will surely break stuff.
2006-06-01 07:22:49 +00:00
Brion Vibber
a9464cea87 Versioncruft: remove a check for PHP 4.1 workaround, no longer needed 2006-05-23 20:49:30 +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
Antoine Musso
473cd5cbcc unused variables as per #3692 2006-05-01 10:53:59 +00:00
Yuri Astrakhan
1fa6bb29b5 added isnumeric check to limitResult() to prevent a possible sql injection. 2006-05-01 05:20:52 +00:00
Yuri Astrakhan
66081c6692 Database.php:
* Proper handling of LIST_OR in makeList()
LinkBatch.php:
* Added isEmpty() and getSize() functions.
Query.php:
* Implemented double-redirects query (disabled until caching is done)
* Implemented backlinks query.
* Rewrote page info generator to allow both titles and pageIds to be specified.
* Security check for read-access.
* Output filtering prevents exposure of the internal data.
* Added transactional consistency (not sure its needed here)
2006-04-22 02:12:59 +00:00
Antoine Musso
69689725c1 Switching from phpdoc to doxygen (use less than 32MB of memory).
Run maintenance/mwdocgen.php to generate doc in ./docs/html/ .
2006-04-19 15:46:24 +00:00
Tim Starling
56072f6e05 How many bits in a byte again? 2006-04-16 06:41:29 +00:00
Tim Starling
766cc8e633 attempting to fix lag detection again 2006-04-16 06:36:57 +00:00
Brion Vibber
3c9cf267a1 * (bug 385) Installer support for PostgreSQL, fixes for PG compatibility
Applied from: http://bugzilla.wikimedia.org/attachment.cgi?id=1517&action=view
I haven't tested it with PG personally yet, but it doesn't appear to interfere with other functionality.
2006-04-12 08:15:28 +00:00
Tim Starling
9622c428fa Support more select options 2006-04-11 14:49:31 +00:00
Brion Vibber
e9be909141 * (bug 5195) rebuildrecentchanges.php works again; Database::insertSelect now has a parameter for select options. 2006-04-04 06:06:36 +00:00
Brion Vibber
afc2a70502 * Added $wgColorErrors: if set, database error messages will be highlighted when running command-line scripts in a Unix terminal. 2006-04-04 05:53:21 +00:00
Brion Vibber
f5dfb066ba Live fix: code typo in lag checks 2006-04-02 03:57:33 +00:00
Tim Starling
bad435556d Optionally use a different profile name for master queries 2006-03-28 05:11:40 +00:00
Tim Starling
2fc68d9bd7 documentation 2006-03-28 04:52:05 +00:00
Lupin
c7408b9223 trailing whitespace removal 2006-03-11 17:13:49 +00:00
Lupin
11337038b3 removing unused globals and some whitespace cleaning 2006-03-07 01:10:39 +00:00
Tim Starling
35438cbe91 options to insertSelect(), indenting 2006-02-12 02:20:32 +00:00
Tim Starling
31487e5784 removed misfeature (ignore writes while in read only mode): more trouble than it's worth 2006-01-17 16:16:43 +00:00
Tim Starling
0996a43a27 oops, bug in untested error branch 2006-01-17 12:14:27 +00:00
Tim Starling
cf4f3da185 Moved the bulk of dbsource() to Database.php. Added support for updating wikis with $wgSharedDB set (installing is still not supported) 2006-01-17 11:48:18 +00:00
Tim Starling
c9253061f2 Fixed incorrect query() parameters, left over from the brief period of time when wfQuery took a DB index as a parameter 2006-01-17 08:40:16 +00:00
Brion Vibber
266d41f165 * Added wfDie() wrapper, and some manual die(-1), to force the return code
to the shell to return nonzero when we crap out with an error.
2006-01-14 02:49:43 +00:00