Commit graph

97 commits

Author SHA1 Message Date
umherirrender
27b9ecc6f9 Do not use Checkboxes for user without deletelogentry in log
When a user has only deletedhistory and not deletelogentry he should not
see checkboxes, because the button at the begin of the page is missing
and than the checkbox is useless. Use links instead, as the history page
does.

Change-Id: Icae8267dcf3032437eae08372ddbe5769bed7a86
2012-09-21 15:16:29 +02:00
Siebrand Mazeland
21b592d1ad Replace deprecated methods.
Also updated code formatting.

Change-Id: I188b5d29c9496383df10c391b29e9d26e59e8aeb
2012-09-08 00:28:16 +02:00
Siebrand Mazeland
4e1ccf0267 Replace deprecated wfMsg* calls with Message class calls.
Doing this in steps of roughly 100 changes per commit, so that it remains reviewable.

Change-Id: I4950fdf8be669b52446290768ece0b8df8399d5d
2012-08-20 22:52:17 +02:00
IAlex
de973bb0e1 Merge "(bug 37638) Remove calls to deprecated LogPage::logName method." 2012-08-15 10:28:12 +00:00
Alexandre Emsenhuber
e93fa029e2 Moved "action links" from LogEventsList to LogFormatter.
* This allow extensions to set both action text and links directly
  from a subclass LogFormatter instead of having to use the LogLine
  hooks for this purpose.
* Moved stuff for logs that already use a subclass of LogFormatter
  there and the remaining in LegacyLogFormatter. I had to an hack
  there so that the pass-by-ref of the comment parameter in the
  LogLine hook still works.
* Removed RevisionDeleter::getLogLinks(), included it directly in
  DeleteLogFormatter::getActionLinks(); it have a so ugly signature
  that is very hard to use it somewhere else (and maintain backward
  compatibility too).
* Removed the message caching system in LogEventsList since it's
  not used anymore.
* Some misc cleanup to LogEventsList::logLine()

Change-Id: I96d696eed2ae35f5f5640e422ceb0a5b0c33babf
2012-08-15 11:02:50 +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
Reedy
e3f2a90bf0 Remove unused variables/function values returned
Fix trailing whitespace

Change-Id: I53abf75e142f0166032b98e4adb3dabe06643017
2012-08-08 00:47:25 +01:00
Alexandre Emsenhuber
a4b2e8f98a Fix missing occurence change in I6b69919a (747e89e).
The line above changed in that revision, but not this one,
so I highly suspect that this occurence of deleterevision
should have been changed to deletelogentry.

Change-Id: Ief4ca9acf08bccc8ff064cea5795a2dbeae44d19
2012-07-22 21:03:43 +02:00
Alex Monk
747e89ed57 (bug 37926) Split 'deleterevision' right for log entries
This change adds a new permission ('deletelogentry') which is required to be able
to delete log entries.

It does not affect who can see deleted content.

Change-Id: I6b69919a1bdc502becc1ae4ac9169b8b0e85bfdc
2012-07-21 20:34:23 +01:00
Alexandre Emsenhuber
897b1cb2f6 Use Linker::userToolLinksRedContribs() in LogFormatter.
It is much more self-describing to use that method instead of
Linker::userToolLinks() with true as third parameter.

Change-Id: I30fbef2e06c7a835a66130cc54e10e114e286914
2012-07-18 12:10:13 +02:00
Aaron Schulz
1677c02ff1 Merge "(bug 38093) Gender of changed user groups missing in log" 2012-07-13 18:40:44 +00:00
Antoine Musso
12e608e3d5 converts '@fixme' to '@todo FIXME'
@fixme is simply not recognized by doxygen whereas @todo is used to
generate a nice ... todo list!!

Change-Id: If956c0a164373126ce48b791d45c56962034eecd
2012-07-10 17:16:46 +02:00
Antoine Musso
d5737f8f17 update @param @return doc in several files
Change-Id: I0e23227330f90dc4121fd2a313d2e9a33c3c97a7
2012-07-10 17:08:52 +02:00
Alexandre Emsenhuber
fa569beea3 pass Language to wfMessage() calls
Pass the Language object to the wfMessage calls in
LogPage::getTitleLink() and LogPage::formatBlockFlags().

Change-Id: I4f8347d6616ee0e6be31b268679b398e108680c0
2012-07-09 14:37:18 +02:00
umherirrender
0aa5c8f70a (bug 38093) Gender of changed user groups missing in log
Change-Id: I1d2c5e1ae3a81ea5ab0e081ecbf74f7c44982291
2012-07-07 17:31:04 +02:00
Nikerabbit
c9b47b9f06 Merge "Make PatrolLog::record() use RecentChange::getTitle(); no need to create a new object itself." 2012-07-03 07:57:24 +00:00
Siebrand
bd7d172d2c Merge "Make LogFormatter::msg() use RequestContext::msg() instead of reinventing the wheel and making everything itself." 2012-07-01 15:07:38 +00:00
Alexandre Emsenhuber
03cc82d698 Make PatrolLog::record() use RecentChange::getTitle(); no need to create a new object itself.
Change-Id: I5b8f58cf03669768132c64aafa3a968e198a7f73
2012-06-30 21:27:41 +02:00
Alexandre Emsenhuber
9712def705 Made LogEventsList extend ContextSource and use local context instead of global variables there.
Modified the constructor so that it simply needs a IContextSource in the first parameter, but it
still accepts a Skin object instead. The second parameter is now unused. Updated SpecialLog accordingly.

Change-Id: I6dde2a23d98568abe10e92f0761ae3be7c65a856
2012-06-25 22:17:17 +02:00
Alexandre Emsenhuber
f00a54ffb8 Fixes to LogEventsList.
* Removed useless variables
* Use Linker::linkKnown() instead of Linker::link() where possible

Change-Id: I7cb668ef929cee159946a46cbcb07464a0913f81
2012-06-15 22:04:44 +02:00
Alexandre Emsenhuber
44a8e83929 Make LogFormatter::msg() use RequestContext::msg() instead of reinventing the wheel and making everything itself.
Change-Id: I4df5a2d1dc9e05d6cf92a0a4f6e77a36c063c58e
2012-06-15 20:26:39 +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
Aaron
c2443ec058 Fixed bit math logic error in 0e765f8405.
Change-Id: Idfba3971f9c2d47967d1210352d8fb25583834e0
2012-06-05 10:10:11 -07:00
Aaron Schulz
ffe6613ff7 Merge "Show revdel links instead of checkboxes on pages where there is no multiple log entry revdel form." 2012-05-31 18:48:03 +00:00
Alex Monk
0e765f8405 Show revdel links instead of checkboxes on pages where there is no multiple log entry revdel form.
Change-Id: Ie061ee5b77a39c13628bfdb73f09cb3fa97dd090
2012-05-30 19:43:38 +01:00
Catrope
87e6aaf9bf Make the private-logs-UDP code path in saveContent() also return $newId
This was an oversight in a69fb48274 which
changed saveContent() (and, by extension, addEntry()) to return a log_id
rather than a boolean.

Also update the documentation comments to reflect this, and remove a
resolved TODO

Change-Id: I8fe269f452f8c8d4fa0318c120b676ac10efebae
2012-05-13 14:47:19 -07:00
umherirrender
d6c651f608 Add user talk page in newusers log to LinkBatch
Using NewUsersLogFormatter::getPreloadTitles for that

Change-Id: Ib3bede90e33c3d240aad5950247d52d732d8876b
2012-05-11 21:27:40 +02:00
Brion VIBBER
3d7f9d6fee Merge "(bug 20189) Added 'Show/hide selected revisions' button and checkboxes to Special:Log." 2012-05-08 18:36:05 +00:00
Alex Monk
961a8d1e7f (bug 20189) Added 'Show/hide selected revisions' button and checkboxes to Special:Log.
Change-Id: I2c4d4e1234d5ab9f7d514831351ea3b298811165
2012-05-08 02:32:15 +01:00
Alexandre Emsenhuber
7d9016943d Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I1815587ab2eeb24623ce4bf1c695088bd3f1c2ea
2012-04-30 09:16:10 +02:00
Max Semenik
c945156dde (bug 35565) Special:Log/patrol doesn't indicate whether patrolling was automatic
Change-Id: Ia4d9ffcfda719fd94ac5e01f0e35c4c5823d7d72
2012-03-29 03:00:19 +04:00
Marcin Cieślak
de5222aedf Unbreak maintenance/deleteDefaultMessages.php for PostgreSQL
deleteDefaultMessages.php was failing during upgrade
from MediaWiki 1.7.3 with a databaser error.

A stub user:

   $user = User::newFromName( 'MediaWiki default' );

has user ID 0, so that $user->isAnon() is true.

Unfortunately, ManualLogEntry::publish() from r96441
tries to insert $user->getName() ("MediaWiki default")
into rc_ip.

PostgreSQL won't allow this, because rc_ip is of 
Postgres-specific CIDR type.

Traceback:

Checking existence of old default messages...
...deleting old default messages (this may take a long time!)...A database query syntax error has occurred.
The last attempted database query was:
"INSERT INTO "recentchanges" (rc_timestamp,rc_cur_time,rc_namespace,rc_title,rc_type,rc_minor,rc_user,rc_user_text,rc_comment,rc_this_oldid,rc_last_oldid,rc_bot,rc_moved_to_ns,rc_moved_to_title,rc_ip,rc_patrolled,rc_new,rc_old_len,rc_new_len,rc_deleted,rc_logid,rc_log_type,rc_log_action,rc_params,rc_id) VALUES ('2012-03-14 21:51:05 GMT','2012-03-14 21:51:05 GMT','8','1movedto2','3','0','0','MediaWiki default','No longer required','0','0',1,'0','','MediaWiki default','1','0',NULL,NULL,'0','1','delete','delete','a:0:{}','1')"
from within function "RecentChange::save".
MySQL returned error "1: ERROR:  invalid input syntax for type cidr: "MediaWiki default"
LINE 1: ...ki default','No longer required','0','0',1,'0','','MediaWiki...
                                                             ^"
Backtrace:
#0 /usr/home/saper/public_html/pg/w/includes/db/DatabasePostgres.php(332): DatabaseBase->reportQueryError('ERROR:  invalid...', 1, 'INSERT INTO "re...', 'RecentChange::s...', '')
#1 /usr/home/saper/public_html/pg/w/includes/db/Database.php(904): DatabasePostgres->reportQueryError('ERROR:  invalid...', 1, 'INSERT INTO "re...', 'RecentChange::s...', '')
#2 /usr/home/saper/public_html/pg/w/includes/db/DatabasePostgres.php(604): DatabaseBase->query('INSERT INTO "re...', 'RecentChange::s...', '')
#3 /usr/home/saper/public_html/pg/w/includes/RecentChange.php(199): DatabasePostgres->insert('recentchanges', Array, 'RecentChange::s...')
#4 /usr/home/saper/public_html/pg/w/includes/logging/LogEntry.php(479): RecentChange->save('pleasedontudp')
#5 /usr/home/saper/public_html/pg/w/includes/WikiPage.php(2042): ManualLogEntry->publish('1')
#6 /usr/home/saper/public_html/pg/w/includes/WikiPage.php(1937): WikiPage->doDeleteArticleReal('No longer requi...', false, 0, false, '', Object(User))
#7 /usr/home/saper/public_html/pg/w/maintenance/deleteDefaultMessages.php(73): WikiPage->doDeleteArticle('No longer requi...', false, 0, false, '', Object(User))
#8 /usr/home/saper/public_html/pg/w/maintenance/update.php(128): DeleteDefaultMessages->execute()
#9 /usr/home/saper/public_html/pg/w/maintenance/doMaintenance.php(105): UpdateMediaWiki->execute()
#10 /usr/home/saper/public_html/pg/w/maintenance/update.php(151): require_once('/usr/home/saper...')
#11 {main}
2012-03-15 01:52:38 +00:00
Sam Reed
b18ea7dee2 Normalise casing of getArticleID used in core 2012-03-11 18:54:55 +00:00
Siebrand Mazeland
fe9cd7ef73 (bug 34702) More localised parentheses. 2012-02-28 12:41:26 +00:00
Krinkle
3cb731351e [IRC Log Message] Fix for protect/protect and protect/modify
* protect/protect and protect/modify were still failing because the output on IRC is not matching the i18n messages. The bots look for comment.match(<i18n-message> + (optionally) followed by ": user comment").
* The problem with protect/protect and protect/modify is that the protection settings are also inserted in somewhere in the message. Before MediaWiki 1.19 these were included in the IRC message as part of $1 (title). That may be ugly, but that's how it has always been. Since the point is to reproduce the old output we need to fix this one as well. This will make the output like:

  Krinkle * protected "[[Sandbox [edit=autoconfirmed)]]"

which is exactly how it has been before and that's the the bots rely on (which was presumably done originally like that since it was the only way to make the output match the i18n message)

* Fixes more bug 34508
2012-02-28 01:56:15 +00:00
Niklas Laxström
51220faa74 Followup, restore the irctext variable just in vase, ping r112132 2012-02-22 19:01:02 +00:00
Niklas Laxström
44e9898129 Uglier than ugly hack to fix block log any many others by not having the username prepended on the messages 2012-02-22 18:56:14 +00:00
Rob Lanphier
cba853e5bd r112045/bug 34508: Make upload/upload and overwrite match old IRC format 2012-02-22 18:29:18 +00:00
Aaron Schulz
323ae5f6ce * General log formatting fixes, like using the content language, for IRC feeds (works similar to LogPage::actionText). Use getPrefixedText() for the log title, not just the non-namespace part.
* Made patrol log IRC code behave as it did pre-r97495.
2012-02-22 02:28:17 +00:00
Aaron Schulz
c8a65f837d Made getIRCActionText() public again...since the old LogPage still uses it, ugh 2012-02-22 00:36:31 +00:00
Aaron Schulz
f5d3d02a98 Made use of new getIRCActionComment() function so that comments are back in IRC lines. 2012-02-22 00:26:29 +00:00
Sam Reed
21c569c5a2 Move parameters were backwards
Ping r112061
2012-02-22 00:00:44 +00:00
Aaron Schulz
689b261466 r112062: updated LogEntry publish() function too 2012-02-21 23:51:18 +00:00
Aaron Schulz
aefb143645 r112062: swap the getPlainActionText() for IRC with new getIRCActionText() function 2012-02-21 23:42:10 +00:00
Aaron Schulz
6846f3c3a8 Separate out an IRC actionText field for RecentChange. The two are currently the same but that will change soon. 2012-02-21 23:39:14 +00:00
Sam Reed
b5443a3bdd Bug 34508 - [Regression] IRC string output for log messages no longer compatible
Update messages/MessagesEn.php

Add large backcompat switch conditional thing
2012-02-21 23:38:08 +00:00
Alexandre Emsenhuber
75da88318c Added $performer parameter to PatrolLog::record() and pass it from WikiPage::doEdit() and RecentChange::doMarkPatrolled() since the performer is not necessarily $wgUser 2012-02-21 22:27:33 +00:00
Sam Reed
d7e40dbe00 Effectively revert r112042
Followup r112045, remove the irc key name changes
2012-02-21 21:54:27 +00:00
Sam Reed
a30e8a8e47 consistently use $entry 2012-02-21 21:27:39 +00:00