Commit graph

44 commits

Author SHA1 Message Date
Dereckson
a1e602a939 (bug 40072) Add semantic CSS classes to identify changes list items
In the special pages containing changes list, adding the following
CSS classes to revision rows:
    - mw-changeslist-date
    - mw-changeslist-title
    - mw-changeslist-separator (matching the dots, ". .")

This enhancement has been implemented to the following special pages:
    - [[Special:Contributions]]
    - [[Special:DeletedContributions]]
    - [[Special:RecentChanges]]
    - [[Special:Watchlist]]

It's also implemented on pages history.

Change-Id: I2385ef21d9aed4bdbe4971bfcfa28efaf058e7dd
2012-09-07 22:46:56 +02:00
Alexandre Emsenhuber
701ade0a49 Follow-up I774a89d6 (2fabea7): use $this->msg() in HistoryAction
Change-Id: I308cc8b2e78eab1f2a14b5ade3867216ea3c2525
2012-08-19 08:58:23 +02:00
Siebrand Mazeland
08ba7a001d Fix syntax error.
Change-Id: I76904b609dbc11d11d00bc375ae8587a4ef4848c
2012-08-18 17:11:36 +02:00
Alex Monk
2fabea7eea Use wfMessage instead of deprecated wfMsg*
Or $this->msg in special pages.

Change-Id: I774a89d646615053c8424050e42ad95601f92543
2012-08-18 14:11:05 +02:00
Alexandre Emsenhuber
22f10ef350 For consistency of the interface, don't do expensive checks on page view.
Also replaced two $this->getUser() calls with $user since that variable is
already in that method.

Change-Id: Iccda9f44a9cf6d3187895a8b6111bc62dca1e811
2012-07-14 21:30:49 +02:00
umherirrender
fbc354d110 Use Revision::getParentLengths in history
Using new method from I6e388e75

Change-Id: I902dd1e2699c7291c49cd68fce271941ff4c6e34
2012-07-07 16:45:24 +02:00
Alexandre Emsenhuber
026e8534c6 Add a context parameter to Liker::generateRollback() and Linker::buildRollbackLink() and updated callers.
This allows both methods to not always rely on global object, but also to use the local context when possible.

Change-Id: Id10f55ed9b18c889afd8d9937d9f35acb376cce4
2012-07-05 23:10:03 +02:00
Brad Jorsch
c1bf80f8df (bug 36788) Add classes to containing row on watchlist/history
Each line on the watchlist and on the history pages should have a
specific class to indicate the "updated since my last visit" status,
to allow for more comprehensive styling than is possible with individual
elements embedded within the line.

Also some cleanup: turn the $classes variable in the enhanced watchlist
code path into an array, and change the bolding of titles in the
watchlist from <strong> tags to styling via CSS.

Change-Id: I90bc95db061274d4de782578a4e91f954481adfd
2012-07-01 23:28:21 -04:00
Mormegil
0be8b84299 (bug 15853) Wrong entries in history feed
The history feed for a non-existing page fetched revisions for
rev_page=0. Even though there should be none in the database,
there obviously are, which means such feeds are full of spurious
entries.

Added an existence check, fetchRevisions now returns an empty result
for non-existent pages, which is (and has always been) handled
gracefully in feed() by emitting feedEmpty().

Change-Id: Iae892d900239030bc249c829faecb1bcb3672db2
2012-06-09 23:30:46 +02:00
awjrichards
c29fd59775 Big oops - merged to wrong branch.
Revert "Revert to arbitrarily old point before initial remote branch creation to help clean up"

This reverts commit ee0d3d330f
2012-06-05 22:58:54 +00:00
awjrichards
ee0d3d330f Revert to arbitrarily old point before initial remote branch creation to help clean up
Change-Id: I41a3d1e55d3ea9dffa42451237fe065f9334361d
2012-06-02 08:43:04 -07:00
Liangent
6eac0a40cf setSquidMaxage() globally if we can purge it, instead of in actions.
Change-Id: I404c994616eab0902a9e3650c97028e9bcfb22db
2012-06-04 14:46:36 +08:00
Alexandre Emsenhuber
2c7bf8b8b8 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ie95c594fcd686ef30dadc7574d3e5b47236a8638
2012-06-03 22:54:44 +02:00
Kevin Israel
9c349d3176 (bug 35069) Keep history line from ending ' . . '
The portion of the history line after the character difference is now
added immediately before running PageHistoryLineEnding hooks, allowing
the omission of the ' . . ' separator if it would not actually separate
anything but rather remain at the line's end.

Patchset2: Added corresponding release note.

Change-Id: If6458bedb7492b15ece14f5eebbb697b93905a44
2012-04-08 19:15:20 -04:00
Aaron Schulz
d7adc3c373 (bug 34978) Use a rev parent batch query to get the diff sizes for history pages rather than rely on assumptions that break if any filtering is used. 2012-03-13 00:32:47 +00:00
Niklas Laxström
4d94927715 Restore many missing spaces from r112589
Also fixed indentation by spaces
And please don't ever use != ''. It's misleading.
2012-03-01 10:42:02 +00:00
Siebrand Mazeland
481943429e (bug 34702) More localised parentheses. Patch contributed by Yusuke Matsubara. 2012-02-28 11:56:59 +00:00
Sam Reed
386d797d8b Fix extraneous quote from r111800
Doesn't fix Niklas' issue, but it tidies it up for the moment
2012-02-18 14:28:38 +00:00
Andrew Garrett
af668cc7c9 Add both size *and* size difference on history page per bug 34449 2012-02-17 22:49:04 +00:00
Sam Reed
80d2262fae Make wfProfileOut call be the last thing before the return 2012-02-16 02:52:46 +00:00
Mark A. Hershberger
f2ab4aceeb fixes Bug 34198 - first item in the history shows no information about its size
Regression in 1.19 found and fixed by Umherirrender

    With MediaWiki 1.19 the history page was changed from showing the
    size to showing the diff and giving the size in the tooltip.

    But now the first item in the history has no information about it size.
2012-02-11 18:11:01 +00:00
Sam Reed
76246b9bf5 More return documentation 2012-02-09 21:33:27 +00:00
Sam Reed
e1d83d5721 Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 18:01:54 +00:00
Alexandre Emsenhuber
c025d708eb Use WikiPage instead of Title to get its id, whether it exists and its latest revision's id 2012-02-02 09:55:04 +00:00
Rob Moen
4206e23d19 reverted r108850 as patch should be introduced after code freeze 2012-01-13 21:57:52 +00:00
Rob Moen
dd44f2dced patch from MrBlueSky, resloves bug 25909. Add dropdown list for tags in recent changes and new pages 2012-01-13 21:24:38 +00:00
Krinkle
c538f96a2d [mediawiki.action.history.js] Provide cleaner handling of action=historysubmit hack.
* Follows-up r108341, r108370
* Doesn't remove it, server will still handle them properly (as provided by r57415) when JavaScript is off. This commit adds a progressive enhancement when possible so that submit will go to either of these:
* title= & diff= & oldid=
* action=revisiondelete & ids[..]=
instead of one of these
* action=historysubmit & title= & diff= & oldid= & ids[..]=
* action=historysubmit & revisiondelete=1 & ids[..]= diff= & oldid= 
(removing redundant parameters and parameters from the other submission-type that don't belong in that url)
* Also re-adding support for action= revisiondelete in the query, as it was originally. Due to this hack it appears that support for the original action name (which is still returned as "revisiondelete" from MediaWiki::getAction() ) was removed or never existed in that place of the code at all. Fixed now.
2012-01-09 02:08:35 +00:00
Krinkle
188f9548b8 [HistoryAction] Clean up
* Don't build $s as well as $this->buttons for re-use later in getEndBody(), simply use it in both cases.
* Adding a css class for compareselectedversions button just like there is for the revisiondelete button
2012-01-08 22:32:11 +00:00
Krinkle
09df26371e [HistoryAction] Revert r108341 as this breaks revision delete.
This construction never looked cool, but looks like this fix is not the right way, so reverting it.

This form is used for two purposes:
-- Submitting diff/oldid to (implied) action=view
-- Submitting ids-array to action=revisiondelete

That makes it complicated. Also for IE6/IE7 compatibility, there is no way to do this from the HTML itself (i.e. using <input type="submit" name="action" value="revisiondelete"> would work but leaves no option to have a custom i18n label. and <button type="submit"  name="action" value="revisiondelete">I18N LABEL</button> works but IE7 submits "I18N LABEL" as value for "action" instead of "revision delete".

Will re-fix bug 33587  in a few minutes with a "progressive-enhancement" solution from the front-end instead.
2012-01-08 22:15:23 +00:00
Krinkle
9f3297d0e8 Remove action=history from submit on HistoryAction
* Not needed, and not used. Is internally converted to "view" as much as possible.
* Fixes bug 33587
* See also https://bugzilla.wikimedia.org/show_bug.cgi?id=25800#c6
* Other diff links from MediaWiki don't do this either
2012-01-08 00:52:50 +00:00
Chad Horohoe
394a5ba7a7 Reduce some duplication in Action::getRestriction(), all but 2 (plus one extension) return null anyway 2011-12-06 17:40:12 +00:00
Antoine Musso
e70b8c2409 Fix PageHistoryBeforeList hook
Following r100534 refactoring, it was using an incorrect variable.
2011-12-05 16:15:05 +00:00
Raimond Spekking
0842179cb8 Revert r105162 for now per CR. 2011-12-05 12:47:52 +00:00
Antoine Musso
00280ee21b Fix PageHistoryBeforeList hook
Following r100534 refactoring, it was using an incorrect variable.
Use the new accessor instead.
2011-12-05 10:56:56 +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
Aaron Schulz
c8575ffd7a FU r101629, made Pager only call doBatchLookups() if there are rows 2011-11-02 17:33:00 +00:00
Alexandre Emsenhuber
f2d0453f9d * Made PermissionsError exception accept an optional second parameter for the description of the errors (as returned by Title::getUserPermissionsErrors())
* PermissionsError now calls OutputPage::showPermissionsErrorPage() to display the error (this is needed to make the item above work correctly)
* Removed the override of the HTML title in OutputPage::showPermissionsErrorPage() so that it shows "Permission errors - Sitename" instead of simply "Permission errors" for consistency with the other things
* Pass the error array returned by Title::getUserPermissionsErrors() to PermissionsError where available
* Converted direct calls to OutputPage::showPermissionsErrorPage() to throw an PermissionsError error instead
* Added 'action-rollback' message that will be displayed when accessing action=rollback without sufficient rights
* Changed getRestriction() in subclasses of Action to return null when they previously returned 'read' so that user rights can be check with Title::getUserPermissionsErrors()
* Reordered checks to do first user rights, then block (if needed) and finally read only (also if needed) so that users don't think the error is temporary when they both don't have right and the database is locked
2011-11-02 15:30:55 +00:00
John Du Hart
cdb26ec5b5 Followup r100305, don't try to do a batch query for an empty result (which would cause bug 32134) 2011-11-02 15:15:10 +00:00
Aaron Schulz
eac8538cd6 * Added pageJoinCond() and userJoinCond() to Revision and exposed them publicly
* Removed commented-out code
2011-10-27 19:55:00 +00:00
Aaron Schulz
10e93f24a3 * Removed $wgRCShowChangedSize check in sp:Contributions for size diffs since this isn't RC
* Replaced revision size information on history pages with size diff to be consistent with other places
2011-10-25 18:19:26 +00:00
Aaron Schulz
ec94ef3281 Removed wrong comment in doBatchLookups() 2011-10-23 10:15:51 +00:00
Alexandre Emsenhuber
9e230f3076 * Changed action=history to use an Action subclass
* Use local context instead of global variables
* Removed obsolete aliases PageHistory and PageHistoryPager; no longer used
* Made Action::getContext() and related methods public for the call in HistoryPager's constructor and also for consistency with other classes
2011-10-23 09:21:02 +00:00
Alexandre Emsenhuber
585e0d0565 Temporaray revert of r94031; forgot that this was depending of some other work on my working copy 2011-08-07 14:29:28 +00:00
Alexandre Emsenhuber
2d045fa152 * Moved action=history to use an Action subclass
* Removed obsolete aliases PageHistory and PageHistoryPager; unused
* Maintained backward compatibility with HistoryPage; extensions using it will still work
* Use local context instead of global variables
* Removed calls to OutputPage::setPageTitleActionText() and OutputPage::setSyndicated(), the first one does nothing and the second one is overriden by the setFeedAppendQuery() call just below
* Call Linker methods statically
* Fixed bug where feedEmpty() was not called on empty history since casting a ResultWrapper object to boolean always returns true even when there's no row
2011-08-06 19:41:49 +00:00
Renamed from includes/HistoryPage.php (Browse further)