Commit graph

191 commits

Author SHA1 Message Date
Brion Vibber
1e23b9f54b Add debug comment to diffs indicating generator backend, node, and time.
May help tracking down the awful bugs we've been seeing more of lately.
2008-04-25 22:52:05 +00:00
Rotem Liss
8e78d4c162 Don't show an undo link in the diff page when one of the revisions is deleted, since the undo page shows an error on such revisions. 2008-04-23 16:46:31 +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
c5403c94c9 valign='top' 2008-04-15 17:57:32 +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
Victor Vasiliev
516be01b35 * Hide (undo) link if user isn't able to edit page 2008-04-12 17:58:58 +00:00
Niklas Laxström
01f530ca0e * Small cleanups 2008-04-06 18:16:38 +00:00
Aaron Schulz
dd724a817b Return '' to avoid vague cryptic error message when a user lacks permissions 2008-03-31 18:01:39 +00:00
Niklas Laxström
79d45992fb * (bug 13466) White space differences not shown in diffs 2008-03-21 11:48:24 +00:00
Aaron Schulz
9107a2d0dd Check permissions before using cache (bug 9432) 2008-03-18 23:36:24 +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
Alexandre Emsenhuber
29dc949221 (bug 12882) Adding a <span class="patrollink"></span> arround "Mark as patrolled" link on diffs 2008-03-14 22:50:09 +00:00
Tim Starling
377561cd1e * Introduced OutputPage::addWikiMsg() and OutputPage::wrapWikiMsg(), to make it easier to avoid double-parsing. Double-parsing introduces differences between the old and new parsers.
* Used the new functions in the relevant places throughout the core. Where this was not possible, used wfMsgNoTrans() to avoid double-parsing.
* Calling wfEscapeWikiText() on a title before passing it to a message is unnecessary and causes bugs. The best idea is to let the message do its own escaping. Removed wfEscapeWikiText() from the caller of addedwatchtext, removedwatchtext, deletedtext, protect-text, nosuchusershort and movepage-moved. Updated all message files to use <nowiki>$1</nowiki> where appropriate in these messages. 
* Removed unnecessary empty message handling from semiprotectedpagewarning
* Removed nonsense warning about the output of wfMsg() not being safe for inclusion in HTML. 
* Changed wfShellExec() to use passthru/ob_get_contents instead of exec(). This avoids corruption of whitespace in the response. 
* Added $wgValidateAllHtml feature, to optionally validate HTML on output. 
* Fixed missing newline in cascadeprotected in MessagesEn.php
* Belatedly updated addedwatchtext to take account of the new "monobook" skin. No unwatch link in the sidebar anymore.
2008-02-18 07:25:35 +00:00
Aaron Schulz
dc46a2e065 Give usertext so that user,timestamp index can be used. Should require less to scan that just the timestamp index. 2008-02-17 20:13:00 +00:00
Brion Vibber
0a04fb1ed5 * (bug 12148) Text highlight wasn't applied to cleanly deleted and added
lines in diff output

Note this still has to be replicated in wikidiff2
2007-12-06 21:35:01 +00:00
Daniel Cannon
e041a05707 Minor typo in r27809. Add space before "(edit)" link on old revision in diff. 2007-12-06 08:56:10 +00:00
Brion Vibber
9ecc621a91 Revert r28136; overlong title prefix obscures page title in tabs, window lists, etc 2007-12-04 20:47:52 +00:00
Raimond Spekking
4f148faea5 * Add descriptive <title> to revision difference page
* Move message 'difference' in language files to recentchanges section as it is only used in RecentChanges.php now.
2007-12-04 10:56:29 +00:00
Victor Vasiliev
c1e259c8d7 * Fix rvdiffformat=array
* Fix notice about undefined index in ArrayDiffFormatter
2007-12-01 09:08:02 +00:00
Roan Kattouw
537f7ea5b3 API:
* Adding rvdiffformat parameter to prop=revisions
* Creating formatters for unified (UnifiedDiffFormatter) and array (ArrayDiffFormatter) diffs
2007-11-27 21:36:43 +00:00
Roan Kattouw
d94ca2e5e6 Fixing DiffFormatter so it actually outputs valid diffs. 2007-11-26 18:39:40 +00:00
Aaron Schulz
60255eef1f * Don't cache diffs with deleted content
*Add show/hide links for people with 'deleterevision' rights
* Clean up formatting of diffs with deleted content
2007-11-24 01:40:37 +00:00
Andrew Garrett
2588e553b4 * Fix up RELEASE-NOTES from previous commit (confused commit message with RELEASE-NOTES)
* Fix a bug where css/js pages were displayed normally, and were causing havoc with embedded html in user css/js subpages (a la http://en.wikipedia.org/w/index.php?title=User:AzaToth/differror.js&diff=163690181)
2007-10-11 00:53:45 +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
Greg Sabino Mullane
66f12e7209 Don't pass getTimestamp output directly to the db without a wrap. 2007-09-09 18:31:21 +00:00
Tim Starling
3a57f51b05 Fixed the diff cache purge feature:
* Made it work with the anon-only confirmation form. 
* Fixed data flow issue (removed reference to $wgRequest in DifferenceEngine.php)
* Made it actually purge rather than just skip the cache one time
2007-09-07 23:07:07 +00:00
Aryeh Gregor
9f58c7f05a Tweak comment text 2007-09-05 13:48:45 +00:00
Aryeh Gregor
bb2defa8f7 Add comment for r25525 so future devs don't think their predecessors have been smoking something. 2007-09-05 13:43:19 +00:00
Domas Mituzas
213c894a56 be resourceful, instead of creating new indexing bloat, use existing indexes. 2007-09-05 08:11:30 +00:00
Tim Starling
e46376b056 In the diff column headings, Use divs with id attributes instead of <br/>, for easier site/user javascript hacks. Patch by Carl Fürstenberg. 2007-09-02 17:13:03 +00:00
Rob Church
4280f45ccc * (bug 10793) Show patrol links on all eligible diff pages
* Introduce RecentChange::newFromConds() to support the above, and a new index
* Refactored some bits
2007-08-06 03:29:40 +00:00
Rob Church
5dd2927e94 * (bug 10805) Fix "undo" link when viewing the diff of the most recent change to a page using "diff=0"
* DifferenceEngine::loadRevisionData() wasn't updating $mNewid when loading the newer revision, which doesn't make too much sense if it ends up left as 0 (which is impossible)
2007-08-04 19:15:18 +00:00
Rob Church
4aaa56665c Skip the difference engine cache when 'action=purge' is used while requesting a difference page, to allow refreshing the cache in case of errors 2007-07-22 23:37:01 +00:00
Brion Vibber
4c29b6ef12 Revert r23999 -- too-specific class names are annoying and unmaintainable.
This is CSS -- use selectors for that!
2007-07-11 14:50:03 +00:00
Raimond Spekking
d0405e1ed1 Adding a few CSS classes per request on de.wiki 2007-07-11 11:31:46 +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
Brion Vibber
ccb2a064fc * (bug 9948) Workaround for diff regression with old Mozilla versions
Use JS to detect old Gecko versions known to have bogus implementation of overflow: auto for vertical sizing <div>s in table cells and change it to overflow: visible for an ugly but more-or-less-legible fallback behavior.
2007-06-13 20:08:19 +00:00
Brion Vibber
63badd2b1d Forgot to bump the cache version when making RTL fixes 2007-05-17 21:04:50 +00:00
Brion Vibber
8315cbe263 * Right-align diff line numbers in RTL language display
Use .diff-lineno class instead of hardcoding a <strong> and an alignment. Leaving default alignment does the right thing in both LTR and RTL; forcing left was unnecessary.
Also swapping alignment for the +/- marker column to improve look on RTL.
2007-05-17 18:33:00 +00:00
Brion Vibber
b17e44b367 Fix a couple regressions due to diff style changes, where diffs were shown unstyled:
* move the addition of common/diffs.css from showDiffPage() to showDiff() which catches most 'legit' cases
* hack it in to a couple of uses where getDiff() is used and manually spit out
* hack around the hacked-up custom diff table in Oversight... that should be refactored in the base class
2007-05-16 21:57:55 +00:00
Brion Vibber
e7c73bda54 Add a version constant for diff cache so it can be cleared on major updates.
Added a release note for a related diff bug
2007-05-16 19:10:41 +00:00
Brion Vibber
4376a04946 * (bug 1438) Fix for diff table layout on very wide lines.
Diff style rules have been broken out to common/diff.css,
  and the dupes removed from the default skin files.
  Skins can still override the default rules.

Improvements over r22192, now known to work in:
* Firefox 2.0.0.3
* Opera 9.10 and 9.20
* Safari 2.0.4
* Konqueror 3.5.6
* MSIE/Win 7.0 (wide cells may produce vertical scrollbars as well)
* MSIE/Win 6.0 (wide cells are cropped instead of scrolling)
* MSIE/Mac 5.2.3 (wide words break instead of scrolling)
* iCab 3.0.3 (some cells provoke unnecessary horizontal scrollbar)

I've cleaned up the diff table formatting a bit, moving some attributes
from the HTML to the style sheet and consolidating the duplicated styles
into a common/diff.css file which is conditionally loaded for diff views.

Individual skins or site/user CSS can still override that style if they wish.
2007-05-16 17:57:00 +00:00
Brion Vibber
1291682170 Fix regression in even sizing of diff columns; forgot to restore a couple bits I removed when experimenting. 2007-05-16 13:59:23 +00:00
Brion Vibber
6213efe017 * (bug 1438) Fix for diff table layout on very wide lines for Gecko and
Opera-based browsers (incomplete, does not fix KHTML or MSIE)

This adds a <div> inside the <td> for diff content cells, and declares
the style for these <div>s to have overflow: auto.

In Gecko (tested Firefox 2.0) and Opera (tested 9.10 and over) this does
two things:
* The table layout treats the cells as the requested width instead of bloating
  out to the widest line of content, so the table stays visible on screen
* The individual cells that are too long get horizontal scroll bars

Unfortunately this doesn't have the hoped-for effects in other tested browsers:
* MSIE 7
* Safari 2
* Konqueror 3.5
* iCab 3

But neither has it any ill effects, so... it's a start.
There's probably some other way to force the layout algorithm to behave
that I haven't quite stumbled on yet... Might have better luck with the
fixed table layout option, though that seems less friendly to the little
+ and - columns.

The C++ diff plugins will have to be updated to support this scheme, but
no harm will be done if they're not (just they won't do anything new).
2007-05-15 21:24:56 +00:00
Nick Jenkins
113bb1c772 Documentation tweaks to help documentation systems (Doxygen + PHPDocumentor)
pick up the appropriate tags, and documentation blobs for classes. This is 
the same as per r20769, but with the grouping changes (e.g. removing "@{{") omitted.
Please be advised that more related documentation tweaks may follow later - e.g. 
Doxygen generates a log file of warnings that is 574 Kb in size, when run over 
the just the trunk/phase3 code ... eek! Thankfully, much of that is just 
whining about functions without documentation   ;-)
2007-04-04 05:22:37 +00:00
Aaron Schulz
0fe87673b7 *Re-add r20317 with support for older URL param, rename "undoto" to just "undo" 2007-03-28 19:41:53 +00:00
Brion Vibber
3a6ac5a3c3 Revert r20769: we don't use PHPDocumentor anymore, we use doxygen.
If making mass changes to tweak to its preferences, probably better to do it for the tool we actually generate docs with. :)
2007-03-28 14:16:43 +00:00
Nick Jenkins
5fef2333d4 PHPDocumentor [http://en.wikipedia.org/wiki/PhpDocumentor] documentation tweaking stuff.
Minor doc tweaks to prevent some PHPDocumentor warnings or errors when run on the includes/ directory. PHPDocumentor uses a syntax very similar to javadoc - mostly we already use this, but there were a few scattered places that were adjusted to make them consistent with the rest of the code. In practical terms, these changes were made:
* @url becomes @link
* @fixme becomes @todo
* HTML tags in descriptions must be closed / balanced.
* @bug was removed (where the bug was long fixed), or changed into a @todo (in the few situations where the bug was still pending)
* @obsolete becomes @deprecated
* Things like "/**@{{" and "/**@}}*/" which cause "unknown tag" warnings were removed
* @access must be a valid access level.
* @desc tag not needed, removed.
* Doesn't seem to like @licence, will accept @license however.
* Use full comment block notation in a few places (i.e. open block with "/**", start each line with " *", and end block with " */")

Then additional to this, to get some class docs associated with their respective classes:
* Moved some docs to right above those classes (deleting blank lines, or moving descriptions from the file headers)
* Marked some classes without docs as "@todo document"
* (done up to "class MIMEsearchPage" on the "classtrees_MediaWiki.html" page for the includes/ directory)
2007-03-28 08:53:02 +00:00