Commit graph

321 commits

Author SHA1 Message Date
Alexandre Emsenhuber
2629c3649f * Added revision's timestamp to OutputPage along with revision ID; avoid a DB hit in Skin::lastModified() when showing parser cache's content. This changed with the removal of $wgArticle in Skin since now it's a different WikiPage object and thus WikiPage::setTimetstamp() call is useless (but still kept).
* Added ParserOutput::(get|set)Timestamp() and the $mTimestamp member; avoid messing with isset()
2011-12-10 16:30:40 +00:00
John Du Hart
216d661d3b Bug 29524 - Rename RequestContext::getLang to getLanguage
I'll be amazed if this doens't break any tests.
2011-11-21 16:13:21 +00:00
Alexandre Emsenhuber
dd58309f1a * Added WikiPage::getParserOutput() and changed Article::getParserOutput() to use it
* WikiPage::getParserOutput() requires a ParserOptions object (and optionally the revision ID) instead of an User object, removes an hidden dependency on $wgLang. For this reason, WikiPage::isParserCacheUsed() now also uses a ParserOptions object instead of an User object (doesn't change anything in the code except the variable name and it's not called in extensions)
* Moved PoolWorkArticleView to WikiPage.php and added an entry in the AutoLoader and moved output-related stuff directly in Article::view() so that in can be shared with WikiPage::getParserOutput() (removes code duplication, etc.)
* Added the revision ID to the PoolCounter key so that it knows which revision is being parsed and doesn't wait for another parse operation with same options but different revisions
* Removed Article::doViewParse(), Article::tryDirtyCache() and Article::getOutputFromWikitext() since they are now integrated in PoolWorkArticleView and Article::view() and there are no callers in extensions. This also fixes a bug since Article::doViewParse() will get another ParserOptions instance with special options set in Article::view() not be repercuted.
* Updated DifferenceEngine to use the new system
* Updated docs/memcached.txt to correct method names
2011-11-17 20:21:54 +00:00
John Du Hart
93e50f7eed Following r100264, update usages in core 2011-11-16 04:37:17 +00:00
Alexandre Emsenhuber
d3fdaac14b Fix for r103001: using the object is actually a good idea 2011-11-14 18:31:44 +00:00
Alexandre Emsenhuber
4124539a4d Update DifferenceEngine::renderNewRevision() to run the 'ArticleViewCustom' hook and create a WikiPage object and do "normal wikitext" processing only when really needed 2011-11-14 18:28:01 +00:00
Alexandre Emsenhuber
2b78de3f02 Made DifferenceEngine use a context instead of global variables and updaters calls to constructor in core 2011-11-10 13:06:52 +00:00
Platonides
9b283db803 Follow-up r102521
Remove $wgUseExternalEditor globals.
2011-11-09 23:35:30 +00:00
Alexandre Emsenhuber
588539858c Some updates to EditPage and ExternalEdit:
* Made ExternalEdit use a context
* Updated DifferenceEngine to use ExternalEdit to send the diff stuff to reduce code duplication
* Introduced ExternalEdit::useExternalEngine() to check whether to use the external edit or diff (except for the action, section and oldid which are still checked in Wiki.php) to remove code duplication; external diff can now also be controlled with externaledit or internaledit URL parameters
* Use $wgContLang to get the name of the "Special" namespace instead of user's language
* Modified the line breaks in the comment on the top of the control file so that the URL is on its own line
* Updated extension to call EditPage::edit() instead of EditPage::submit(), the latter will just call the former
* Updated extension to let core handle itself the ExternalEdit mode instead of doing this themself
2011-11-09 15:31:55 +00:00
Alexandre Emsenhuber
f8e2b347a5 * Changed OutputPage's handling of subtitles to use an array and implode it with "<br />" so that callers don't have to bother whether there's already a subtitle when adding new ones
* Make OutputPage::setSubtitle(), OutputPage::addSubtitle() and OutputPage::appendSubtitle() accept a Message object in addition to a string
* Added new method OutputPage::addSubtitle() to replace appendSubtitle() and marked it as deprecated
* Clear the subtitles when showing an error page
* Always show the subtitle from Article::viewRedirect() when showing a page; left the parameter for use in EditPage
* Make Article::setOldSubtitle() add two subtitles and has to set "display:inline;" for the three possible divs to avoid too many spacing
* Removed the six different backlink subtitles and added one new message 'backlinksubtitle' to replace them and added OutputPage::addBacklinkSubtitle() to factorise common code
* Changed EditPage's view source to show "View source for <Page>" with the same backlink in subtitle for consistency with other back links and page titles
2011-11-08 18:01:22 +00:00
Alexandre Emsenhuber
381309f474 * Merged Title::userCanRead() check in Title::getUserPermissionsErrors()
* (bug 26020) Setting $wgEmailConfirmToEdit to true no longer removes diffs from recent changes feeds
* Added second parameter to Title::userCan() and Title::quickUserCan() to allow callers to pass the User object to use for checks; this changes Title::userCan()'s second parameter from "do expensive queries" flag to User, but all callers should have been updated in r102183
* Updated callers that might throw a PermissionsError to use getUserPermissionsErrors() instead and pass the error array to the exception
* Refactored duplicate code in missingPermissionError()
* Moved Title::isNamespaceProtected() a bit upper and Title::userCanRead() near Title::userCan() to have related functions in the same location
* Some minor refactoring in permission-related functions in Title
2011-11-06 19:59:46 +00:00
Alexandre Emsenhuber
3801a3cd28 * Made OuputPage::showPermissionsErrorPage() show a different messages for 'read', 'edit', 'create' and 'upload' actions to saying "You need to log in to do this action" when 1) The user is not logged in 2) The only error is a permissions error (no block or something else) and 3) The error can simply be avoided by logging in
* This replaces OuputPage::loginToUse() functionnality, made it simply throw a PermissionsEror exception and updated all calls in core
* Same for the check in SpecialUpload::execute(), EditPage::userNotLoggedInPage() and EditPage::noCreatePermission()
* Throw the same exception in EditPage::attemptSave() whether the user is logged in or not and let OuputPage::showPermissionsErrorPage() decide which message to display
* Replaced call to deprecated OutputPage::blockedPage() in SpecialUpload
* Displayed messages are the same as now, except the title is always "loginreqtitle"
* 'nocreatetitle' and 'uploadnologin' messages are still used by extensions, so I kept them, but the message 'whitelistedittitle' is not used anymore and has been removed
2011-11-05 19:51:05 +00:00
Platonides
d581e9dd5a Removal of unused globals 2011-10-27 20:48:09 +00:00
Alexandre Emsenhuber
b212bace90 Per Nikerabbit's comment on r100621:
* Removed OutputPage::setPageTitleMsg() and OutputPage::setHTMLTitleMsg() and make OutputPage::setPageTitle() and OutputPage::setHTMLTitle() accept a Message object
* Updated core calls (including some that I missed last time because of non-matching case)
* Added Message::setContext() and use it in RequestContext so that I don't need to duplicate the call in OutputPage
* Yes, I'm calling $this->msg() on places and then setting the context one more time in OutputPage::setPageTitle() or OutputPage::setHTMLTitle(), but at least I won't be confused about which objects $
2011-10-27 20:23:16 +00:00
Max Semenik
95ec650786 Revert r93246: besides the problems pointed out at CR, it also causes bug 31403, wreaking havoc on large wikis 2011-10-07 13:58:16 +00:00
Alexandre Emsenhuber
a2b914d852 Fix for r99038: this was in the wrong part of the if statement 2011-10-05 19:59:39 +00:00
Alexandre Emsenhuber
0b0705f370 Big cleanup to DifferenceEngine:
* Call Linker methods statically
* Factorised a lot of duplicate code, such as "Mark patrolled" links, revisions headers, etc.
* Removed showFirstRevision() and made that case be handled through the normal showDiffPage(). In such case, the header will look like a normal diff page, except it is centred. For this, addHeader() will now center the "new revision" header if the string passed to the "old revision" header and the diff is empty. getDiffBody() will also return an empty string if $mOldRev is false.
* Showing only one revision when the previous was not found will also ask to unhide the revision is deleted as in normal case
* Backed out code that generates the revision header from loadRevisionData() so that this function does not make a mix of backend and UI stuff. Factorised the code in getRevisionHeader().
* Lazy-load page's language and revisions IDs (in case of "prev", "next", etc. are passed) instead of doing that in constructor.
* Made a good part of links compatible with Special:ComparePages, such as navigation links, "undo", etc. that links to the title corresponding to the revision and not the given title in the constuctor.
* "Current revision as of" can also be displayed on the old revision, useful when comparing two current revisions in Special:ComparePages
* Removed navigation, undo and rollback links when comparing two different pages, this can confuses users thinking they are comparing two revisions of the same page. Also clicking on a "undo" link in such case will give "revision not found".
* Check if the user can read the revisions before sending a external editor file
2011-10-05 19:55:04 +00:00
Robin Pepermans
b926eb0074 Mark $mDiffLang protected, and rename function to setTextLanguage per Nikerabbit on r92956 2011-09-04 16:09:58 +00:00
Roan Kattouw
24f6e5f721 Use canonical URLs in sitemaps, diff stuff and external edit stuff 2011-08-19 17:33:41 +00:00
Alexandre Emsenhuber
ba84011526 * Changed OutputPage::$mIsArticle flag to be false by default. A lot of actions don't change that flag when they should, since about only action=view should have it to true.
* Put OutputPage::$mIsArticleRelated declaration just below $mIsArticle's one since they are related
* Made DifferenceEngine consistent with action=view, i.e. setting that flag to true when displaying any version of the page, current or not
* Made Skin::getCopyright() always use history_copyright when displaying an old version, regardless to the diff parameter
* Changed some checks from namespace != NS_SPECIAL && action=view to isArticle() so that they don't get executed when e.g. throwing an Exception (or similar things)
2011-07-27 13:14:28 +00:00
Happy-melon
c3e096c6e5 (bug 15641) prevent blocked administrators from accessing deleted revisions. 2011-07-26 20:54:41 +00:00
Robin Pepermans
8fc646cf08 DifferenceEngine: introduce setDiffLang() to change the language in which the diff text is written.
Translate: set the the diff text according to the source language, on Special:PageTranslation and the translation messages. (Also fix direction of CSS class mw-translate-fuzzy).
2011-07-23 19:03:54 +00:00
Platonides
2e3f7a97fd Profiling errors. r92106 missed a wfProfileOut
r92118 added a wfProfileIn but not all returns were covered. Also changed its spaces to tabs.
2011-07-19 19:05:23 +00:00
Aaron Schulz
75fc6592ba Fixed profiling error 2011-07-13 22:57:04 +00:00
Leo Koppelkamm
455661a73c Moving skins/common/diff.css to mediawiki.action.history.diff.css and updating some old comments in the process. Also moved one vendor-prefixed attribute in fron of the standard one. Extension follow in a second 2011-07-08 17:59:42 +00:00
Robin Pepermans
7c624542f0 (bug 6100; follow-up to r91315) Being bold and removing $wgBetterDirectionality (and dependent wfUILang) in core, as most or all work is finished.
Also:
* Introduce classes mw-float-end, mw-float-start so we don't have to use inline css depending on wfUILang()/$wgLang (see HistoryPage and SpecialFileDuplicateSearch)
* Add direction mark to protection log
* Remove specialpageattributes as it is obsoleted by this commit (also fixes bug 28572)
* Add two direction marks in wfSpecialList, which makes ltr links on rtl wiki (and vice versa) display nicely as well (only on those special pages however)
* Revert r91340 partially: use mw-content-ltr/rtl class anyway in shared.css. Both ways have their [dis]advantages...
* Set the direction of input fields by default to the content language direction (except buttons etc.) in shared.css
2011-07-06 02:26:06 +00:00
Aaron Schulz
8e39791496 Removed some dead code (useless since r87806) 2011-07-02 09:12:08 +00:00
Sam Reed
9b850aa604 Minor revert to r91246 2011-07-01 02:28:08 +00:00
Sam Reed
bdc31bb9bc Change usages of $wgUser->getSkin() in special pages to use $this->getSkin()
Fix trailing whitespace
2011-07-01 02:25:19 +00:00
Alexandre Emsenhuber
48192cfe7c Follow-up r90334 and r90337: made DifferenceEngine::addHeader() non-static to be able to use $this->mTitle instead of $wgTitle 2011-06-29 10:51:15 +00:00
Platonides
71a0ad0101 Follow up r90334.
Removes the space after the class name in $wgBetterDirectionality = false,
I think it is clearer to have the variable to hold the classes, instead of the *additional* classes.
Renamed to be clearer and be camelCase.
Added redundant htmlspecialchars() and spaces.
2011-06-19 18:53:55 +00:00
Robin Pepermans
ca6fcb7e3f Address comment by Platonides on r90320:
* undefined variable $list in CategoryPage.php
* move code in ParserOptions to a new member of Title class, which falls back to $wgContLang
2011-06-18 14:49:01 +00:00
Robin Pepermans
9077baef30 Follow-up to r90265: directionality improvements as part of bug 6100 (under $wgBetterDirectionality):
* Correct directionality when viewing diffs
* Correct arrows for Pager
* CSS/JS pages always 'en' (LTR)
* Messages on Special:Allmessages have lang and dir attributes based on the selected language
2011-06-18 13:12:52 +00:00
Sam Reed
bdf84cb20e Swap else if for elseif
Trimming trailing whitespace also

Doing in 3 commits, so hopefully reviewable in CR...
2011-06-17 16:03:52 +00:00
Sam Reed
94bf573c03 Remove some unused variables, add/improve some documentation 2011-06-01 16:27:46 +00:00
Siebrand Mazeland
75c6696aa8 Use consistent notation for "@todo FIXME". Should update http://svn.wikimedia.org/doc/todo.html nicely. 2011-05-17 22:03:20 +00:00
Roan Kattouw
0ee7b5c2ea Kill diff.js with fire. It only applies to versions of Gecko that were released before Nov 2002, which is waaaay beyond what we support, or what anyone could conceivably be using in this day and age. 2011-05-14 23:49:29 +00:00
Brion Vibber
0c8ecd43bc * (bug 21279, bug 28820) Workaround for standard diff links to deleted revs; Special:Undelete links to deleted rev when allowed.
Adds links to Special:Undelete to view the requested revisions onto the 'revision data not found' error message, if they can be found via ar_rev_id and the user has permission to deletedhistory.

Follow-up to r87804; allows the 'diff' links on log entries for Special:RevisionDelete actions on deleted revs referenced by rev-id to continue to go someplace semi-sane.
Could benefit a more transparent forwarding -> bug 28820.
2011-05-10 01:17:01 +00:00
Sam Reed
15df9a9d5c Kill off the long deprecated $wgInputEncoding and $wgOutputEncoding globals 2011-05-06 22:09:47 +00:00
Sam Reed
c8079f0b81 * (bug 27185) API: Add Special:ComparePages 2011-05-01 21:56:02 +00:00
Chad Horohoe
716fd5bd76 (bug 28610) unsegement is not a word 2011-04-19 14:04:00 +00:00
Alexandre Emsenhuber
b5966436ea No need to call wfSuppressWarnings() and wfRestoreWarnings(); wfDl() already does this 2011-04-11 16:52:51 +00:00
Alexandre Emsenhuber
2300787fdc dl() -> wfDl() 2011-04-10 14:21:37 +00:00
Aaron Schulz
b845e4899a Follow up r85467: changed some countRevisionsBetween/countAuthorsBetween callers to pass in objects, which avoids queries 2011-04-05 23:28:39 +00:00
Aaron Schulz
624dfd884e * Cleanups to getFirstRevision and getEarliestTime
* Rewrote countRevisionsBetween/countAuthorsBetween to avoid assuming rev_id is in chronological order
* Made countAuthorsBetween use $limit+1 automatically for convenience; updated callers
2011-04-05 20:42:45 +00:00
Alexandre Emsenhuber
2fecd3ac70 Use Html::element() to generate the element; the url and the title attribute are now build only when really necessary 2011-03-12 13:45:12 +00:00
Sam Reed
8230d93a43 Explicitally define variables 2011-02-19 21:44:20 +00:00
Sam Reed
8b1bdb6e68 Remove unreachable line in DifferenceEngine
Documentation for ObjectCache.php

Remove unused variables from CompareParsers and PreprocessDump
2011-02-18 01:06:04 +00:00
Trevor Parscal
a8b81f9a8d Grouped diff and history modules together to help reduce cache invalidation. Loaded diff styles statically. This should help with bug #27418, but I suspect there are more cases where we need to do this sort of thing before the bug is truly resolved. 2011-02-15 22:14:03 +00:00
Mark A. Hershberger
b4cee86beb w/s fixups 2011-02-12 04:06:22 +00:00
Platonides
57e0786ec3 More wfProfileOut()ing 2011-02-10 16:04:19 +00:00
Daniel Friesen
3d220be8d6 Completely remove support for legacy style skins. All legacy skinning options are now part of a SkinLegacy/LegacySkinTemplate pair that inherits from the normal SkinTemplate setup. Also ported our three built in skins to use the new legacy classes. ( ;) if you want to kill legacy skins now, you only have to svn rm 4 files) 2011-02-04 04:18:05 +00:00
Happy-melon
e147220482 Add IDs to various revdel notices for skinning. 2011-01-05 21:25:04 +00:00
Tim Starling
ccfe5ad97b Fix for bug 26561: clickjacking attacks. See the bug report for full documentation. 2011-01-04 06:12:33 +00:00
Alexandre Emsenhuber
683dcdc83a Fix fatal error from r78264 2010-12-12 20:45:32 +00:00
Sam Reed
0de35fc275 Followup r75763, fixup wrong change of deprecated method
No need to do separate htmlspecialchars et al, Xml::expandAttributes
2010-12-12 18:35:19 +00:00
Aaron Schulz
0bb1fb5cbd * Removed redundant revdelete msg above content
* Show bottom patrol link even if hook replaces preview content
* Hook doc tweaks
* Assorted minor cleanups
2010-12-11 05:32:48 +00:00
Priyanka Dhanda
5d95c385be If we only want to show the diff this should make it faster. Sort of related to to bug 25757 2010-12-10 22:47:16 +00:00
Priyanka Dhanda
3b23590869 Reverting r77516. It ain't gonna work 2010-12-06 18:21:41 +00:00
Priyanka Dhanda
8e47474df6 Fixes bug 26163 - Missing categories and iw links on diff pages. 2010-12-01 00:12:43 +00:00
Antoine Musso
e060167c57 Stylize. No differences when using: svn diff -x -wu 2010-11-27 19:01:51 +00:00
Aaron Schulz
19ec266f5a getDiffBody() cleanups:
* marked it explicitly public
* cleaned up return types on failure
* broke long lines
2010-11-18 20:34:02 +00:00
Aaron Schulz
3cb06693a9 * Moved author count check to new Title::countAuthorsBetween() function
* Added static DifferenceEngine::intermediateEditsMsg() function
* diff-multi msg use by FlaggedRevs wasn't updated after $2 param was added. Fixed this.
* Minor cleanups to getMultiNotice()
2010-11-18 00:08:37 +00:00
Alexandre Emsenhuber
f8f6417965 * (bug 24833) Files name in includes/diff/ are now less confusing
Diff.php                -> WikiDiff3.php, more descriptive
DifferenceEngine.php    -> WikiDiff.php, for consistency with the above and to make way for the file below
DifferenceInterface.php -> DifferenceEngine.php, since it contains the DifferenceEngine class
2010-11-07 16:28:11 +00:00
Derk-Jan Hartman
86baf59b9c Avoid unnecessary linebreaks in difflines. Fixes bug 25725 2010-11-01 00:14:21 +00:00
Sam Reed
39c005ca79 bug 25517 Assignment in conditions should be avoided/ http://www.mediawiki.org/wiki/Manual:Coding_conventions#Assignment_expressions 2010-11-01 00:07:17 +00:00
Derk-Jan Hartman
cf881ba76d Switch the hyphen in diff output to actually minus signs. 2010-10-29 18:52:59 +00:00
Derk-Jan Hartman
53bc659170 Add a nbsp to each empty "diff-marker".
Fixes Bug 25697
Prevent collapsed table row if both pre and post lines in the diff are totally empty.
2010-10-29 18:28:44 +00:00
Sam Reed
a2589ff8c6 Assignment in loop conditions suck
while ( $row = $dbw->fetchObject( $res ) ) { to foreach ( $res as $row ) in includes

Add some braces
2010-10-13 23:11:40 +00:00
Chad Horohoe
9e6c7cc8ef Get rid of PHP4-style constructors 2010-08-30 16:52:51 +00:00
Alexandre Emsenhuber
fb36e6ac3e * standardised file headers
* added a basic description
* added @file
2010-08-08 11:55:47 +00:00
Aryeh Gregor
74a21f3bd1 Remove most named character references from output
Recommit of r66254 to trunk.  This was just

find extensions phase3 -iname '*.php' \! -iname '*.i18n.php' \! -iname 'Messages*.php' \! -iname '*_Messages.php' -exec sed -i 's/&nbsp;/\&#160;/g;s/&mdash;/―/g;s/&bull;/•/g;s/&aacute;/á/g;s/&acute;/´/g;s/&agrave;/à/g;s/&alpha;/α/g;s/&auml;/ä/g;s/&ccedil;/ç/g;s/&copy;/©/g;s/&darr;/↓/g;s/&deg;/°/g;s/&eacute;/é/g;s/&ecirc;/ê/g;s/&euml;/ë/g;s/&egrave;/è/g;s/&euro;/€/g;s/&harr;//g;s/&hellip;/…/g;s/&iacute;/í/g;s/&igrave;/ì/g;s/&larr;/←/g;s/&ldquo;/“/g;s/&middot;/·/g;s/&minus;/−/g;s/&ndash;/–/g;s/&oacute;/ó/g;s/&ocirc;/ô/g;s/&oelig;/œ/g;s/&ograve;/ò/g;s/&otilde;/õ/g;s/&ouml;/ö/g;s/&pound;/£/g;s/&prime;/′/g;s/&Prime;/″/g;s/&raquo;/»/g;s/&rarr;/→/g;s/&rdquo;/”/g;s/&Sigma;/Σ/g;s/&times;/×/g;s/&uacute;/ú/g;s/&uarr;/↑/g;s/&uuml;/ü/g;s/&yen;/¥/g' {} +

followed by reading over every single line of the resulting diff and
fixing a whole bunch of false positives.  The reason for this change is
given in <http://lists.wikimedia.org/pipermail/wikitech-l/2010-April/047617.html>.
I cleared it with Tim and Brion on IRC before committing.  It might
cause a few problems, but I tried to be careful; please report any
issues.

I skipped all messages files.  I plan to make a follow-up commit that
alters wfMsgExt() with 'escapenoentities' to sanitize all the entities.
That way, the only messages that will be problems will be ones that
output raw HTML, and we want to get rid of those anyway.

This should get rid of all named entities everywhere except messages.  I
skipped a few things like &nbsp that I noticed in manual inspection,
because they weren't well-formed XML anyway.

Also, to everyone who uses non-breaking spaces when they could use a
normal space, or nothing at all, or CSS padding: I still hate you.  Die.
2010-05-30 17:33:59 +00:00
Mark A. Hershberger
edc744dcd9 * remove function_exists calls for things that functions that always
exist under supported versions of PHP
** assert() is always defined for DifferenceEngine()
** mail() is always defined for UserMailer()
** is_executable() is defined for Windows from PHP 5.0.0 on
2010-05-19 05:33:27 +00:00
Aaron Schulz
1c4e82f84d Moved UI diff stuff into its own DifferenceInterface file 2009-09-30 15:36:55 +00:00
Aaron Schulz
942a84716a * Split off deletedrevision (view only) right and give it to sysops
* Allow show/hide link on top revision just like history
2009-09-28 03:09:48 +00:00
Tim Starling
51e9917aa8 Fix for bug 20601: disable debug output. It can be re-enabled by patching. 2009-09-16 03:48:29 +00:00
Niklas Laxström
22f142a99c Recommit r53710 without the hack for preventing style sheets being added multiple times (is not possible with OutputPage::addStyle in the first place) 2009-08-24 05:37:40 +00:00
Brion Vibber
82b80fc483 Revert r53710 "* Allow suppressing "line 1" from the diffs, which can get quite annoying with many diffs"
Use of static variable here means that running multiple diffs during one request may mess things up. It should rather check if it's been added in $wgOut already.
2009-08-21 22:01:16 +00:00
Aryeh Gregor
3f3b9d28a2 Show change flag tooltips everywhere, not just RC
Follow-up to r54242.  Pointed out by Umherirrender on CodeReview.
2009-08-04 00:28:20 +00:00
Chad Horohoe
a2462d8fcd * (bug 16311) Make recent change flags acronyms instead of spans. Also move this crap to common, we don't need identical declarations in 5 different skins. 2009-07-29 22:15:52 +00:00
Niklas Laxström
bc43f524f7 * Don't add 200 extra css/js requests when showing 100 diffs
* Allow suppressing "line 1" from the diffs, which can get quite annoying with many diffs
2009-07-24 11:06:27 +00:00
Aaron Schulz
2a763847ca Enable show/hide link on diff to cur (consistency) 2009-07-18 02:51:41 +00:00
Siebrand Mazeland
8bc003e538 * follow-up to r51301: also add separated date and time as parameters for 'currentrev-asof' for consistency
* replace use of deprecated makeKnownLinkObj() by link()
* use array type parameter instead of string to escapeLocalUrl(), getFullURL() and getFullUrl() for readability
* change return type of htmlDiffArgument(). CHECKME: Should this method be private? (not used anywhere in SVN at the moment)
* break a few long lines with parameters
2009-06-06 15:09:19 +00:00
Tim Starling
9a1bfc924b Fix for r49412, possible fatal errors. 2009-06-03 16:33:08 +00:00
Purodha B Blissenbach
00a913cecd Message 'revisionasof' - date and time separated as of request by user "Der Umherirrende" at
http://translatewiki.net/w/i.php?title=Support&oldid=1243738#split_date_and_time
2009-06-01 20:45:46 +00:00
Tim Starling
bc35951c93 In Special:RevisionDelete:
* Refactored to remove massive duplication
* Removed page parameter and associated contextPage member variable, doesn't seem to do anything.
* Put ID lists into a single ids parameter and member variable instead of having one for each type.
* Fixed inappropriate call of Title::newFromUrl(), always wrong
* Don't pretend to use the return value from functions that don't return anything, this reduces readability.
* Use the table names for deleteKey/typeName values, they look more like English
* Use protected not private
* Remove requirement for log type to be specified in the target
* Use POST for RevisionDelete entry forms, to avoid URL size limits and issues with non-PATH_INFO URLs
* Don't purge all pages that use the given file
* LocalFile::purgeCache() already calls purgeHistory,() no need to do it again. But do call purgeDescription(). 
* Removed token from unhide=1 links, unnecessary
* Tokens are necessary on file streaming links, added them
* Fixed private data leakage due to incorrect use of LocalRepo::newFromArchiveName(). Non-existent placeholder file was returned which meant that $oimage->userCan(File::DELETED_FILE) was always true. Pass the archive name to tryShowFile() instead of the storage key.
* Using ls_field='oi_timestamp' is not correct, oi_timestamp refers to the timestamp of the revision in question, whereas the key that is stored is the timestamp of the previous revision (i.e. the timestamp in oi_archive_name). oi_archive_name would be more correct, although only half the field is used.

Elsewhere:
* Added missing message filehist-missing
* Fixed double asterisk in Status::getWikiText()
* Fixed escaping of the target parameter to Special:RevisionDelete from ImagePage
* Deleted FileStore.php. Deprecated in filerepo refactor except for get()/export() but somehow resurrected by RevisionDelete. Hopefully this will be the end of it. New interfaces will be added for wfStreamFile() in a later commit.
* Added convenience function File::getStorageKey(), factored out of Special:Undelete
* Added convenience function Revision::newFromArchiveRow(), factored out of Special:Undelete and Special:RevisionDelete
* Fixed notice in Special:Upload, uninitialised $pageText

FIXME: current revision can be suppressed on undeletion causing an unauthenticated unsuppress. Comments indicate this is a known issue. I fixed the parser cache pollution in this case but not the rest.
2009-06-01 11:37:06 +00:00
Niklas Laxström
d3b61fea7c Escaping fixes 2009-05-22 09:35:48 +00:00
Chad Horohoe
02e9f413eb Cleanup to r50310 & 50313: Don't use @ on chmod() and dl(), use wfSuppressWarnings()/wfRestoreWarnings() 2009-05-19 16:34:49 +00:00
Alexandre Emsenhuber
2a82a66505 fix E_PARSE from r50310 2009-05-07 16:51:45 +00:00
Chad Horohoe
389f46dfbe (bug 16925) Diffs no longer silently fail when $wgExternalDiffEngine is set to 'wikidiff' or 'wikidiff2' but extension is not installed. Should now gracefully fall back to the PHP diff. 2009-05-07 16:00:29 +00:00
Aaron Schulz
318783dc36 * Workaround ugly Safari/Chrome handling of <col> tags for hidden diffs (bug 18538)
* A few code style tweaks
2009-04-21 06:21:27 +00:00
Chad Horohoe
78b1818dbe No more $wgTitle in the diff engine. 2009-04-11 18:23:06 +00:00
Aaron Schulz
4b9187e598 Add convenience links for bug 18068 2009-03-22 13:26:27 +00:00
Roan Kattouw
2b9be47063 (bug 17863) Fix regression from r47890 that broke Show changes on the edit form; do this by skipping over revision loading as well as text loading when custom texts are set using setText() 2009-03-09 11:00:12 +00:00
Roan Kattouw
5349ea2dd8 * API: (bug 13209) Add rvdiffto parameter to prop=revisions
* Add $wgAPIMaxUncachedDiffs (default 1) which controls how many non-cached diffs will be served per request
* Tweak DifferenceEngine.php a bit to make cache status accessible, and remove a useless 'parseinline' which broke diff generation in the API
2009-02-28 13:25:21 +00:00
Aaron Schulz
b99b877508 Bug 17241 The diffonly URI parameter should cascade to "Next edit" and "Previous edit" diff links 2009-02-24 23:17:08 +00:00
Raimond Spekking
aa0f3bbaeb Move <div>...</div> from message text to program code for consinstency with all other messages. 2009-02-22 11:32:33 +00:00
Aaron Schulz
2437a0a1a0 (bug 5776) Add extra patrol link on bottom for diffs 2009-02-12 14:45:10 +00:00
Aaron Schulz
0821fa7da9 Added missing Revision::FOR_THIS_USER flag 2009-02-09 22:41:02 +00:00
Aaron Schulz
ad708b10eb Tweaks for bug 17060
* Don't show links to deleted revs in history for anyone (consistency)
* Always hide deleted content from all users; it can be viewed via (show/hide) links
2009-02-09 22:27:25 +00:00
Aaron Schulz
6bfaecba3b * Tweaks for bug 17052:
** Made radio button default selection fallback to the next one for deleted revs
** Use deleted diff message rather than showing an ambiguous "empty diff"
* Code style tweaks
2009-02-09 07:42:54 +00:00
Aaron Schulz
ebddcaca6a (bug 17104) Remove [Mark as patrolled] link for already patrolled revisions 2009-01-24 22:50:28 +00:00
Alex Z
b5d624f1c0 (bug 17055) Use a CSS class ('mw-revdelundel-link') for RevisionDelete "(show/hide)" links rather than hardcoded <tt><small>, reduce some code duplication by creating Linker::revDeleteLink() to make the links. 2009-01-18 21:07:09 +00:00
Aaron Schulz
8075446c1c Use getRawUserText function, since this is just there to trigger index usage for patrol link query 2009-01-15 17:33:13 +00:00
Aaron Schulz
e9fefecaed Fix for r45723 2009-01-14 00:39:43 +00:00
Aaron Schulz
92b51089ac Cleaned up single rev page diffs (bug 11527) 2009-01-14 00:26:21 +00:00
Aaron Schulz
220c59be9a (bug 16923) New parameter value diff=review for the URL 2009-01-07 21:09:18 +00:00
Aaron Schulz
82c0328abf Tweak r45314: just return out 2009-01-02 15:56:33 +00:00
Aaron Schulz
19024619f6 (bug 9243) Avoid exit to make MW handle page exceptions properly 2009-01-02 11:36:52 +00:00
Alexandre Emsenhuber
8c14e2df88 * Like r44911 but for MediaWiki:Difference message: switching from raw HTML to wiki text
* Whitespaces tweaks
2008-12-23 17:14:33 +00:00
Aaron Schulz
39bd0c75d5 Use more thorough Title->userCan('patrol') 2008-12-17 07:17:59 +00:00
Siebrand Mazeland
0a9af4a884 Consistent casing for addHTML() 2008-11-06 22:20:29 +00:00
Jack Phoenix
3eb0e98e2c adding AbortDiffCache hook to allow canceling the caching of a diff 2008-11-06 21:41:07 +00:00
Tim Starling
90ed80443e (bug 12586) Use wfHostname() everywhere, remove $wguname and $wgNodeName. Use getenv('COMPUTERNAME') on Windows. 2008-10-06 07:30:38 +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
Raimond Spekking
e9ad9393cf Move the timestamp into the message of the current revision link to make the link consistent with the link to the previous version on the left side 2008-08-27 18:23:03 +00:00
Raimond Spekking
b4e72cf141 Fix for r40041. PHP strict notice. Thanks to Ialex 2008-08-26 20:23:53 +00:00
Raimond Spekking
657831a2f5 * Add tooltips to rollback and undo links
At least on de.wiki the users with the review right have the rollback right too. They are confused about the difference rollback/undo. Hope that helps a bit
2008-08-26 20:06:57 +00:00
Chad Horohoe
0524aef5b6 * Add all HTMLDiff-related classes to the autoloader.
* Move all stuff @ingroup DifferenceEngine to /diff
* Split off Node and friends to Nodes.php to make HTMLDiff.php shorter.
2008-08-25 20:19:00 +00:00
Renamed from includes/DifferenceEngine.php (Browse further)