Commit graph

65 commits

Author SHA1 Message Date
Antoine Musso
343420d0ad Convert whitespaces to tabulations 2007-04-21 14:44:56 +00:00
Domas Mituzas
1c7e5346fc IN YOUR FACE BRION!!!!
check if the value has been actually set before checking if it is null.
2007-04-20 15:33:51 +00:00
Tim Starling
4e3199f030 Removed //IGNORE suffix in call to Language::iconv, redundant (generates warning) since r19835. 2007-03-16 13:04:57 +00:00
Aaron Schulz
63823a6879 *Null revisions no longer have an "empty" rev_len, remove redundant check 2007-03-15 00:48:38 +00:00
Aaron Schulz
399e139bed *Get rev_len to carry across delete/undelete 2007-03-13 23:28:34 +00:00
River Tarnell
5c722a3a3a use bytes rather than chars, since that's what other page size fields use 2007-03-09 16:42:37 +00:00
River Tarnell
b64c37d038 add Revision::selectFields(): returns a list of fields that should be SELECTed to construct a Revision from an SQL result object 2007-03-09 15:29:18 +00:00
Brion Vibber
21f7b4bea5 make River happy 2007-03-09 15:24:36 +00:00
Brion Vibber
2b9c27557a is_null() throws a NOTICE for undefined things; use !isset() 2007-03-09 15:19:59 +00:00
River Tarnell
4afd40843e need to use mb_strlen, not strlen, for article length
provide stub mb_strlen for installations missing mb
2007-03-08 03:53:32 +00:00
River Tarnell
a4003cf253 * (bug 1723) Article size in history 2007-03-08 03:07:58 +00:00
River Tarnell
94617ddcba add rev_len to revision; store length of revision when saving.
HEADS UP: schema change to revision table
2007-03-08 02:55:14 +00:00
Aaron Schulz
0e43acc71c * Add revText() to get non-public revision if user can, add rev_deleted constant for later use. 2007-02-05 23:26:26 +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
Antoine Musso
38f208f213 makes function static to fix strict errors in parser tests script. 2007-01-07 18:52:45 +00:00
Nick Jenkins
e62c051e0a Connecting to the database may help, but I'm guessing this function isn't used if no-one has complained. 2006-11-29 11:55:18 +00:00
Nick Jenkins
ae8554c45b Completing code housekeeping stuff for rest of includes/ directory: removing unused local vars, removing unused globals, replacing extract() where simple to do, declaring output arrays before calling preg_match(), and so forth. 2006-11-29 11:43:58 +00:00
Brion Vibber
5608baea84 * PageArchive can now return a Revision object for more convenient processing
of deleted revision data
* Added 'UndeleteShowRevision' hook in Special:Undelete
* Error message on attempt to view invalid or missing deleted revisions
2006-10-26 16:47:30 +00:00
Tim Starling
e174a4ddfb Abolished $wgDBname as a unique wiki identifier, it doesn't work with the new-fangled feature we call "table prefixes". Instead use wfWikiID() for an identifier containing the DB name and the prefix if there is one, and wfMemcKey() for cache key construction.
Caches for wikis with table prefixes will be lost on upgrade, caches for wikis without table prefixes will be preserved. Custom cache keys in extensions can be migrated at leisure. Extensions which write to core cache keys should be migrated ASAP, as I have done with Special:Makesysop.
2006-10-04 09:06:18 +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
Yuri Astrakhan
09c423f42e New method loadFromId() per brion's suggestion. Reverted newFromId() change. 2006-10-02 16:17:57 +00:00
Yuri Astrakhan
3f912bdc15 added optional $db param to newFromId( $id, $db = null ) 2006-10-02 15:03:39 +00:00
Brion Vibber
376014e981 * Added experimental $wgRevisionCacheExpiry to cache extracted revision text
in $wgMemc, to further reduce hits to external storage.
  Set to 0 (disabled) by default.
2006-09-18 18:10:20 +00:00
Brion Vibber
b9e51d16bc * Lazy extraction of text chunks in Revision objects, may reduce hits to
external storage when actual text content is not used
2006-09-18 17:52:44 +00:00
Antoine Musso
fd912a148b A lot more of static issues when using E_STRICT from the commandline. 2006-07-10 15:41:30 +00:00
Brion Vibber
2f82b79fd7 * Allow fetching all revisions from transwiki Special:Import
* Allow fetching all revisions from Special:Export GET request
* Disable output buffering on Special:Export; should help with streaming
  large numbers of history items.
* Allow setting a maximum number of revisions for history Special:Export;
  pages with more than $wgExportMaxHistory revisions are excluded from
  export when history is requested.
* Fix transwiki import of pages with space in name
2006-06-27 21:48:43 +00:00
Tim Starling
eac0376cdc s/Revision::MW_REV_DELETED/Revision::DELETED/, and introduced aliases for compatibility with 1.6. 2006-06-23 06:31:46 +00:00
Tim Starling
e62aea13c6 Don't do 100 queries to view 50 revisions in history pages. 2006-06-11 04:48:27 +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
Domas Mituzas
06e4640d8c AutoLoad Article 2006-06-06 11:29:23 +00:00
Domas Mituzas
d8c04540b7 Move revision deletion constants into Revision:: 2006-06-06 10:54:23 +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
Tim Starling
16461ce7d8 Check for invalid serialized objects and return an error condition instead of just dying. 2006-04-24 03:29:27 +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
feee1cc43d Write load distribution across multiple external storage engines. Untested. 2006-03-27 03:56:53 +00:00
Brion Vibber
103be1dda1 * Further work on rev_deleted; changed to a bitfield with several data-hiding
options. Not yet ready for production use; Special:Revisiondelete is
  incomplete, and the flags are not preserved across page deletion/undeletion.
  To try it; add the 'deleterevision' permission to a privileged group.
Also split some functions from GlobalFunctions to XmlFunctions.php, added
some convenience functions for building form controls, some more Linker
conveniences for formatting various types of standard link clusters.
2006-03-16 19:04:25 +00:00
Domas Mituzas
cede31f892 do not trust equality propagation, help optimizer a bit ;-) 2006-01-25 20:50:39 +00:00
Tim Starling
77c17910a9 Make Revision::getPrevious() and Revision::getNext() return null if there are no more revisions to fetch in that direction. They previously just started from the current revision again. 2006-01-19 17:12:37 +00:00
Tim Starling
31262fdf29 Don't try to inflate or unserialize an error flag 2006-01-19 03:59:20 +00:00
Tim Starling
679b0e69b8 Option to write text directly to external storage. 2006-01-09 03:16:56 +00:00
Domas Mituzas
41c1c69fdf character set conversion //IGNORE live patch 2005-12-26 13:05:20 +00:00
Brion Vibber
4b18b9b0bd Reverting hook in getRevisionText() which was added with no explanation
of what it's meant to do. Incorrect modification in this location would
cause data corruption, so is almost certainly wrong.
2005-09-30 22:05:58 +00:00
Ævar Arnfjörð Bjarmason
a4deeb4be7 * (bug 3577) Added a RevisionAfterGetRevisionText hook to getRevisionText() 2005-09-30 15:25:55 +00:00
Brion Vibber
af2177edfd Code cleanup: normalize case for intval(), strval(), floatval() calls. 2005-08-16 23:36:16 +00:00
Antoine Musso
189fd58ebb useless return 2005-08-15 20:27:03 +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
Brion Vibber
0226b12c83 * (bug 2572) Fix edit conflict handling 2005-06-28 23:19:56 +00:00