Commit graph

58 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
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
f88c771756 The war on redundant ampersand usage!
* Convert "$dbw =& wfGetDB( DB_MASTER );" --> "$dbw = wfGetDB( DB_MASTER );"
* convert "$skin =& $wgUser->getSkin();" --> "$skin = $wgUser->getSkin();"

For the time being have not changed the function definitions of wfGetDB() or User::getSkin() [i.e. they are still both return-by-ref], so as to ensure the interface does not change for extensions [some of which may still be trying to run on PHP4 environments]. However presumably at some point this can be changed too.

Also includes tiny tweak to newlines in parserTests - will show 1 rather than 2 newlines between the "Reading tests from" strings when in quiet mode.
2007-01-22 23:50:42 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +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
Tim Starling
2f12a58d93 * Introduced StringUtils.php, populated it with some generic string functions, both new and collected from various other files.
* Removed some backtracking regexes with an O(N^2) worst case, replaced with StringUtils::delimiterReplace(). There is a beneficial functional difference: /*/ is no longer considered to be a complete CSS comment.
* Changed the parser strip state from an array to an object. This should hopefully avoid the PHP bugs with array references. StripState uses the new ReplacementArray to do the replacements, thereby supporting FSS. 
* Removed DatabaseFunctions.php from the default startup sequence. Moved wfGetDB() to GlobalFunctions.php.
* Introduced the SiteStats class, with a collection of cached site stats accessor functions.
* Removed all global functions from Parser.php, they don't belong there.
* Made LanguageConverter use the new ReplacementArray class instead of managing its own FSS objects.
2006-11-21 09:53:45 +00:00
Tim Starling
02547dac72 Removed most exit() calls from the MediaWiki core, by replacing them with either a throw or by classic error checking. OutputPage::fatalError() and similar functions are deprecated, use either OutputPage::showFatalError() to return control or throw new FatalError() to relinquish it. Backwards compatibility of all interfaces has been maintained, thus extensions should continue to work and can be ported at a later date. 2006-06-07 06:40:24 +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
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
Brion Vibber
b0c41ad13b * (bug 2885) Fix fatal errors and notices in PHP 5.1.0beta3
* (bug 2931) Fix additional notices on reference use in PHP 4.4.0
2005-07-22 11:29:15 +00:00
Tim Starling
073ac49c1b Implemented query group feature, needed for slow queries esp. in 1.4. Hopefully fixed lagged slave mode. Added a simple method to simulate lagged slaves. 2005-04-23 11:49:33 +00:00
Domas Mituzas
032738d2e2 wfSetBufferResults no longer referenced, kill. 2005-02-10 14:13:55 +00:00
Evan Prodromou
4b42f18b66 Removed CVS keywords from files, to make merging between branches
easier. Interpolated keywords cause lots of conflicts and headaches at
merge time for older (<1.12.x) CVS versions.
2004-11-29 18:25:30 +00:00
Tim Starling
412eda0517 Correcting bugs due to double-prefixing table names. Removing obsolete Database member functions. Adding comments to Database.php 2004-10-24 07:10:33 +00:00
Antoine Musso
ba2afcd9fa Split files and classes in different packages for phpdocumentor. I probably changed some double quotes to single and used function foo () { shema 2004-09-03 23:00:01 +00:00
Antoine Musso
caff4fe89c comments and comments placeholders 2004-09-03 15:48:02 +00:00
Antoine Musso
90155b8a97 Changing comments layout preparing for generated documentation with Phpdocumentor 2004-09-02 23:28:24 +00:00
Antoine Musso
3d60242fb5 massive double to single quotes conversion. I have not noticed any bug after a lot of testing 2004-08-22 17:24:50 +00:00
Brion Vibber
e7fea8cec6 Database::setIgnoreErrors() doesn't seem to exist anymore. Switched to
Database::ignoreErrors()
2004-08-05 07:48:20 +00:00
Tim Starling
ac549401d4 * Support for table name prefixes throughout the code. No support yet for converting static SQL, which also means no installation. But it has been tested by creating the tables in the ordinary way and then renaming them
* DB_WRITE now called DB_MASTER, DB_READ now called DB_SLAVE
* Converted to use SQL wrapper functions instead of direct SQL in various places
* Experimental method for preserving the chronological order of events when slave servers are used. Untested.
* Fixes to the new post-parse existence test feature
* Some.. other stuff
2004-07-18 08:48:43 +00:00
Tim Starling
b96b707efa OOP calling convention for database functions. DBMS abstraction implemented by means of functions instead of global variables, PostgreSQL object converted to a subclass instead of a drop-in replacement. Also the beginnings of a flexible table name feature. 2004-07-10 03:09:26 +00:00
Arne Heizmann
6deed7d83e This commit implements Josh Cogliati's "info" feature (e.g.
http://en.wikipedia.org/w/wiki.phtml?title=Wikipedia&action=info), fixes the page headings
for protect/unprotect, and does a lot of whitespace changes (sorry about that). I've also
fixed confusing indentation somewhere.
2004-07-08 14:53:54 +00:00
Tim Starling
2ba9d12c88 Load balancer bug fixes 2004-06-22 08:54:26 +00:00
Tim Starling
bafbebea13 Allow use of DatabaseFunctions even when errors are ignored 2004-06-19 06:45:22 +00:00
Tim Starling
b5ef8d221b Bringing the load balancer to the main branch. Still doesn't do much. I needed a DB connection cache for my Article.php alterations, which LoadBalancer provides. 2004-06-15 15:00:54 +00:00
Domas Mituzas
4f8be09d65 allow empty condition for wfGetSQL() 2004-06-11 14:33:29 +00:00
Domas Mituzas
83a3aa9f8f added wfFetchRow() besides wfFetchObject. Used by objectcache code 2004-06-10 13:02:27 +00:00
Domas Mituzas
f518414fb6 * include required Database object (according to database type)
* define wgIsMySQL and wgIsPg global variables
2004-06-09 16:13:04 +00:00
Tim Starling
8f22cb45b1 include_once -> require_once 2004-05-07 13:43:10 +00:00
Tim Starling
cc73aa698b new function wfUpdateArray() 2004-03-23 10:17:50 +00:00
Brion Vibber
0332f4c598 Fix for compatibility with short_open_tag = Off 2004-02-18 02:15:00 +00:00
Tim Starling
3c96949682 * Recent Changes improvements: object oriented back end, move page annotation and (untested) message queue feed.
* Misc. bugs fixed in DatabaseFunctions.php and Skin.php.
* install-utils, install and update utilise Database objects instead of handling their own connections
* schema change for RC improvement -- added rc_type, rc_moved_to_title and rc_moved_to_ns
2004-01-17 05:49:39 +00:00
Tim Starling
a4c652b0ff object-oriented database connections 2004-01-10 16:44:31 +00:00
Tim Starling
fb7e47dbd7 Fallback to google search box when database is offline 2003-12-26 01:16:15 +00:00
Mr. E23
b502c51bd3 Removed use of PHP persistent connections. Se URL below for details.
http://meta.wikipedia.org/wiki/Why_persistent_connections_are_bad
2003-12-13 22:38:26 +00:00
Mr. E23
651ccd8322 Removed unused function wfUnbufferedQuery().
Added wfBufferSQLResults() to turn buffering on and off.
Added wfIgnoreSQLErrors() to turn automatic error page generation on and off.
2003-12-13 20:26:47 +00:00
Mr. E23
53fba653e0 Replaced calls to exit() with wfAbruptExit(). 2003-12-10 15:05:08 +00:00
Mr. E23
80c11c6b49 Workaround to avoid regexp segfault in wfGeneralizeSQL() 2003-12-01 00:28:25 +00:00
Mr. E23
a2d29cc28d Added wfUnbufferedQuery() 2003-11-24 19:33:26 +00:00
Tim Starling
6fc5803ca8 Removed dodgy regex 2003-11-22 06:55:07 +00:00
Tim Starling
a589b36083 Fixing broken regex in wfGeneralizeSQL 2003-11-21 06:23:54 +00:00
Mr. E23
ed60944f12 Fixed another bug in wfGeneralizeSQL(). This time it's perfect. 2003-11-19 17:09:42 +00:00
Mr. E23
8e4ec6434d Fixed another bug in wfGeneralizeSQL() 2003-11-19 02:07:23 +00:00
Mr. E23
3cd2cdb3d5 Fixed bug in wfGeneralizeSQL() that caused strings in some queries to remain 2003-11-19 01:19:47 +00:00
Mr. E23
2044513a36 Changed the way SQL queries are logged by profiling 2003-11-18 23:43:41 +00:00
Brion Vibber
d3c61d791d Security fix: include path 2003-11-17 03:00:18 +00:00
Brion Vibber
def0193f31 Use wfMsg()'s parameters 2003-11-15 14:11:30 +00:00
Tim Starling
46787701ce Nov. branch merge. Various features backported from stable, various bug fixes. 2003-11-09 11:45:12 +00:00
Tim Starling
ee4c7f2f49 Various fixes, see the version of [[m:Development status]] before this commit for details 2003-11-02 13:57:24 +00:00
Tim Starling
a2bc5d8338 MediaWiki namespace 2003-09-21 13:10:10 +00:00