Commit graph

220 commits

Author SHA1 Message Date
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/ /\ /g;s/—/―/g;s/•/•/g;s/á/á/g;s/´/´/g;s/à/à/g;s/α/α/g;s/ä/ä/g;s/ç/ç/g;s/©/©/g;s/↓/↓/g;s/°/°/g;s/é/é/g;s/ê/ê/g;s/ë/ë/g;s/è/è/g;s/€/€/g;s/↔//g;s/…/…/g;s/í/í/g;s/ì/ì/g;s/←/←/g;s/“/“/g;s/·/·/g;s/−/−/g;s/–/–/g;s/ó/ó/g;s/ô/ô/g;s/œ/œ/g;s/ò/ò/g;s/õ/õ/g;s/ö/ö/g;s/£/£/g;s/′/′/g;s/″/″/g;s/»/»/g;s/→/→/g;s/”/”/g;s/Σ/Σ/g;s/×/×/g;s/ú/ú/g;s/↑/↑/g;s/ü/ü/g;s/¥/¥/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
Alexandre Emsenhuber
b382c38827 * (bug 18499) Added "enhanced" URL parameter to switch between old and enhanced changes list 2010-04-03 14:48:25 +00:00
Andrew Garrett
e36e6bfe1b Make a few more protected functions public, so they can be called from hooks 2010-02-08 04:49:34 +00:00
Sam Reed
b6e0df246f Attempt at normalistion of comparison styles - empty string on left and right hand side normalised to it being on the rhs
Before this change, there were (? being regex 0 or 1)

"" ===? 1
'' ===? 24
"" !==? 8
'' !==? 32

== "" 14
== '' 344
!= "" 9
!== "" 4
!= '' 151
!== '' 85


Rhs was the much more common, and the preferred style by many developers.. (Was a similar discussion in #mediawiki recently.. After that lolbugreport i think)

Where there is a string (non empty) on the lhs, and variable/method call on the rhs still need normalising
2010-01-06 19:59:42 +00:00
Alexandre Emsenhuber
60a11e5035 Fix some doxygen warnings 2010-01-05 21:24:23 +00:00
Raimond Spekking
fd1a0818e3 Consistency tweak: coalesce diff/hist links with pipe instead of () () 2009-12-30 10:42:03 +00:00
Chad Horohoe
a4e5e935b6 Mass convert NULL -> null. Left strings and comments alone, obviously. 2009-12-11 21:07:27 +00:00
Aaron Schulz
ffd4b0f837 Refactored unmaintainable userCan() code by making central userCanBitfield() functions 2009-10-15 11:31:33 +00:00
Aaron Schulz
89dfbe1587 call static function statically 2009-10-15 09:55:53 +00:00
Andrew Garrett
3b83ca63c9 Same fix as r57530, except done correctly 2009-10-09 21:33:11 +00:00
Aaron Schulz
6309a1f175 Follow up r57530 elsewhere 2009-10-09 19:01:39 +00:00
Aaron Schulz
c2f7ea4d7b * Renamed deletedcontent to deletedtext
* Removed deletedrevision and used deletedhistory/deletedtext instead
2009-09-30 19:50:35 +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
Alex Z
b9f44792f4 Fix for r55393, put the padding:0 on the td's rather than the tables 2009-09-17 23:04:54 +00:00
Niklas Laxström
e2d4f3af86 Minor style 2009-09-13 15:28:35 +00:00
Alex Z
eb62ec3e70 Update ChangesList output for enhanced changes to use CSS instead of obsolete attrbutes and elements (cellpadding, <tt>, etc.)
The test page I was using successfully validated as HTML 5 :)
Tested for signs of obvious regressions in FF 3.5, IE8, Opera 9.64 and Safari 4.0.
Supposedly, the border-spacing property isn't supported by IE, but I didn't see any obvious issues when testing,
so either the information I got was wrong/outdated, or its not actually necessary here. Needs testing in IE6/7 to verify.
If I did everything right, there shouldn't be any visible changes, save maybe a couple trivial spacing quirks.
2009-08-20 21:06:24 +00:00
Aryeh Gregor
7aa4a8f90c For HTML 5, drop type="" attributes for CSS/JS
This time done in a nice, centralized fashion, reducing LOC for callers
even if HTML 5 is disabled.  The implementation is a new Html class,
similar to Xml but intended to be HTML-specific from the beginning
instead of half-heartedly attempting to provide generic XML services but
actually with lots of HTML-specific stuff tacked on.

As part of the new Html class, a global config option $wgWellFormedXml
is added.  It's set to true by default, but if set to false, the Html
class will drop some things that HTML 5 doesn't require, like
self-closing " />" syntax and attribute quotation marks (sometimes).
2009-08-11 00:09:24 +00:00
Aryeh Gregor
df8eec9112 Make sure to parse RC legend label inline
Avoids unnecessary <p> tags.  Pointed out by Nikerabbit on CodeReview
for r54337.
2009-08-05 00:38:11 +00:00
Aryeh Gregor
258450346e Fix flag legend for watchlist from r54336 breakage
Mistake pointed out by Darth Kule on translatewiki.net, conveyed to me
by Nikerabbit.  I changed the semantics of a message but didn't update
all the callers.
2009-08-04 10:59:35 +00:00
Aryeh Gregor
34c814e791 Only show useful info in RC legend
This splits up the message recentchanges-label-legend so that pieces of
it can be provided only when they're relevant, and more can be added
later.  Any existing translations will need to be retranslated, but it's
only been a day, so creating a new message name seemed like overkill.

Follow-up to r54242.
2009-08-04 00:48:45 +00:00
Aryeh Gregor
2ea241d23f Add legend and tooltips to explain RC flags
Based on a patch submitted by svip on IRC.  I also changed the <span>
for unpatrolled into an <abbr>, and created a new message in case anyone
wants to localize !, for the sake of uniformity.
2009-08-02 22:15:55 +00:00
Andrew Garrett
854a37a73a LiquidThreads code quality, bug fixes and cleanup:
* Remove large swathes of dead code, hooks that have never existed, and dormant methods.
* Remove the TalkpageArchiveView, which has been inaccessible from the UI for ages.
* Break most miscellaneous hooks out into their own file, classes/Hooks.php
* Float the reply link on the RHS.
* Organise the hooks section of LiquidThreads.php somewhat.
* Remove deprecated =& syntax in some places.
* Move scratchTitle and related methods into Threads class instead of View class.
* Kill home-grown revision insertion code from leaveTrace, and rewrite it to use Article::doEdit
* Internal documentation, variable naming as appropriate.
* Remove special-case handling for links, unnecessary now.
* Fix customizeOldChangesList, it looks like it was never properly tested. Even if it had worked, it would have put (not by the author) on every edit to a post.
* Fail fast when trying to move a non-toplevel thread.
* Add rollback, extra links to the end of new-thread recentchanges entries.
2009-07-31 10:59:11 +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
Raimond Spekking
135e87fb3e (bug 18161) Fix inconsistent separators in watchlist link toolbars with "enhanced recent changes" 2009-07-21 11:18:27 +00:00
Siebrand Mazeland
88d789e939 * replace some use of deprecated makeKnownLinkObj() by link() in core
* use array type parameter instead of string to escapeLocalUrl(), getFullURL() and getFullUrl() for readability
2009-06-06 22:42:48 +00:00
Aaron Schulz
6496378f85 (bug 18772) Removed redundant 'deletedrev' message instances 2009-05-26 12:29:16 +00:00
X!
ec70a23aa7 Modification of r50714, adding element to the li class, rather than a separate div class. 2009-05-26 11:03:50 +00:00
Niklas Laxström
d3b61fea7c Escaping fixes 2009-05-22 09:35:48 +00:00
X!
625b0affd5 Watchlist now has a specialized <div> tag that contains a unique class for each page 2009-05-18 01:12:52 +00:00
Aryeh Gregor
5512ee6ad4 Fix braindead wrong escaping from r49017, r49018
URL encoding != HTML encoding!

Thanks for report by Tbleher at:

http://www.mediawiki.org/wiki/Special:Code/MediaWiki/49017#c2228
2009-04-19 17:07:41 +00:00
Niklas Laxström
eb1c7640db * Skip the plural parsing for bytes also when not in miser mode and the message is not customised 2009-04-07 06:47:45 +00:00
Niklas Laxström
c0b8603ca6 * (bug 18377) Time in Enhanced ChangesList lacking localisation 2009-04-07 06:43:39 +00:00
Aryeh Gregor
8dccd7be37 Remove unused var 2009-03-29 20:29:54 +00:00
Aryeh Gregor
f1ca9cb441 Pass query directly to getLinkUrl() 2009-03-29 17:13:13 +00:00
Aryeh Gregor
7508ef184e Remove a couple of link() calls in enhanced RC
diff and cur links are now created using raw HTML instead of link(),
which they didn't really need anyway.  I didn't see any other obvious
candidates for conversion to raw HTML, since other things tend to need
fancy classes and have lots of other logic.  It's possible link() could
be made faster, too.
2009-03-29 17:09:47 +00:00
Aryeh Gregor
e53d3fe26e Use link() instead of make*Link*()
Preparatory to some optimization work.  Also fix a bug in last commit,
so if this causes problems, revert that one too.
2009-03-29 16:02:16 +00:00
Aryeh Gregor
f4ad19c670 Remove some makeKnownLinkObj() invocations in RC
Was being called for all rows, then thrown away for any rows that
weren't normal edits (logs, etc.).
2009-03-29 15:37:47 +00:00
Domas Mituzas
bf1401c262 fix some of RC rollback madness:
* Avoid extensive permission checks, just rely on User::isAllowed("rollback")
* Preload page_latest data in initial RC query, no need to run thousands of queries afterwards
2009-03-29 11:02:16 +00:00
Domas Mituzas
156e8ab0ab don't do custom number formatting for bytes changed in misermode 2009-03-29 10:11:19 +00:00
Aaron Schulz
c78113b7cd Redundancy/perm cleanups to insertRollback() 2009-03-03 20:12:37 +00:00
Alexandre Emsenhuber
45bb5b19b2 * Add some profiling
* Set the title for the revision created in ChangesList::insertRollback() so that it doesn't need an extra query to fecth it
2009-02-20 13:00:58 +00:00
Andrew Garrett
2c06966b97 Implement tag display for EnhancedChangesList -- TODO implement the CSS styling of tags for EnhancedChangesList. Incidentally, why do we have two methods for formatting a diff for EnhancedChangesList? 2009-02-18 04:39:52 +00:00
Siebrand Mazeland
3abcb9db01 * Recommit r39503. (bug 14468) Lines in classic RecentChanges and Watchlist now have classes "mw-line-odd" and "mw-line-even" to make styling using css possible. Implemented in OldChangesList::recentChangesLine using an additional parameter, while keeping behaviour for other uses unchanged. Did not see any use adding this to ChangesList::recentChangesLine.
* keep RELEASE-NOTES lines under 80 characters
2009-02-08 15:55:32 +00:00
Andrew Garrett
aa5bd3f47a Abuse Filter changes designed for testing filters against real data:
* Add searching and filtering functionality to the existing 'test' interface.
* Add an 'examine' interface designed for testing filters against a previous change, selectable through the search interface in either the 'test' or the 'examine' view.
* Minor enabling change in ChangesList core, to allow subclassing.
2009-01-29 22:44:31 +00:00
Aaron Schulz
8794e3f68f Use quickUserCan() at some possible performance hotspots (rollback links). Unlikely for anyone to notice anything except maybe getting a permission error once every blue moon. 2009-01-28 23:55:17 +00:00
Andrew Garrett
534621729c Add Special:AbuseFilter/test, which allows (trusted for now, due to DoS potential) users to enter a filter, and have it checked against the last 100 RecentChanges items while-u-wait.
Some related cleanup to change tagging in ChangesList.
2009-01-28 23:54:41 +00:00
Andrew Garrett
9a3c1fcede Branch merge of change-tagging branch with trunk
-- Introduce tagging of individual changes (revisions, logs, and on recentchanges). The tags are customisable, and currently settable by the Abuse Filter and by the TorBlock extension. The tags can be styled on the various pages on which they appear.
-- Introduces a schema change, three new tables (valid_tag, change_tag, and tag_summary).
2009-01-28 19:08:18 +00:00
Alexandre Emsenhuber
0218809728 * fix usage of 'number_of_watching_users_RCview' message to correspond with the other one in the same file
* use $this->message['hist'] rather than wfMsg( 'hist' )
* Whitespaces tweaks
2009-01-25 16:34:21 +00:00
Aaron Schulz
6221858e83 * Added rollback links to changes lists (bug 9305)
* Remove commend code duplication
2009-01-20 04:01:59 +00:00
Aaron Schulz
6059b4d6ad Minor code style tweaks & cleanup 2009-01-09 23:18:47 +00:00