Commit graph

825 commits

Author SHA1 Message Date
Daniel Friesen
b970aa1320 showDiff needs headers as parameters, even though they aren't needed here. Just give it two empty strings to avoid a PHP error. 2008-06-01 23:47:32 +00:00
Daniel Friesen
6adc4190c5 Solved bug 14263, showing a diff on revert. 2008-06-01 23:35:42 +00:00
Aaron Schulz
79bf4c24ed Rename 'hiderevision' to 'suppressrevision' 2008-05-25 00:31:28 +00:00
Aaron Schulz
03d743a250 Extra sanity check 2008-05-24 23:56:07 +00:00
Leon Weber
b87d714a93 * Refactored Article::getAutosummary(), so there's not a very simple static function called for every
autosummary case, instead just include the appropriate code, which makes the whole thing much shorter
  and cleaner.
* Removed Article::getRedirectAutosummary() and Article::getBlankingAutosummary(), which were obsolete
  then.
* Article::getRedirectAutosummary() was called from EditPage::internalAttemptSave() as check if the page
  being edited is a redirect. Replaced that function call with the one-line routine which was used in the
  former Article::getRedirectAutosummary() function. We should have this check in some general static
  function, though.
2008-05-24 14:55:54 +00:00
Tim Starling
079a37ef22 In FlaggedRevs:
* Moved the FlaggedRevs class to its own file
* Removed $wgFlaggedArticle, store an instance inside the Article object instead. Also store a reference in the Title object, since some hooks only have a Title available. 
* Modified all hooks which were previously calling $wgFlaggedArticle directly to go via an instance loader function.
* Merged hook functions for ArticleViewHeader and DiffViewHeader
* Changed the way FlaggedRevs sets the right image version in ImagePage, to avoid a function call on startup
* Some coding style changes, such as consistent variable case, consistent indenting style, meaningful variable names, etc.
* Fixed typo in updateAutoPromote.php
* Removed the $wgFlaggedRevsVisible feature, this doesn't seem to be in keeping with our mission so I couldn't see the point in spending a lot of time fixing its bugs. Revert if necessary.
* Use Xml::encodeJsVar() to transfer data from PHP to JS, don't DIY
* Use OutputPage::addHeadItem() instead of an infinite-lifetime variable to ensure that only one copy of the header item is added. OutputPage objects may come and go.
2008-05-23 09:03:49 +00:00
Aaron Schulz
b690c9ac4d Revision:getId() not getID() 2008-05-22 15:02:33 +00:00
Aaron Schulz
9717cebd88 *Redo newRevisionFromEditComplete hook. Pass an Article instead of a title
*Use prepareTextForEdit() to avoid double parsing
*Parser cache will be saved again later, so need to do it twice in a row
2008-05-22 01:03:45 +00:00
Aaron Schulz
4987ca768d Move rewRevisionFromEditComplete call down till after page rows set 2008-05-21 16:26:53 +00:00
Aaron Schulz
c1f4ea63fe $user->setNewtalk( false ) for deleted user talk pages (bug 14077) 2008-05-21 05:23:20 +00:00
Aaron Schulz
def840161f Move this till after ID set 2008-05-21 00:28:13 +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
Aaron Schulz
7c2c02953c * Add higher level newRevisionFromEditComplete hook
* Use this hook for autoreviewing. Merge to one function again.
* Remove template ID query for $usestabletemplates, not needed
* Improve includes change diff if $usestabletemplates is on
2008-05-17 17:53:46 +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
3c9536652a Put code to view redirect page in new method Article::viewRedirect in order to allow displaying redirects on foreign file repos. 2008-05-11 19:49:08 +00:00
Niklas Laxström
0bc80c7984 * Automatic edit summaries can be turned of with $wgUseAutomaticEditSummaries 2008-05-10 09:52:51 +00:00
Bryan Tong Minh
ec1f42a1e9 * Use getters where appropriate
* Fix following foreign file redirects again
2008-05-09 10:42:49 +00:00
Leon Weber
cdcbb829dc (bug 14044) Don't increment page view counters on views from bot users 2008-05-08 15:01:40 +00:00
Alexandre Emsenhuber
cd225d19bf Custom rollback summaries now accept the same arguments as the default message 2008-05-03 16:07:57 +00:00
Alexandre Emsenhuber
5cf24493fa bug fixes:
* Be sure that article name is escaped when outputing a redirect page
* Mark Xml::buildForm() as static
2008-04-28 18:00:58 +00:00
Aaron Schulz
28c9241e38 wfProfileOut( __METHOD__ ); 2008-04-28 17:05:25 +00:00
Aaron Schulz
f879db092e Fix profiling 2008-04-28 17:02:20 +00:00
Andrew Garrett
39eaf98247 Pass the old article ID in the ArticleDeleteComplete hook, to allow, for example, extensions that store metadata about articles to do their own cascading deletes 2008-04-28 12:34:27 +00:00
Aaron Schulz
b52a75d33e Remove log debugging code, not needed anymore 2008-04-27 23:45:31 +00:00
Aaron Schulz
c682e06086 Make suppression require hiderevision 2008-04-26 23:33:27 +00:00
Rotem Liss
4d29f7c88e * When undoing an edit, make sure it wasn't deleted.
* Show a proper error message for non-existant or deleted revisions when undoing.
2008-04-23 16:08:16 +00:00
Raimond Spekking
63ccbb331a * Move hardcoded text "Diff:..." to new message 'missingarticle-diff'
* Move hardcoded text "oldid=..." to new message 'missingarticle-rev'
* Remove variable $t from message 'noarticletext' as it has no parameter $1
2008-04-22 06:10:01 +00:00
Aaron Schulz
a20752820f Remove unused message 2008-04-17 15:03:40 +00:00
Aaron Schulz
e34a925007 * Move affectedRows count up
* Shouldn't need to pass db object here
* Some code style tweaks
2008-04-16 21:07:39 +00:00
Aaron Schulz
6eac8727d7 No need to pass db around, should be the same 2008-04-16 17:34:52 +00:00
Aaron Schulz
e599306830 * Allow for things that call addEntry() to pass in a DB object to make the action and logging be one transaction
* Improve logging transactions for block/delete
2008-04-15 23:34:45 +00:00
Roan Kattouw
41be56e3ad (bug 13745) Fix regression from r33133 by changing INSERT to REPLACE 2008-04-15 18:32:48 +00:00
Brion Vibber
ea8b2965a8 Revert some chunks of r33133 and r33375:
* Let followRedirect() *always* work correctly by working from the article text.
* This ensures that we're not falsely looking up data from another version and that we're not missing interwik and fragment data.

Should clean up both bug 13754 (editing old version of redirect sometimes gives the target page text)
and bug 13752 (bugs with fragments and probably interwikis in redirect target).

Haven't been able to repro 13754 at home though, so we'll see.
2008-04-15 18:11:28 +00:00
Alexandre Emsenhuber
2dd7e59f17 (bug 13752) Section redirects now works again 2008-04-15 17:32:23 +00:00
Alexandre Emsenhuber
91ba0f419d (bug 13736) Don't show MediaWiki:Anontalkpagetext on non-existant IP addresses 2008-04-14 16:16:02 +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
41d54eb919 Don't delete logs from RC on page delete (bug 13727) 2008-04-14 01:04:10 +00:00
Victor Vasiliev
cfe2a5039b * Cache image redirects (and enable them) 2008-04-12 18:04:46 +00:00
Aaron Schulz
dcc835ca0b Don't log if we unprotect and unprotected page but try to set an expiry 2008-04-12 00:30:01 +00:00
Aaron Schulz
e9d2f55901 Reset ID before adding to log. That way it goes in as 0 for deletions. RC save() stuff then makes values of zero become NULL. This should fix PG error. 2008-04-11 23:42:09 +00:00
Roan Kattouw
68bbfc12c0 Committing patch for bug 10931, which also fixes bug 13651. For a detailed explanation of what this commit does, see bug 10931 comment #24 2008-04-11 15:20:45 +00:00
Brion Vibber
784d10e4d3 Kill a bunch of '=&' references for LinkCache, ParserCache, and MimeMagic singletons.
This is an old PHP 4-ism; only needed today if you want to be able to replace the singleton with another object by using the reference as an lval. :)
Killing them because they annoy me.
2008-04-09 18:23:34 +00:00
Aaron Schulz
aed9d4b912 ...really get rid of link color query spam 2008-04-09 05:21:00 +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
410a014a9f Force line breaks to avoid some XHTML errors with some messages that contains lists like MediaWiki:Titleblacklist 2008-04-04 21:51:32 +00:00
Aaron Schulz
441068209b Add showLogExtract() and remove use of FauxRequest hacks 2008-04-02 20:20:47 +00:00
Aaron Schulz
15863d5b2d Use 'suppress' right rather than 'oversight' 2008-04-01 22:50:53 +00:00
Brion Vibber
3870e5a1e7 * Trackback display formatting fixed 2008-03-25 21:50:23 +00:00