Commit graph

111 commits

Author SHA1 Message Date
Brion Vibber
cfb002835d Accept 'utf8' flag in place of 'utf-8' to compensate for entries broken by bug 16841 in recompressTracked.php stuff 2008-12-30 21:43:54 +00:00
Roan Kattouw
f072eb2d95 (bug 16748) Null revisions are stored in the DB with rev_len=NULL. Patch by Paul Copperman 2008-12-21 22:35:52 +00:00
Aaron Schulz
bc6adff0c6 May as well set article ID in title 2008-12-11 01:28:37 +00:00
Aaron Schulz
e03787afd9 Make getTimestampFromId() need a title. Avoids some secondary lookups and orphans revs will be overlooked. 2008-10-30 10:04:30 +00:00
Tim Starling
f72ef5416f Fix docs 2008-10-28 14:55:42 +00:00
Aaron Schulz
9d274ccce7 Add getVisibility() 2008-10-19 05:47:23 +00:00
Tim Starling
f1a352ccf9 * Revert revert r41234 of ES-related changes. The site_stats complaint should be fixed by the transaction added in r41287.
* Fix broken recursion guard in LoadBalancer::reportConnectionError(), which was causing getConnection() to return false on the second and subsequent errors, instead of throwing an exception. Revert incorrect fix r41229/r41230.
2008-09-28 01:42:55 +00:00
Tim Starling
edda5eca4c * Make Revision::newFromTitle() get the page_latest value from the master instead of the slave
* Use inefficient replication-aware fetches only if replication is in use
* Update docs/database.txt on how to check for replication
2008-09-26 02:42:30 +00:00
Aaron Schulz
7b2aa9670f * Rename randomInsert() to insertToDefault()
* Use insertToDefault() to insert revisions (talked to brion on this)
2008-09-24 20:30:10 +00:00
Brion Vibber
c4bbaf94c0 Revert some recent ES-related changes -- they made behavior much worse when we encountered problems with site_stats updates hanging and stacking up extra open ES connections.
r41230
r41229
r41093
r41091
r41092
r41086
r41063
r40696

Also reverted r41231 which no longer applies
2008-09-24 18:09:22 +00:00
Tim Starling
7410147d02 Fixes for r41154 and r41155:
* Boolean parameters are widely accepted to reduce readability. Replaced the new boolean parameters with class constant parameters instead. 
* Re-added Revision::revText(), for backwards compatibility
* The getUser()/getUserText() changes near line 1223 of SpecialUndelete.php were incorrect, $file is an ArchivedFile not a Revision, and doesn't have any $isPublic parameters.
2008-09-24 09:44:45 +00:00
Aaron Schulz
804deee936 rev_deleted security improvements as well as fix for rawpages 2008-09-22 14:37:05 +00:00
Aaron Schulz
81e7adc6ad Remove Revision::revText() and move functionality to getText() 2008-09-22 14:24:18 +00:00
Aaron Schulz
7b61c1972a ExternalStore tweaks:
* On read, spend less time checking on dead slaves
* Add randomInsert() to ES. This does the cluster picking for us
* Make revision text use randomInsert(). On write, fails-over to other clusters as needed instead of throwing db errors
2008-09-10 12:07:56 +00:00
Tim Starling
01d95d7bae No negative caching in the revision cache -- doesn't work anyway since memcached converts false to '', and so suppresses the error message on the second hit. 2008-07-28 10:16:12 +00:00
Aryeh Gregor
680007475f Fixes for r37489:
* Don't pass $data or $flags by reference.  They're never accessed again, so it makes no sense.
* Document in hooks.txt.
The interface for this hook seems very messy.  It seems like it would be much cleaner to expose $data as $url (null if stored locally); and $flags as an array, or something like that.  If the text is gzipped, the text can be extracted from the Revision and re-gzipped if you really want to for some strange reason.
2008-07-10 18:04:32 +00:00
Aaron Schulz
f40990435c Extend RevisionInsertComplete hook (bug 14780) 2008-07-10 10:30:45 +00:00
Brion Vibber
61276a7d6a Tweak to r37385: put the timestamp format normalization on the input read (Revision::getTimestampFromId()) instead of the middle tier (Skin::lastModified()) 2008-07-09 17:41:02 +00:00
Aaron Schulz
79bf4c24ed Rename 'hiderevision' to 'suppressrevision' 2008-05-25 00:31:28 +00:00
Aaron Schulz
2e7723343b Remove shitty ass useless fucking ampersands that just make it harder to avoid fucking strict notices 2008-05-23 07:33:35 +00:00
Niklas Laxström
1b6a66bbc7 * PHP Strict Standards: Only variables should be passed by reference in <> 2008-05-23 07:20:52 +00:00
Brion Vibber
9cfd1d3f2b Clean up r35180: prettify some functions, break some long lines and odd constructions. 2008-05-22 16:47:12 +00:00
Brion Vibber
a4ffac4063 Revert r35178 and normalize User's getID() and setID() methods to prettier getId() and setId()
This doesn't accomplish anything, of course, but if you're going to run around changing them, at least make em prettier eh? :)
2008-05-22 16:39:43 +00:00
Aaron Schulz
3e36ba655e * Remove pointless newline
* It helps not to through fatal errors everywhere if not title
* Add optional $pageId param to getTimestampFromID() to avoid a secondary lookup, not that anything uses this function anyway...
2008-05-22 15:15:00 +00:00
Aaron Schulz
ae54dbbb3d *The function is User::getID() not getId() 2008-05-22 14:57:07 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Brion Vibber
beedd5c5f3 Revert r34906, r34907, r34928 -- mixing high-level data into low-level storage functions for the sole purpose of passing it off to hooks, which seems very icky to me. It feels like a hook in the wrong place is being used. 2008-05-17 15:53:58 +00:00
Aaron Schulz
21bc5be1a7 Improve efficiency of autoreviewing of edits rollbacks and merge into main function 2008-05-16 18:22:31 +00:00
Aaron Schulz
493d8451b8 Decrappify edit check for revision hook 2008-05-16 03:17:05 +00:00
Bryan Tong Minh
c316a2d6d3 ApiQueryRevisions now uses the Revision backend. This allows a more proper handling of rev_deleted. Also in case rev_size is filled on demand (bug 12188) there is only need to do this in one place. 2008-05-13 10:42:32 +00:00
Brion Vibber
c3193cbcd0 Partial correctness fix; use lazy-loading $this->getTitle() instead of $this->mTitle in Revision::getPrevious() and Revision::getNext().
This will ensure they work even if the objects were fetched in a way that didn't initialize $this->mTitle... unless they aren't fully saved in the DB, in which case they'll still fail with a fatal error.
2008-05-08 19:26:41 +00:00
Aaron Schulz
68df48c93a Autoreview null edits too (bug 13733) 2008-04-15 15:38:08 +00:00
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
Aaron Schulz
e12ae8d451 Make parent ID null to avoid stupid looking sp:contribs 2008-04-08 21:38:39 +00:00
Aaron Schulz
0355ad8cd2 Consistent case 2008-04-08 07:41:01 +00:00
Aaron Schulz
08b70c39ab Check if rev_parent_id is set first 2008-04-08 05:50:42 +00:00
Aaron Schulz
72bdc1fca7 Use page_latest, not the one before it 2008-04-08 00:13:46 +00:00
Aaron Schulz
577e0042cd * Populate rev_parent_id
* Mark off and document some functions
2008-04-07 23:53:57 +00:00
Alexandre Emsenhuber
e72e4657a9 * Marked Revision::compressRevisionText() as static
* $fname -> __METHOD__
2008-04-01 15:13:44 +00:00
Brion Vibber
302f32c6fe Revert r32126 -- breaks type-safety by having a bunch of Revision functions which are supposed to always return strings return booleans sometimes.
Let's not toss in even more scary possibilities, please... predictability is nice!
2008-03-18 23:07:19 +00:00
Aaron Schulz
90163adf71 *Return false when a user cannot see a field of a revision, rather than "", which could actually be valid
*Remove now unneeded perm checks in diffEng
*Fix unsafe cache leak for diffs (bug 9432)
2008-03-18 19:37:03 +00:00
Huji
2d8a62941c (bug 12608) Unifying the spelling of getDBkey() in the code. 2008-01-14 09:13:04 +00:00
Niklas Laxström
fa860586e3 * Everything calls this function statically, mark it such to prevent E_STRICT 2007-11-10 13:38:37 +00:00
Brion Vibber
9be2c3676a Revert r26281 for the moment. Big patch, changes several existing practices. Will want some public testing and more review before taking it to trunk. 2007-10-01 19:50:25 +00:00
Aaron Schulz
4febfc77c2 *Clean up deletion of revisions and remove some gaps
*Allow blocking of users to hide names
*Implement revision deletion for images/deleted files/deleted revs
*Log deletion set off for now
*Add 'hidden' file dir
*Dissallow merging via undelete (which was inefficient and hard to reverse)
*Use restore points and diffs to special:undelete
*Add a special page to merge pages
*Get changeslist to use tables to avoid ugly formatting
*Add logs into RC for rebuildrecentchanges.php
*Add private logs
*List private logs at specialpages
*Tweak/add some deletion and merge messages
2007-10-01 19:38:28 +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
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