Commit graph

304 commits

Author SHA1 Message Date
Matthias Mullie
e39bd385b2 When aborting EnhancedRC block line, block should reflect that
It was possible to abort the rendering of all block lines, but
the block would still be rendered (with nothing inside). It
would also render a "x changes" link, even though that "x" is
no longer correct.

This had been reverted in adba11dfe3,
but has now been fixed up.

Change-Id: Ic5d15e56bc2f46fa6aa8c9375f3cafeb13e1ea9c
2015-09-16 12:46:44 +02:00
jenkins-bot
266dbe55e8 Merge "Revert "When aborting EnhancedRC block line, block should reflect that"" 2015-09-16 10:12:02 +00:00
Catrope
adba11dfe3 Revert "When aborting EnhancedRC block line, block should reflect that"
Caused errors when there were two new topics created on the
same Flow board on the same day.

BadMethodCallException from line 496 of
/srv/mediawiki/php-1.26wmf23/includes/changes/EnhancedChangesList.php:
Call to a member function getTitle() on a non-object (NULL)
{"exception_id":"58b04b8c"}

This reverts commit b30417048b.

Bug: T112738
Change-Id: Ib404d78eaf1aa9ac7ea34516183bcc9956efc515
2015-09-16 09:56:57 +00:00
jenkins-bot
7b0df4e549 Merge "When aborting EnhancedRC block line, block should reflect that" 2015-09-10 00:21:44 +00:00
CSteipp
e412ff5ecc Revert "Enable users to watch category membership changes"
This reverts commit f6879ea16e.

Bug: T109638
Change-Id: I770d8d33a4cff3829bdea9a4df24de209cbe691b
2015-08-20 10:35:56 -07:00
jenkins-bot
8a1152b913 Merge "RC: Handle getLine returning null, which breaks Redis engine (at least HHVM)" 2015-08-19 03:24:44 +00:00
Matthew Flaschen
047fc253d0 RC: Handle getLine returning null, which breaks Redis engine (at least HHVM)
Bug: T109544
Change-Id: I02dcfc7a10a74571232a898f1ef348f8dbc48b45
2015-08-18 23:08:36 -04:00
Kai_WMDE
f6879ea16e Enable users to watch category membership changes
Bug: T9148
Change-Id: I5a89d8f19804b1120f4c755d834e2da6ca12ceae
2015-08-13 17:58:06 +02:00
Kunal Mehta
a220d8b830 Unbreak missing flags in enhanced RC
$this->recentChangesFlags() was being called on the data twice, so the
second time it was processing the string, causing the flags go missing.

Follows-up 94f153db6a.

Bug: T105237
Change-Id: I04465d0317eecc1c12e47bc9a74f11986eba99a4
2015-07-08 14:57:20 -07:00
Matthias Mullie
b30417048b When aborting EnhancedRC block line, block should reflect that
It was possible to abort the rendering of all block lines, but
the block would still be rendered (with nothing inside). It
would also render a "x changes" link, even though that "x" is
no longer correct.

Change-Id: I94ae68e80461dcfbf328683522ea6cb58c6c5753
2015-07-08 17:11:55 +02:00
Matthias Mullie
dc3ddcc4a2 Allow hooks to abort lines in EnhancedRC
Bug: T104564
Change-Id: I4a2f97d83f38071984d571773a6b09b6b6643d6d
2015-07-03 10:18:58 +02:00
Matthias Mullie
94f153db6a Add hook EnhancedChangesListModifyBlockLineData
Introduce a new hook to allow (single) block-level entries.
Very similar to EnhancedChangesListModifyLineData.

Bug: T104399
Change-Id: I6b4715277d44e5f09d7a230b33e956676aeab1c2
2015-07-03 10:16:52 +02:00
Stephane Bisson
28f2fe8a22 Add 'EnhancedChangesListModifyLineData' hook
Gives extensions a chance to modify the data used to
build each enhanced recent change 'inner' lines
(as opposed to the header lines).

Bug: T102021
Change-Id: Ia8a796fb9621db14d6574e66a4572e1fdf3bad03
2015-06-26 12:51:55 -07:00
umherirrender
70f3afd548 Remove unneeded empty lines at begin of if/else/foreach body
An if body must not begin with an empty line

Change-Id: I62b058be337fcc85a120fcd3dadce564db59a271
2015-06-19 20:05:45 +02:00
jenkins-bot
9c092814c7 Merge "Omit 'external' changes from ChangesFeed" 2015-06-13 01:18:56 +00:00
Kunal Mehta
f6e5079a69 Use mediawiki/at-ease library for suppressing warnings
wfSuppressWarnings() and wfRestoreWarnings() were split out into a
separate library. All usages in core were replaced with the new
functions, and the wf* global functions are marked as deprecated.

Additionally, some uses of @ were replaced due to composer's autoloader
being loaded even earlier.

Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to
mediawiki/vendor.

Bug: T100923
Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4
2015-06-11 18:49:29 +00:00
Stephane Bisson
62961558a5 Encapsulate rc_params handling in RecentChange::parseParams
* Make MachineReadableRCFeedFormatter use it

* Some unit tests

* Also fixed some line-too-long warnings in RecentChange.php

Change-Id: I443d14f5d4cdac0945cb9c03608d55745bbb865b
2015-06-10 15:11:37 -04:00
addshore
f5e08902a7 Fix some RecentChange phpdoc return types
Change-Id: I3e75a97f7fc76e2dc052463511e32f330cfca9ce
2015-06-01 12:07:17 +01:00
Aaron Schulz
97b2a1dfda Made RecentChange defer the save() method via DeferredUpdates
* Also made it handle calling PatrolLog::record() itself

Bug: T100042
Change-Id: I58ef060e02b89a5f9dadc0dbc4edba667932beda
2015-05-22 21:00:29 +01:00
Aaron Schulz
072e3666d3 Defer some updates in doEditUpdates()
* These updates add to editing time and can be done
  after sending the HTTP response for performance
* Also improved the active users job insertion logic

Change-Id: I5b25217c4f08db7fa9a05eac046283f02d45865e
2015-05-21 19:38:25 +00:00
Matthias Mullie
fd64488787 Add hook EnhancedChangesList::getLogText
Enhanced RC generates these "(3 changes | history)" links for
every block of grouped recentchanges. That changes-link links
to a diff page.

For Flow, that is all wrong: we have different ids (not integers),
on a different page (&curid=&oldid=&diff= means nothing). Even
the concept of a "diff" page seems wrong here for us - a new post
is not part of some document that can be diffed.
In short: we'll want to generate a different link, and we'll need
a hook to let us change them.

Meanwhile also split the code that generates those links into a
separate method.

Bug: T72513
Change-Id: Ib32fb9552b80f9581d89b3b47da6e5d32e3d84a3
2015-03-03 01:50:32 +00:00
aude
9b11ff7a42 Omit 'external' changes from ChangesFeed
The current formatting does not display these
external changes very well (e.g. doesn't distinguish
between local and foreign wiki user or whatnot).

Unless there is better handling or integration of these,
also with the option of hiding or showing, it is best
to simply exclude these from the feed.

This brings the ChangesFeed inline with default
behavior of Special:RecentChanges and Watchlist.

Bug: T88254
Change-Id: I956a3c392e9f163478b9f6994bde4c0be8932163
2015-02-02 20:32:07 +00:00
Aaron Schulz
99e6b43ab8 Moved RecentChange::purgeExpiredChanges to a job
* Also added a selectFieldValues helper method to the DB classes
  since this use case keeps coming up.

Change-Id: I62cdbb497dc2c8fe4758e756d13688b85165e869
2015-01-16 17:39:31 -08:00
Niklas Laxström
80ca508ed1 Add User::equals
Seems stupid omission. Title has one. Why do I need to think how
to determine how to users objects point to the same user. Allows
more expressive code.

Also fixes a bug in multiple places where users "0" and "00" were
considered equal.

Change-Id: I682392e564b332b77ab489f2ad394fa2d28098a5
2015-01-13 15:04:45 +01:00
Ricordisamoa
2ae155da52 Fix phpcs errors in includes/
Mostly Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines

Change-Id: I678b2f0902f11cd1dfa1611b9da24e7237df9122
2015-01-08 20:15:07 +01:00
Chad Horohoe
aa21e125a3 Remove obvious function-level profiling
Xhprof generates this data now. Custom profiling of various
sub-function units are kept.

Calls to profiler represented about 3% of page execution
time on Special:BlankPage (1.5% in/out); after this change
it's down to about 0.98% of page execution time.

Change-Id: Id9a1dc9d8f80bbd52e42226b724a1e1213d07af7
2015-01-07 11:14:24 -08:00
Reedy
4d9143c7f5 Add lots of @throws
Change-Id: I09d0c13070f966fcf23d2638d8fc1328279a5995
2014-12-24 13:49:20 +00:00
Aaron Schulz
e369f66d00 Replace wfRunHooks calls with direct Hooks::run calls
* This avoids the overhead of an extra function call

Change-Id: I8ee996f237fd111873ab51965bded3d91e61e4dd
2014-12-10 12:26:59 -08:00
umherirrender
c0151eec5f Fix case of various newFromID/newFromId functions
User::newFromID -> User::newFromId
Revision::newFromID -> Revision::newFromId
RecentChange::newFromID -> RecentChange::newFromId

WikiPage::newFromId -> WikiPage::newFromID
Title::newFromId -> Title::newFromID

Change-Id: I310f26653613951e9b21ce915a92d205a87937f1
2014-12-10 19:40:27 +00:00
Ricordisamoa
f86a5590aa Always use 'bool' instead of 'boolean' after '@param' and '@return'
The former is by far the most common.

Skipped:
* resources/lib/jquery.ui/jquery.ui.datepicker.js
* resources/src/mediawiki.special/mediawiki.special.upload.js

Change-Id: I73c93797e745128ba703e4865080c36784caa474
2014-12-10 11:57:31 +00:00
Chad Horohoe
6c30fff0ba Swap and for &&
Change-Id: I7821a62586cc2d2f929fb3d7d5046958a70efbd0
2014-10-23 13:03:14 -07:00
aude
9ec6c4967e Fix undefined argument in OldChangesList
Bug: 70407
Change-Id: I17bbaeaf7c9cae51e33c859867ef3a3199b68a43
2014-09-09 16:05:53 +02:00
jenkins-bot
00f9ce1105 Merge "Bound the cache size of numberofWatchingusers()" 2014-09-04 20:03:11 +00:00
Aaron Schulz
220d30f8f4 Bound the cache size of numberofWatchingusers()
Change-Id: I60c9898318e340ee3c97d24b528d85a5f8c492e5
2014-09-04 12:49:43 -07:00
jenkins-bot
af9c5d49fd Merge "Move actual OldChangesList line formatting to separate method" 2014-09-01 09:50:19 +00:00
aude
9ec0095e3d Move actual OldChangesList line formatting to separate method
Change-Id: I31100c79abc30460bd08eb50862b51a56b807fba
2014-08-28 13:36:26 +02:00
umherirrender
7c6a25856c Add missing @return to function docs
Change-Id: I45b9d02f94ecc58372268ec5e6a0b572a0b7e2a9
2014-08-23 23:14:57 +02:00
umherirrender
26e71dd640 Use getConfig for ChangesList
Change-Id: I1f440a2fca2dd8f1973987d635c70954938b6ea6
2014-08-22 22:01:08 +02:00
Bartosz Dziewoński
07aef8f753 Remove EnhancedChangesList::arrow() and friends
Not used in core, the only usage outside removed in Ieb5bb6f9.

Also removed two now-unused files from skins/common/.

Bug: 69675
Change-Id: Ia0e9fc2af25af903db085f2a05c04dcd9aff213e
2014-08-18 00:08:48 +02:00
jenkins-bot
ab972997ee Merge "Remove various functions and globals deprecated since 1.22 from RecentChange" 2014-08-14 18:06:35 +00:00
umherirrender
21e0c1c533 Correct variable names in @param to match method declarations
Some @param have a typo in the variable name,
some @param's were in wrong order.

Change-Id: Ie25806831027112b398f6f4a909c59147ac3a5fa
2014-08-13 21:48:28 +02:00
withoutaname
557b2cf3ef Remove various functions and globals deprecated since 1.22 from RecentChange
Change-Id: I5200892e75ffa894133e2e386d53c09536547de9
2014-08-12 22:19:36 -07:00
Tom Arrow
510da8d776 Remove unreachable return in ChangesList.php
Change-Id: Ic00d7b4eaebdaa795b550c4213c518b1c56bd297
2014-08-09 12:25:33 +00:00
umherirrender
02dc9da399 Cleanup some docs (includes/[a-d])
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling

Change-Id: I7b65fe04db431342cc58b469dc48f41a50c4e891
2014-07-24 19:42:45 +02:00
umherirrender
4ee680a8b3 Fixed spacing
- Removed spaces after not operator (!)
- Removed spaces inside array index
- use tab as indent instead of spaces
- Add newline at end of file
- Removed spaces after casts

Change-Id: I9ba17c4385fcb43d38998d45f89cf42952bc791b
2014-07-24 11:53:04 +02:00
withoutaname
2be66e38e2 Move ChangesFeed to includes/changes/ folder
Change-Id: I4ec541e8fe4234970972904592af2e11375e974d
2014-07-15 17:30:46 -07:00
JuneHyeon Bae
17ebbe492c Remove obsolete RC_MOVE and RC_MOVE_OVER_REDIRECT rc types
RC_MOVE and RC_MOVE_OVER_REDIRECT are obsolete, since at least 2006.
So it is considered safe to remove.

Bug: 63755
Change-Id: I0f17c4d164585a48fb9f0d40b90a7d3b975c7ab8
2014-06-11 02:44:48 +00:00
Timo Tijhof
c0b0a12eab RCFeed: Use named types instead of exposing internal MW constant
Like we do in ApiQueryRecentChanges as well, expose the named
rc.type property, not the internal integer constants.

Change-Id: I89a948eee999032bb2e42cc23345affa879afb42
2014-06-04 04:55:02 +00:00
Kunal Mehta
8e980dfbf5 Allow more flexibility in RC feeds
The user can now specify which feeds to send to in
RecentChange::notifyFeeds if they don't want to use
$wgRCFeeds.

Additionally, the 'formatter' in $wgRCFeeds can now be an object
rather than just a class name.

Change-Id: Ibfdffc17a934e35223887c123331795563102752
2014-05-26 19:27:54 -07:00
aude
e0536cae6f Add method to determine EnhancedChangesList cache grouping key
Change-Id: Iaf3734baa53b71affca77d5243a579cc70bb522b
2014-05-21 13:28:13 +00:00
kishanio
b7cc86cdc0 Move ApiQueryRecentChanges::parseRCType to static method on RecentChange
Prior parseRCType was an private method in includes/api/ApiQueryRecentChanges and also
duplicated in includes/api/ApiQueryWatchList. This method has been made static and moved
to includes/changes/RecentChange.php.

Bug: 65071
Change-Id: Ic911fbcf9411c782685c4f956f8522051f2517f0
2014-05-17 15:07:01 +00:00
Nemo bis
ccd7758c1e Extend AbortEmailNotification hook to access log type etc.
Bug: 42458
Change-Id: Ifc3935f031c49f9b49ae76c5a8af8334e70ca2b1
2014-05-11 09:39:14 +00:00
withoutaname
866f478dc9 Append redirect=no to RecentChanges/Watchlist redirect entries
This change adds redirect=no in the URL of redirect entries in the RecentChanges or in the Watchlist.
Entries which are not redirects will not be affected.
Some typos in documentation were also fixed.

Bug: 890
Change-Id: I79593811d92b2f57abd742c8ba9e66769d8bc9b7
2014-04-28 18:11:13 -07:00
Bartosz Dziewoński
59002d8935 Consistently use '@deprecated since <version>'
Variants included 'in <version>', 'as of <version>' and just the
version number.

Some @deprecated annotations do not have the version number at all,
I want to hunt them down separately.

Change-Id: I8208c6097098f4735d4f51bc42254675f1f27f6d
2014-04-15 22:18:19 +02:00
umherirrender
9c614ac02d Fixed some @params documentation
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.

Change-Id: I8c9f30128b46086064326708a4878228ba459447
2014-04-14 19:52:18 +00:00
aude
7c4278f3f1 Split part of EnhancedChangesList::recentChangesLine into new method
Change-Id: I57f22ac0969fe3ba324a2b9d107c6f2d9968769c
2014-04-08 11:57:01 +00:00
Tyler Anthony Romeo
4211404e02 Added more filter options to $wgRCFeeds
Changed RecentChange::notifyRCFeeds() to allow more
filter options than just omit_bots. In order to mirror
the on-wiki Special:RecentChanges UI, the options
omit_anon, omit_user, omit_minor, omit_patrolled were added,
which omits anonymous, registered, minor, and patrolled
edits, respectively.

Bug: 60941
Change-Id: I716c741f1f7d42b6506a97e9a5733beac23ac16c
2014-04-07 23:36:36 +00:00
Erik Bernhardson
36a664643b New Hook rc/watchlist hook ChangesListInitRows
An extension hooking into recent changes may need to load additional
data that did not fit into the recentchanges table.  This hook gives
extensions an opportunity to see the full result prior to rendering
and batch load where approprite rather than loading piecemeal during
the render process.

This is implemented as an optional method called by the ChangesList
consumer, since the ChangesList never sees the full result set. Hook
implementers must be able to work regardless of the hook being called,
they just have the oportunity to be more efficient when it is called.

Change-Id: If74ae600ffba949364dd381dd3d466cbbaa27286
2014-04-01 09:38:16 -07:00
Siebrand
34c239655e Revert "New Hook rc/watchlist hook ChangesListBegin"
This reverts commit 01798c3813.

The patch set changed a RecentChanges interface used in at least the
extension CleanChanges so that it was generating a lot of warnings.
Additional parameters to existing methods that are used elsewhere
should have defaults to not break backward compatibility.

Change-Id: I1851e23e186ba7aaeb001ba212e56888657a3ae0
2014-03-26 14:08:40 +00:00
Erik Bernhardson
01798c3813 New Hook rc/watchlist hook ChangesListBegin
An extension hooking into recent changes may need to load additional
data that did not fit into the recentchanges table.  This hook gives
revisions an opportunity to see the full result prior to rendering
and batch load where approprite rather than loading piecemeal during
the render process.

Change-Id: I28d4e41437e485e518f2a23b6da00cdc430a8c23
2014-03-24 18:33:15 -07:00
jenkins-bot
9089232169 Merge "Method to identify if a ChangesList is watchlist or normal" 2014-03-18 13:08:59 +00:00
umherirrender
194e54b116 Fix variable name of param doc in RCCacheEntryFactory
Change-Id: I8039ab9ea117ba351061da71a92409e320d8eb84
2014-03-15 13:13:05 +00:00
Erik Bernhardson
1b8db29ed5 Method to identify if a ChangesList is watchlist or normal
There are differences, like grouping, between watchlist and
normal rendering that hook recipients need to know about.
This exposes if the setWatchlistDivs method has been called
which currently happens immediatly after instantiation in
SpecialWatchlist

Change-Id: Ibc06c6d9b878cad3f5da92cfbe3f650ad3f63efa
2014-03-13 10:35:56 -07:00
jenkins-bot
102076134f Merge "Add RCCacheEntryBuilder, split from EnhancedChangesList and cleaned up" 2014-03-12 16:40:28 +00:00
This, that and the other
6cbdf65b4f Add $wgLocalInterwikis to handle multiple local prefixes
This is akin to $wgSkipSkin/$wgSkipSkins. It is quite plausible for a wiki
to have more than one self prefix (e.g. enwiki has w: en: wikipedia: and
maybe others).

Some recent changes code seems to use $wgLocalInterwiki for quite unclear
purposes:
- I removed the line using $wgLocalInterwiki from the RecentChange
  class, as the 'lang' field of $mExtra is not used anywhere in core code.
  Extensions may use it, but it would seem more appropriate for them to
  use something like $wgDBname (or indeed to consult $wgLocalInterwikis
  directly) if they need to identify a particular wiki.
- In the IRC formatter, the first prefix in the array is used (if set).
  Appropriate documentation is added to DefaultSettings.php.

Related to bug 954 comment 3.

Bug: 954
Bug: 955
Change-Id: I9dbb566385b464402c5e78510b95dd2ffb4d9489
2014-03-12 13:32:07 +01:00
aude
1c6b7c7485 Add RCCacheEntryBuilder, split from EnhancedChangesList and cleaned up
This makes it more feasible for Wikibase, Flow, etc. to support
enhanced changes format, and allow better support for the rc_source
column in the future.

Change-Id: I873f6b86007000a94337f0c963df4bf8fec5b715
2014-03-12 11:23:49 +01:00
Erik Bernhardson
4029c76d25 Only generate date header when rendering is guaranteed
The OldChangesListRecentChangesLine hook can skip rendering of
a particular rc line.  If that line was the one that would have
added a new date header then no date header is output.  The
pushes checking for a new date header until after we know a
line will be output so none of the headers get lost.

Change-Id: I64ddd99c6af0b562802504b803563cf77fc2eb28
2014-03-03 14:37:19 -08:00
Siebrand Mazeland
f077c4b1d6 Update formatting
Change-Id: I18aff576262479c9bb1c56eb8e1d1aaae200e4b1
2014-02-06 09:27:05 +01:00
umherirrender
712cdc59af Remove outdated todo from RecentChange.php
Documentation was added with r85781

Change-Id: I769e2a340dee3e41a0b7b05fe856f54bd55a32e6
2014-02-01 11:44:37 +01:00
jenkins-bot
ddb03593a1 Merge "Changes list legend modules cleanup" 2014-01-24 00:55:23 +00:00
Reedy
896149ec79 Short circuit in notifyRCFeeds
Save instantiating classes unnecesserily

Add getEngine return type hint. Also make public

Change-Id: Ie2610516f99fe7b01742e7e95e13c4b1b90c77d7
2014-01-22 07:18:27 +00:00
Bartosz Dziewoński
2ec4ed4711 Changes list legend modules cleanup
The legend is not part of the ChangesList itself, but a part of the
ChangesListSpecialPage; move around modules and calls appropriately.

Followup to I02f2ced4.

Change-Id: I2c8922135404aab1960158cee06e2d8d07a1ace7
2014-01-16 19:26:43 +01:00
Brad Jorsch
8bbf41ec84 SECURITY: Fix RevDel log entry information leaks
DELETED_ACTION is supposed to hide the target of the log entry. But a
few places weren't doing this properly.

This fixes:
* API list=logevents no longer returns the pageid when the target is
  hidden.
* Enhanced RecentChanges no longer includes the log target page in the
  CSS class. This should also make the CSS class actually useful.
* Watchlist no longer shows log entries with DELETED_ACTION unless the
  user has deletedhistory, and with SUPPRESSED_ACTION unless the user
  has suppressrevision.

Bug: 58699
Change-Id: I57f13bfc970a33ffd5a399ffb450d9ed0b77902f
2014-01-13 22:20:09 -08:00
Siebrand Mazeland
84e69f75b3 Various fixes for EnhancedChangesList
* Document class property type
* Update documentation and doc formatting
* Ensure variables are defined

Change-Id: I0c7db08d27ac807e989b626c36e72ae52be85d52
2013-12-30 17:48:14 +01:00
Bartosz Dziewoński
f2e55d1273 Rename SpecialRecentchangeslinked class to SpecialRecentChangesLinked
For consistency with SpecialRecentChanges.

This introduces no incompatibilities as PHP classes are case-insensitive.

Change-Id: I5855074deed52fd7492f033c8a8fced8af647602
2013-12-18 20:00:34 +00:00
Bartosz Dziewoński
a9e0c52c06 Make legend on Special:RecentChanges and Special:Watchlist collapsible
Some of the code added here is duplicated, redundant or would be
better off placed somewhere else. I know about this, but this is not
the time to fix that (and nobody would review such patches anyway…).

Bug: 52005
Change-Id: I02f2ced42f33649b6c972d35a4739372ca265e10
2013-12-18 17:40:03 +01:00
Bartosz Dziewoński
48cc8109c8 Wrap changes lists in <div class="mw-changeslist" />
This affects Watchlist, RecentChanges and RecentChangesLinked.

A <div class="mw-changeslist-empty" /> is already used on all of these
when the list isn't generated (somewhat inconsistently coded, though).

Bug: 8844
Change-Id: I1ab2a54e22f318713c2211d63b29c184751a3589
2013-11-26 23:13:51 +01:00
aude
322ecffcd1 Create cachedEntry after processing change block
Change-Id: I8b6b85104f15eb8325abace9b0a0653e16d748b9
2013-11-26 12:37:38 +01:00
aude
8f22e5eda0 Get date in EnhancedChangesList::recentChangesLine from baseRC
$cachedEntry gets set with baseRC, so baseRC timestamp is the
same as $cachedEntry timestamp.

Doing things this way makes it more feasible to split out some
of the change formatting code.

Change-Id: I1cae6174c827802d525bb95ed152c64008ce7360
2013-11-26 11:39:59 +01:00
jenkins-bot
166bba1443 Merge "EnhancedChangesList: Add missing </td></tr>" 2013-11-23 20:25:25 +00:00
jenkins-bot
276a5e4197 Merge "Add $counter which was defined dynamically" 2013-11-19 20:52:35 +00:00
jenkins-bot
2a57a1e986 Merge "Declare visibility on class properties of RCCacheEntry" 2013-11-19 20:04:49 +00:00
Siebrand Mazeland
8b2fa84356 Add $counter which was defined dynamically
Used in SpecialRecentChanges, ChangesList and SpecialWatchlist to keep
track of line numbers for RC list entries.

Change-Id: Ib0e76a325c36a5c019db8d55c150e3bf3bf1d19b
2013-11-19 20:56:18 +01:00
jenkins-bot
95dbbcf0d5 Merge "Declare visibility on class properties of RecentChange" 2013-11-19 19:53:15 +00:00
jenkins-bot
003e7e34da Merge "Various fixes for ChangesList" 2013-11-19 19:42:16 +00:00
jenkins-bot
cd07334e1e Merge "Update documentation for OldChangesList" 2013-11-19 19:32:09 +00:00
Bartosz Dziewoński
7a98f64b84 EnhancedChangesList: Add missing </td></tr>
Add closing </td></tr> tags for "title" of changes list row.

Change-Id: I5500b23bf35f302f0410b6fca3e4d02c490752f9
2013-11-19 20:09:00 +01:00
Siebrand Mazeland
14057d6e51 Declare visibility on class properties of RecentChange
All are referenced directly outside inheritence; declare all public.
Removed unused $mMovedToTitle.

Change-Id: I3ba8f377e1a1082d3a2bb4b043e10bc351c0b5dd
2013-11-19 12:45:14 +00:00
Siebrand Mazeland
8a0eb6de15 Various fixes for ChangesList
* Define dynamic class properties
* Update documentation and doc formatting
* Ensure variables are defined

Change-Id: I309affea9a8e8cfa24bd8fe694a16bf79d6f2419
2013-11-19 12:44:15 +00:00
Siebrand Mazeland
32e4fa931f Update documentation for OldChangesList
Change-Id: Ied9ec5219ff7b458a69c6d989b813dffa1583cd3
2013-11-19 12:43:28 +00:00
Siebrand Mazeland
df28a0043d Various fixes for RecentChange
* Do not return the value of a function that returns void
* Update documentation

Change-Id: I2b25bf34f578be516a19c84d45860ab6c7f93e0e
2013-11-19 12:43:02 +00:00
Siebrand Mazeland
c85e4668aa Declare visibility on class properties of RCCacheEntry
All are referenced directly outside inheritence; declare all public.
Removed unused $secureName and $versionlink.

Change-Id: If491d0f1cbf4d53692e0ecfd0e1df1f4c3761ca6
2013-11-19 09:46:46 +01:00
Siebrand Mazeland
0470a55b77 Update formatting
Change-Id: I7586c4d50f7332c515b8377749c4250cc9e04d83
2013-11-19 06:32:18 +00:00
Siebrand Mazeland
511d594bf6 Address CodeSniffer errors and warnings
Change-Id: Ie119db7d6d9e9eb3c1cd9c07b8f84fd155847c62
2013-11-19 06:28:51 +01:00
umherirrender
974562aee9 Remove recentchanges.rc_cur_time from sql statements
Field is unused since many versions, so remove the use in sql
statements, to allow dropping in a later version.

The field must not be reference from INSERT because it has a default
value, which is used, when no value is specified in the statement.

Keeping the field allows easier rollback on version update, when
something gets wrong with the new version.

Existing Comment in tables.sql was added with r101293, was already
disused in r11088

Bug: 40667
Change-Id: I4a9c2fa813d1f25dfb755e564f7677a212934d7b
2013-11-09 18:20:54 +01:00
jenkins-bot
fcf8c469ea Merge "Improve variable naming in EnhancedChangesList" 2013-11-08 15:57:52 +00:00
aude
9f1163edc8 Improve variable naming in EnhancedChangesList
Make clearer when we are dealing with an RCCacheEntry
vs. ordinary RecentChange object.

Change-Id: Id9342b033d46b9b700bd021c451d6f817cd25845
2013-11-08 14:27:47 +00:00
jenkins-bot
c62949f697 Merge "Remove deprecated ChangesList::newFromUser function" 2013-11-07 21:14:00 +00:00
jenkins-bot
039b272335 Merge "Add rc.unpatrolled to the recentchanges API" 2013-11-07 18:56:24 +00:00
aude
4ba5a09d05 Remove deprecated ChangesList::newFromUser function
newFromUser() is unused in core and all extensions in gerrit,
except BlueSpiceExtensions RSSStandards. (there is a
patch for that I1455052)

Change-Id: I4559146cc0e9973e6e4f6297138cbfd8e387e8b7
2013-11-07 02:14:28 +01:00
umherirrender
0d1beb5d13 fix typo in @deprecated
Change-Id: I4a8fb12238a3c1256c8d8d5348ca84dbc2820f3a
2013-11-05 19:01:26 +01:00
Erik Bernhardson
6bbd4bca6c Revert "Revert "Add new recentchanges field rc_source to replace rc_type""
This reverts commit 113f49bb21 after the
schema change has been completed.

Change-Id: I5412466444526986e1209d0982dd62cd5b387ad1
2013-10-25 13:10:42 -07:00
Timo Tijhof
5f078d3e56 Add rc.unpatrolled to the recentchanges API
On SpecialRecentChanges, the unpatrolled "bang" icon is only
rendered when:
- the user has the patrol right.
- the rc type is EDIT and rcpatrol is permitted, or
  the tc type is NEW and nppatrol is permitted.
- the rc event is in fact still unpatrolled.

In other words, when an edit is patrollable and unpatrolled.

However, consumers of the API are unable to render this because
the API only has a boolean "patrolled" attribute. Apps using
the absence of "patrolled" and presence of "patrol" right as
meaning "unpatrolled" get into trouble on wikis with RCpatrol
disabled and NPpatrol enabled. In those cases the app would
render a change as unpatrolled, but when the user clicks it
find out it can't be patrolled.

This adds an "unpatrolled" flag that does just that.

Change-Id: Ic947c6c75eb7936fcebdccbcd27ff62e07f1feda
2013-10-25 17:26:43 +02:00
aude
761b880e98 Split changes list classes into separate files
Having them separate improves readability of the code
and makes it easier to work with this code.

Change-Id: Ic6aaf1ace3640f66ad41c2d85b4f7d740b259e0c
2013-10-19 14:26:27 +00:00