Commit graph

246 commits

Author SHA1 Message Date
Mark A. Hershberger
0a49fd69b0 Misc EOL w/s and spaces-instead-of-tabs fixes. One day I'll get around to nagging people for this stuff, but for now, I'll JFDI myself. 2011-05-25 15:39:47 +00:00
Niklas Laxström
26281d4753 Quick unbreak r88495: initialising the variable caused it not to be filled with messages 2011-05-21 20:39:31 +00:00
Sam Reed
b214f9dd40 Whitespace
Documentation

Other related stuffs
2011-05-20 22:03:10 +00:00
Chad Horohoe
783d4e0862 Remove @static from all over the place. That's what the static keyword is for, this being PHP5 and all 2011-04-21 00:07:09 +00:00
Happy-melon
2c9cfd7cce Refactor the factory/i18n/list/etc static methods from SpecialPage into their own class; there's no reason we need to be parsing them in every single SpecialPage subclass. Leave all the methods as stubs in SpecialPage.php; if we required PHP 5.3 they could be replaced by a a __callStatic() magic method, but that doesn't work on PHP 5.2.
Also make a few changes to the functions available.  SpecialPageFactory::resolveAlias() now takes an optional subpage and returns array(<name>,<subpage>).  Similarly merge getPage() and getPageByAlias().  There were many examples of (extensions particularly) making dubious assumptions about the presence or absence of subpages or canonical-ness.

I didn't deprecate SpecialPage::getTitleFor() as it's got over six hundred calls.  I'm rather undecided on the best position of getPage()/executePath().  Although the latter needs cleanup anyway.
2011-04-17 11:31:11 +00:00
Sam Reed
bbf79a20ba Documentation, fix indenting 2011-04-04 21:23:22 +00:00
Daniel Friesen
ed776e618b Followup r85229; Drop this unnecessary reference on the user from ChangesList::newFromUser. 2011-04-03 11:33:10 +00:00
Chad Horohoe
232288831d Merge some deployment changes to trunk: r82738 (as HISTORY), r81962 2011-03-30 14:33:37 +00:00
Sam Reed
64be8c7b26 Ununsed variables
Documentation and explicit definitions
2011-02-23 12:35:41 +00:00
Happy-melon
9466a35de5 Follow-up r79084: synchronise keys. 2010-12-27 20:02:10 +00:00
Happy-melon
172703c264 Follow-up r79083: Fix notices on TW. 2010-12-27 19:50:51 +00:00
Happy-melon
ca15303c81 Refactoring in RecentChanges/Watchlist:
* Use new jQuery/RL collapsible implementation, remove legacy JS.
* Refactor ChangesList::flag() and ChangesList::recentChangesFlags(), the latter to now take an array rather than a growing list of out-of-order parameters.
* Resolve the FIXME requested in r44421 (just passed its second birthday :D) by replacing extract() calls with direct references.
2010-12-27 19:07:28 +00:00
Krinkle
a987ea008e Reverting r78889 and r78865. Breaks changeslist on translatewiki (unpatrolled-flag exclamation mark popping up on page histories and and diff-views where they shouldn't instead of an 'm' for minor)
-  = ChangesList::flag( 'minor' );
- The jquery effects plugin and collapsible implementation, also in those commits, are redundant now.
- If/when skins.commons is needed again, we can simply add that part back in.
- (r78891 is not reverted because the file it altered was deleted while r78865 was -merged)
2010-12-25 00:29:41 +00:00
Happy-melon
b4fdf95c91 Follow-up r78865 CR; restore arrow helper functions, fixing fatal on TWN. 2010-12-23 15:03:24 +00:00
Happy-melon
023debde16 (bug 17456) implement CollapsibleTables in core javascript. Using ResourceLoader/jQuery, this is now able to replace not only the ubiquitous collapsible tables in articles ([[mw:Manual:Collapsible tables]]), but also most of the other places we collapse things as well, like the enhanced Watchlist/RecentChanges feed. 2010-12-23 00:06:58 +00:00
Sam Reed
cadc951d15 More reversion of r77297, 1 of 2 commits to keep it readable in CR (hopefully) 2010-11-25 22:24:11 +00:00
Antoine Musso
6fe29c9c30 revert r76464
* mixed style changes and variable removing
* logic changes
* useful comments removed
2010-11-25 20:01:34 +00:00
Sam Reed
10ecfeb03b Various unused variables, add some braces
Explicitally define some variables used in hook type calls
2010-11-10 19:49:04 +00:00
Raimond Spekking
40c6d6a31b Fix per Brion's CR r76342: Avoid spaces get normalized between the 2 different classes 2010-11-09 08:07:43 +00:00
Raimond Spekking
a2121f351b Add CSS classes (including namespace and pagename) to the enhanced recent changes/watchlist entries
The old RC/WL have such classes since ages.
2010-11-08 21:21:32 +00:00
Niklas Laxström
17e2351dcd Remove the redundant legend line from recent changes and watchlist. The symbols itself contain tooltips. 2010-09-19 12:12:32 +00:00
Alexandre Emsenhuber
193576bf54 Dox fix: ChangesList is used for watchlist, not what links here 2010-09-14 20:12:56 +00:00
Niklas Laxström
18ba9d1f1b Fix warning from r72349, $script is no longer used. 2010-09-11 14:26:37 +00:00
Platonides
0c52065dac Follow-up r72349.
Remove unused globals $wgStylePath, $wgStyleVersion, $wgUser and the no longer used $wgJQueryOnEveryPage.
2010-09-04 13:27:12 +00:00
Roan Kattouw
32377424b9 Merging resourceloader branch into trunk. Full documentation is at http://www.mediawiki.org/wiki/ResourceLoader and a general overview has been posted on wikitech-li <http://lists.wikimedia.org/pipermail/wikitech-l/2010-September/049253.html>. One important change is that all JS is now loaded at the bottom, so any scripts assuming things from wikibits or whatever are present will fail. 2010-09-04 04:00:09 +00:00
Alexandre Emsenhuber
7b79d94515 * Standardised file description headers
* Added some descriptions
* Added @file where needed
2010-08-14 17:42:40 +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
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