Commit graph

37 commits

Author SHA1 Message Date
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
Greg Sabino Mullane
8eb82ee407 Add implicitOrderby() to make sure that SpecialAllpages uses an ORDER BY when needed.
Made this an option rather than forcing the ORDER BY as testing show MySQL is 
faster without it for large tables.
2007-09-02 18:03:10 +00:00
Yuri Astrakhan
5a0bbe0a1a bug 10496 DISTINCT option logic incorrect in Database::makeSelectOptions 2007-07-07 21:51:06 +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
Rob Church
73fda35eef (bug 10104) Provide stub "getLag()" function for DatabaseOracle and DatabasePostgres 2007-06-04 21:43:02 +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
Aryeh Gregor
09f7aa034e "@todo no-op" sounds a bit peculiar. ;) 2007-04-18 16:37:39 +00:00
Nick Jenkins
9648f3b4d0 Some small doc tweaks to reduce Doxygen warnings, namely:
* @link. You might think @link would surely mean "here comes a web URL" ... but @link is a valid command 
  in Doxygen, which means an entirely different kind of link (an internal link to somewhere, so that you can separate 
  documentation and implementation). The result is a mess, and the best solution I can see is to use "@see" instead of "@link".
* Warning: argument `nourl' of command @param is not found in the argument list of Linker::makeMediaLinkObj($title,$text='')
* Moving few class descriptions to right above classes, and/or formatting into Javadoc style.
* "@addtogroup Special Pages" --> "@addtogroup SpecialPage" so that all special pages have the same @addtogroup tag.
* @fixme --> @todo (must have missed these before)
* "@param $specialPage @see" remove the "@" in the "@see" to stop warning.
* @throws wants type, then a brief description, to stop warning.

This last one is for PHPdocumentor only, but it fixes something for PHPDocumentor, and should be neutral for Doxygen:
* WARNING in includes/api/ApiFormatYaml_spyc.php on line 860: docblock template never terminated with /**#@-*/
2007-04-18 09:50:10 +00:00
Nick Jenkins
113bb1c772 Documentation tweaks to help documentation systems (Doxygen + PHPDocumentor)
pick up the appropriate tags, and documentation blobs for classes. This is 
the same as per r20769, but with the grouping changes (e.g. removing "@{{") omitted.
Please be advised that more related documentation tweaks may follow later - e.g. 
Doxygen generates a log file of warnings that is 574 Kb in size, when run over 
the just the trunk/phase3 code ... eek! Thankfully, much of that is just 
whining about functions without documentation   ;-)
2007-04-04 05:22:37 +00:00
River Tarnell
27708781ef if non-UTF8 string given to addQuotes(), convert to UTF-8
throw error if non-utf8 sql query given to doQuery()
2007-03-30 19:35:24 +00:00
River Tarnell
aaaf91b899 el_to should be varchar in oracle
check return from oci_new_descriptor
2007-03-28 18:26:28 +00:00
Brion Vibber
3a6ac5a3c3 Revert r20769: we don't use PHPDocumentor anymore, we use doxygen.
If making mass changes to tweak to its preferences, probably better to do it for the tool we actually generate docs with. :)
2007-03-28 14:16:43 +00:00
Nick Jenkins
5fef2333d4 PHPDocumentor [http://en.wikipedia.org/wiki/PhpDocumentor] documentation tweaking stuff.
Minor doc tweaks to prevent some PHPDocumentor warnings or errors when run on the includes/ directory. PHPDocumentor uses a syntax very similar to javadoc - mostly we already use this, but there were a few scattered places that were adjusted to make them consistent with the rest of the code. In practical terms, these changes were made:
* @url becomes @link
* @fixme becomes @todo
* HTML tags in descriptions must be closed / balanced.
* @bug was removed (where the bug was long fixed), or changed into a @todo (in the few situations where the bug was still pending)
* @obsolete becomes @deprecated
* Things like "/**@{{" and "/**@}}*/" which cause "unknown tag" warnings were removed
* @access must be a valid access level.
* @desc tag not needed, removed.
* Doesn't seem to like @licence, will accept @license however.
* Use full comment block notation in a few places (i.e. open block with "/**", start each line with " *", and end block with " */")

Then additional to this, to get some class docs associated with their respective classes:
* Moved some docs to right above those classes (deleting blank lines, or moving descriptions from the file headers)
* Marked some classes without docs as "@todo document"
* (done up to "class MIMEsearchPage" on the "classtrees_MediaWiki.html" page for the includes/ directory)
2007-03-28 08:53:02 +00:00
Greg Sabino Mullane
d6456e1e41 Remove variables when we can simply override accessors instead. 2007-03-21 18:19:35 +00:00
River Tarnell
8afeabeda7 use INSERT...RETURNING INTO to insert blobs 2007-03-11 21:44:38 +00:00
River Tarnell
67a96dcaf0 set $NLS_LANG before connecting so Oracle knows we're using UTF-8 2007-03-11 19:19:49 +00:00
River Tarnell
67cc9eaef3 limitResult() changes need fiddling to put options in right order 2007-03-11 15:49:27 +00:00
River Tarnell
d56f14d898 call ctx_ddl.sync_index to update search index on page save 2007-03-11 05:09:35 +00:00
River Tarnell
d0cda64723 new files for oracle 2007-03-11 04:00:43 +00:00
Brion Vibber
ccf91e827a * Unmaintained Oracle support files have been removed. 2007-01-13 05:02:41 +00:00
Nick Jenkins
14c53b728f Code housekeeping stuff (and barring any stuff-ups on my behalf, there should be no changes in behaviour whatsoever after this) -
* removing some unused global declarations.
* removing or commenting out or adding comments for unused local vars.
* Adding one or two local var declarations.
* Declaring $matches array passed to preg_match() / preg_match_all() as array() before using [not required, just have a slight preference for the explicitness].
* remove one or two pass-by-reference function declarations where the value is not modified.
* Adding some braces to if-else blocks.
* In Parser.php, stripstrate is now an object rather than an array as per r17820, so we no longer need ask for a reference to it (as in "$x =& $this->mStripState;"), and in fact it's probably just simpler to get rid of $x altogether.
* Moving some preg regexes from "" quoting to '' quoting to stop static analyzer whinging about bad escape sequences.

... up to "LinksUpdate.php" in the includes/ directory.
2006-11-23 08:25:56 +00:00
Yuri Astrakhan
ccd72b22e2 forgot for prev checkin re bug 6440. Database should return all rows about a given index, not just the first. 2006-11-11 21:42:46 +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
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
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
4a131ee83f fix call-time pass-by-reference thingy which could complain depending on php config 2006-04-11 07:31:14 +00:00
Lupin
11337038b3 removing unused globals and some whitespace cleaning 2006-03-07 01:10:39 +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
Brion Vibber
ed5ed599a0 * Remove obsolete killthread.php 2006-01-14 02:37:55 +00:00
Domas Mituzas
44ab92339b miliseconds...
* Do not check master lag
* check just thread counts on SHOW STATUS, less bits on wire, less rows to handle for php
2006-01-10 10:59:09 +00:00
Brion Vibber
d815ca352f * (bug 4201) Fix user-talk mode for Enotif, and general code cleanup
- treat NULL properly in watchlist lookup for notification sending
- consolidate a lot of ugly code that fiddles in those tables
- use user_newtalk consistently in enotif mode; watchlist for email notifications, user_newtalk for on-screen message and status check
- clean up handling of other peoples' user_talk pages when in the talk-only limited enotif: only your own will get sent, not other people watching your page
- and others watching your page _will_ work in watchable enotif mode
- add a watch on page + talk page consistently for the auto-add of the user talk page, not just half the page
- don't unwatch the user talk page on view! that's just wacky
- removed UserTalkUpdate, now redundant
- have User::setNewTalk() apply immediately
- clear newtalk from User::clearNotification() and User::clearAllNotifications()
2005-12-07 11:52:34 +00:00
Antoine Musso
2ca68a256d Clean up unused globals! 2005-12-04 18:27:59 +00:00
River Tarnell
b817c0c15f merge ORACLE_WORK. sorry, this may break some parts of MySQL, i did not test extensively. 2005-08-02 13:35:19 +00:00