Commit graph

336 commits

Author SHA1 Message Date
Marius Hoch
fc5bcf1147 Remove revision patrol links from normal page views
Users want and expect it this way, per bug 49123

Follow up to I1e24733c

Bug: 49123
Change-Id: Ib4d72179e4029f0c089c3147bdf4bd6daac0374e
2013-06-09 03:45:21 +02:00
umherirrender
c2f7148e5d Show rollback link on changes list only for RC_EDIT
Changing from !RC_NEW to RC_EDIT to have no rollback links, when this
method is called accidently for RC_LOG or RC_EXTERNAL (or for the old
RC_MOVE/RC_MOVE_OVER_REDIRECT). For that types there are 0 revisions to
rollback.

Change-Id: I1cbdc87a8b8e0cecf6fbfa3b3a64d5015057bccf
2013-06-07 18:06:32 +00:00
jenkins-bot
b36555cea0 Merge "mediawiki.icon: Move arrow icons to a separate module" 2013-06-04 19:10:12 +00:00
Brad Jorsch
3ac76433b3 mediawiki.icon: Move arrow icons to a separate module
The arrow icons for the enhanced watchlist/recent changes could be
useful elsewhere. But to do that, we need to be able to load them
separately; this does that by adding a new module just for the CSS
needed for the arrows.

Also, this fixes a use of OutputPage::addModuleStyles that really should
have been OutputPage::addModules so dependencies are resolved.

Change-Id: I639a5ccbc3b7b2794e7b12ecb64e5ee6b10a640a
2013-06-04 15:42:15 +00:00
Marius Hoch
a3a34ebeec Allow patrolling page creations from Special:RecentChanges
In case we got a page creation which is yet unpatrolled and
recent changes patrolling is enabled, the user probably rather
wants to patrol the whole page (first revision) instead of seeing
a patrollink for the current revision.

Follow up to I1e24733c

Bug: 48928
Change-Id: I9f89f1d44852d4c03a67ac622d5cf4d86453dce3
2013-05-29 12:49:59 +02:00
Marius Hoch
c451b320e3 Patrol overhaul phase 1: Remove rcid parameters
I've changed the logic in Article::showPatrolFooter to be able
to fetch the recent changes id and to only show the patrol link
in case the change hasn't yet been patrolled.

In case recentchanges patrolling is enabled this will try to
create a patrol link for the revision the user is currently
viewing. If only new page patrolling is enabled it tries to
create a patrol link for the first revision of the page.

Furthermore I've removed the passing around of &rcid parameters
within MediaWiki as those had several issues (some even security
related) and were only a workaround to protect the DB from some
queries, which is no longer needed.

This has already been partly implemented in a different manner in
r45778 but had to be reverted in r46542 due to performance issues.
This version shouldn't cause such issues as I'm only adding one or
two indexed database queries per page view.

I've written this new version of the patch with mostly
performance in mind and even tested the database queries it uses
against the replicated databases of enwiki on the toolserver. I'm
pretty sure this can't be implemented any faster without creating
a new index on the recentchanges table.

As I was on it I've implemented RecentChange::isInRCLifespan which
checks whether the given timestamp is new enough to may have a RC
row. That way we can avoid some DB queries for timestamps which are
older than the max RC age.

Fixes bugs:
(bug 15936) New page's patrol button should always be visible
(bug 35810) ! N pages non-patrol-able
(bug 36641) Patrol page link shows on non-existent revs

Change-Id: I1e24733cafbfdc51b7a5a9a1c1baf948e760fe1a
2013-05-25 12:04:01 +02:00
umherirrender
15ff79312d Fixed spacing and removed unneeded parenthesis
Added spaces after/before parenthesis
Removed unneeded parenthesis around some statements
Broke a long line

Change-Id: I7fbe129f7bbf524dd0598ece2a9708643f08453b
2013-05-17 16:12:08 +00:00
umherirrender
7064d10413 Do not bold all entries of an unvisited page on the Watchlist
When a page is unvisited (wl_notificationtimestamp IS NOT NULL) all
entries of that page on the watchlist gets bold (class=mw-changeslist-line-watched),
because wl_notificationtimestamp is only checked for null.

wl_notificationtimestamp should be compared against rc_timestamp to
find only the really unvisited pages since the last visit on that page.

It is confusing, when all entries of a page on the watchlist gets bold,
but only some of the newer are unvisited.

Support for old and enhanced watchlist.

Change-Id: I7265141a6c84bcbdd7b651bd2983a08b73c6ddfe
2013-05-15 15:55:37 +00:00
umherirrender
6f79eef473 Fixed spacing around parenthesis in includes
Change-Id: Ie8adc00f4ee8ecec4554e584c18d5d2073415397
2013-04-28 15:50:07 +00:00
Reedy
1c3bcd0788 Replace weird usage of explode
Change-Id: Ic4021be695c9ed15dea0da0e94967a0d7d441670
2013-04-22 22:39:38 +01:00
umherirrender
ef2f507d23 Fixed spacing in files direct in includes folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: Ibb8dd102db045522d12ff939075ba7420d95ab6b
2013-04-21 06:38:49 +00:00
umherirrender
15abcf71ca Added/Removed spaces around string concatenation
And added/removed spaces around some other tokens,
like +, -, *, /, <, >, =, !

Fixed windows newline style

Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
2013-04-13 13:36:24 +02:00
umherirrender
6c278b6d7e fix some spacing
* Removed spaces around array index
* Removed double spaces or added spaces to begin or end of function
  calls, method signature, conditions or foreachs
* Added braces to one-line ifs
* Changed multi line conditions to one line conditions
* Realigned some arrays

Change-Id: Ia04d2a99d663b07101013c2d53b3b2e872fd9cc3
2013-03-25 22:22:46 +00:00
Yuri Astrakhan
9506e3d812 Spellchecked /includes directory
* Ran spell-checker over code comments in /includes/
* A few spellchecking fixes for wfDebug() calls

Found one very strange (NOOP?) line in Linker.php - see "TODO: BUG?"

Change-Id: Ibb86b51073b980eda9ecce2cf0b8dd33f058adbf
2013-03-13 03:42:41 -04:00
Tyler Anthony Romeo
4dcc7961df Fixed @param tags to conform with Doxygen format.
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.

Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
2013-03-11 13:15:01 -04:00
umherirrender
d63121016d fix some spacing
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments

Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
2013-03-07 17:53:21 +01:00
umherirrender
1044b0b8df fix some spacing
Change-Id: I8f976013f33c5818e4402604fe8610aa3f43b0c6
2013-02-04 20:18:33 +00:00
umherirrender
6fbbbd17ca fix some spacing
Change-Id: Ie7bb35871cc99237f3a655f7db22ca1f0646df5e
2013-01-27 14:21:50 +01:00
aude
5e4f933ee0 Add css $classes variable to the OldChangesListRecentChangesLine hook
- will update LiquidThreads accordingly and do not see
this hook used in any other extension in Wikimedia git repos.

Change-Id: Ib8f297b39dbd5fba980bb0d4773d0e01f2b922f4
2013-01-10 15:52:30 +00:00
jenkins-bot
436d323f78 Merge "(bug 43315) Cursor of enhancedchangelist wrong for non-toggle lines" 2013-01-02 17:21:19 +00:00
umherirrender
e1092ad987 (bug 43315) Cursor of enhancedchangelist wrong for non-toggle lines
The class mw-enhancedchanges-arrow was also used for non-toggle lines,
which have now the cursor. Now using mw-enhancedchanges-arrow-space for
the space and mw-enhancedchanges-arrow for the cursor.

Also fix bad aligned lines, when javascript is disabled. Here the
problem was, that only the arrows are display:noned, but the placeholder
space of single lines must also be display:noned.

Change-Id: Iba13987ced4c3e327026df2cb96b92a777e2032f
2012-12-27 10:36:06 +01:00
aude
e6a811b436 allow OldChangesListRecentChangesLine hook to return false and omit line from RC
- this enables an extension to do some processing on the RC line,
and if processing fails or for other reason, the extension has the
option to not output the line at all in Special:RecentChanges and
Special:Watchlist.

Change-Id: Ibf3a217afba5b4ad7992919399710fe3da301025
2012-12-27 07:58:01 +00:00
Alexandre Emsenhuber
9a741ee4a0 Documentation improvements in ChangesList.php
Change-Id: I7e2a35d2f15ed72338779b39e7dd64f4ee5a3989
2012-12-22 18:10:22 +00:00
aude
19d81b4e5d add function in ChangesList to getTimestamp without inserting it
Change-Id: Iae28a6a36f3ab1de3c74cd9eba88793c85faa322
2012-12-20 15:39:41 +00:00
Reedy
d0a242abb4 Tidy up some unbalanced returns in methods
Leave a TODO

Change-Id: Ic49ac8630650b341aafb3c17abd22f3a07805d27
2012-12-09 02:59:04 +00:00
umherirrender
1ab671e626 (bug 37263) better handling of minor/bot in enhanced changelist
It makes more sense, to have the whole group as minor/bot, when all of
the group are minor or bot edits, not when only one of the group is
minor/bot.

Change-Id: I62bf1099f2e3fb73e9b50374cbb7ba8bfd8a009e
2012-12-05 10:01:49 +00:00
daniel
b5b2b2f898 (Bug 41574) Supply Title object to Revision if possible.
The Revision object needs the Title to determine the default content model.
Providing the Title explicitely wherever possible avoids an extra database
lookup. Most importanlty, this fixes fatal errors that ocurr when the
database lookup fails due to slave lag or transaction state.

Change-Id: I516e82f7a893b274c513b128b8a46db491160b55
2012-11-01 13:48:18 +01:00
jeroendedauw
dc8f3e6c78 Added a pile of missing brackets
Change-Id: Id7b331e1b12875736c8e7e93660e71630360a723
2012-09-27 21:46:22 +02:00
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
Siebrand Mazeland
8d4913ec4d Replace deprecated wfMsg* calls with Message class calls.
Change-Id: Ifa80db1d81b9b9d1a5adfcac06a9ed14203c100e
2012-08-19 22:08:08 +02:00
Dereckson
8d68833208 (bug 37638) Remove calls to deprecated LogPage::logName method.
The LogPage::logName method has been deprecated in 1.19,
warnings being planned in 1.21.

This change removes any call in the MediaWiki core to this
deprecated method.

Removing extra whitespaces/tabs in includes/ProtectionForm.php.

Change-Id: I1907f17341ecb6448967a5283e3c913778dcb1a9
2012-08-15 07:50:01 +00:00
umherirrender
58b7b644f9 change some rc_new to rc_type == RC_NEW
The field rc_new is obsolete and should be removed, see bug 34320

Change-Id: I411ec2cb0fe3eb078094eded210d4aefee5f8e74
2012-08-06 00:08:35 +02:00
Antoine Musso
d5737f8f17 update @param @return doc in several files
Change-Id: I0e23227330f90dc4121fd2a313d2e9a33c3c97a7
2012-07-10 17:08:52 +02:00
Antoine Musso
aab43dd495 escape tags and entity in doxygen comments
When inserting XML elements inline <such as this one>, doxygen chokes
about it not being known. Simply enclosing the tag in double quotes
prevents doxygen from emitting a warning.

Also enclosed a few invalid functions calls such as \. and double quoted
the HTML entities such as &foobar;

Change-Id: I4019637145e683c2bec3d17b2fd98b0c50a932f1
2012-07-10 17:08:32 +02:00
Catrope
3bb6217db3 Merge "(bug 38148) Fix E_WARNING in ChangesList.php line 1218" 2012-07-03 18:50:02 +00:00
Aaron
79c774d362 Fixed exception in diff size formatter.
Change-Id: Iaa4887453ba6b136e507e51af6c80849b7c6873c
2012-07-03 11:20:24 -07:00
Alexandre Emsenhuber
5b01c0c867 (bug 38148) Fix E_WARNING in ChangesList.php line 1218
The error is PHP Warning: explode() expects parameter 2 to be string, array given in includes/ChangesList.php on line 1218.
The problem is that $classes is always an array, so no need to explode() it.

Change-Id: I6917273aecc6b9ddbf377e69ecbd343ee25fa8ef
2012-07-03 19:46:53 +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
Alexandre Emsenhuber
1df8e0369a Use local context to get messages and time formatting methods of Language class
Also added ChangesList::formatCharacterDifference() to replace RecentChange::getCharacterDifference()
so that it's easier to pass a context object ChangesList::showCharacterDifference().

Change-Id: I345f46d2812ed6ee222ddd2dd085efbd4a1f6a36
2012-06-28 23:42:46 +02:00
Demon
7790bcfdae Merge "Follow-up Idae8d920 (8c65834): no need to call getContext() and escape the message." 2012-06-27 21:17:22 +00:00
Reedy
d9f3e8df0f Can't use return value of void functions
Change-Id: Idce6e31f3f0eff0a0045c1cc62def3f5d79b9d48
2012-06-16 14:42:30 +01: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
Alexandre Emsenhuber
8cf3d21ac5 Follow-up Idae8d920 (8c65834): no need to call getContext() and escape the message.
Change-Id: I6a6b06be19d4fb655674c2e930a7e5f52374fbe2
2012-05-30 13:46:52 +02:00
Liangent
8c65834425 Add new message 'brackets' and use it to kill some hardcoded []s.
Change-Id: Idae8d9201d1c291316ab520d204ae8c5cde2d890
2012-05-30 14:40:11 +08:00
Alexandre Emsenhuber
1082c71e9b Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ibe7815124d6915792dcbb150d01df21d9b22b0b0
2012-05-21 21:56:39 +02: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
Krinkle
5d68836825 [mediawik.special.changeslist] Remove ugly arrow swapping hack
* Use CSS and change the background image, instead of displaying 2 <img> tags and hiding one based on the parent element's class
* touches bug 17616 a bit, although it doesn't address the focus issue yet, but does improve the overal structure of this module
* Also speeds up by:
- Outputting less markup
- Having 1 embedded images in the CSS file instead of (N changes)*<img> tags
* jquery.makeCollapsible:
2012-02-27 00:03:14 +00:00
Sam Reed
c052fc3b7b Documentation followups from lastnight 2012-02-10 15:37:33 +00:00