Commit graph

66 commits

Author SHA1 Message Date
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
Sam Reed
58c7cf14d3 First merge of the rest of the code from bug 34508 patch 1 and patch 3 2012-02-21 21:26:15 +00:00
Sam Reed
e16a11ae16 Improve documentation
Fix whitespace


Fix weird conditional loading of DB_MASTER from specials/SpecialEditWatchlist.php
2012-02-21 21:15:05 +00:00
Alexandre Emsenhuber
5ca3075275 Fix parse error from r111965 2012-02-20 21:39:33 +00:00
Mark A. Hershberger
8ef1016603 fix bug #34495 — patrol log credit the user patrolled, not the user patrolling 2012-02-20 21:36:07 +00:00
Alexandre Emsenhuber
a72c61fbe4 Removed wfDeprecated() call from LogPage::logName() and LogPage::logHeader(); they are still widely used including in core. 2012-02-18 13:21:01 +00:00
Sam Reed
2ec09c5165 More return documentation 2012-02-09 21:35:05 +00:00
Sam Reed
0a626db6e1 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 19:29:36 +00:00
Sam Reed
85bbb0b080 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:10 +00:00
Aaron Schulz
44da495581 (bug 33374) - 'Deletion log summary not properly truncated' 2012-02-08 19:53:55 +00:00
Aaron Schulz
7bcb879bc3 Fixes for r96546 (bug 33167):
* Made LegacyLogFormatter try to respect the 'plaintext' parameter.
* Changed LogPage::addEntry() to use LogFormatter to get the action text as such calls to LogPage::actionText() are broken.
* Added comment to LogPage::actionText(). It's only OK to call this from the legacy log formatter, fetched via the proper factory functions.
* Converted CheckUser to using LogFormatter so that cuc_actiontext values work. Eventually, cuc_actiontext should be replaced with new cuc_params, cuc_log_type, and cuc_log_action fields, similar to the RC table.
2012-02-08 19:52:04 +00:00
Aaron Schulz
1a40d93949 In LogFormatter:
* Changed LogFormatter to support displaying redacting log items if the context user can see them. The default mode is still "show only public items".
* Fixed static calls to non-static getRestrictedElement() function.
* Cleaned up LogFormatter that build up vars only to then throw them away and replace them with rev-deleted placeholders.
In RevDel_LogItem:
* Use LogFormatter instead of raw LogPage::actionText call as such calls are broken and just displayed things like the string "move" (the log action name) instead of "x moved a to b: reason" and such. Fixes r96546.
2012-02-07 23:12:17 +00:00
Aaron Schulz
6b239b0416 Made LogEntry::getPerformer() not fail miserable if we got the LogEntry via newFromRow() on just a logging table row. Previously, the current user IP would show. 2012-02-07 22:22:27 +00:00
Antoine Musso
fc6bc233be Fix doxygen docs before REL1_19 branching 2012-02-01 20:53:38 +00:00
Niklas Laxström
2ad96d59c8 Can't PHP just DWIM? Ping r109628 2012-01-20 19:09:55 +00:00
Niklas Laxström
35301bc19c Reducy query flood in r96546. Allow formatters to provide titles for LinkBatch. 2012-01-20 16:57:46 +00:00
Niklas Laxström
b18bef923b Split LogPager out of LogEventsList.php 2012-01-20 09:44:39 +00:00
Jeroen De Dauw
46dc391fb3 added some docs 2012-01-15 16:13:16 +00:00
Krinkle
be12ebf1ab [Core JS] More fixing of global config variable usage
* mw.config is the new way, and global config variable lookups are deprecated

* Based on two phase3-wide quick searches:
-- of " wg": http://toolserver.org/~krinkle/wikimedia-svn-search/view.php?id=321&hash=81700bf7486e4fee3b7bc1f83eb9eba6
-- of "!wg": http://toolserver.org/~krinkle/wikimedia-svn-search/view.php?id=327&hash=47c9d54a7a1d5d58a724dd834585f40d

Related changes:
* Changed some php comments mentioning "wg" variables to include the dollar sign, and a typo when the wf function prefix was meant.
* Removed TODO comment in wikibits.js and made it use the JS equivalent of wfUrlencode, which we have now, mw.util.wikiUrlencode 
* SpecialUpload.php: use OutputPage::addJsConfigVars instead of creating a new script tag through OutputPage::addScript(Skin::makeVariablesScript(..))
* Renamed wgUploadSetup in upload.js and made it local. Not used anywhere in ./trunk/phase3 and ./trunk/extensions
* Fix OutputPage::addJsConfigVars so that it can actually be called with an array instead of two arguments for key/value
* Some minor whitespace/convention stuff around the same line
2011-12-31 21:25:00 +00:00
Brian Wolff
957850f0da If you request LogEventList to display the combination of 2 log types, and one of
those logs are restricted, will generate a warning, since it removes first entry of
array, but doesn't re-index the array, and subsequent code makes assumptions of the
form if ( count( $this->types ) $singleType = $this->types[0] (which doesn't work, as
first index is 1).

Thus cause array to be re-indexed if a $wgLogRestriction causes a log type to be removed.

Steps to reproduce the issue is make deletion log restricted, then view a (non-existent) user page.

Personally I think its kind of weird/wrong that if someone restricts both the move and delete log,
then viewing a non-existent will give "This page has been deleted, here's delete log:" followed by an
entry from *any* public log.
2011-12-20 06:16:08 +00:00
Jeroen De Dauw
43f00eb80c follow up to r106393 - re-add these notices, since now they wont show for people that change the depr limit to see them 2011-12-16 00:24:00 +00:00
Jeroen De Dauw
ed8d203227 move logging pages to logging dir 2011-12-14 22:48:48 +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
82277e5fdc Fixed doc typo 2011-11-06 05:43:03 +00:00
Niklas Laxström
6470c75721 Quick ugly fix to avoid duplicate log entries in rc feed.
I didn't think that save() would send lines, since there was function to do that (added in r45725 - duplicating existing code).
This part of codebase could use much TLC
2011-11-03 17:07:29 +00:00
Sam Reed
9d41b95053 Kill various unused variables
Comment some out also

Add some bits of documentation
2011-10-29 01:17:26 +00:00
Platonides
d581e9dd5a Removal of unused globals 2011-10-27 20:48:09 +00:00
John Du Hart
f31602e621 Followup r100396, use is_string instead of !is_array 2011-10-21 20:24:03 +00:00
John Du Hart
a34075b217 Bugfix to r96441, class_exists throws warnings when arrays are passed to it 2011-10-21 00:09:56 +00:00
Niklas Laxström
894de88cfb Followup r97138 - could not reproduce myself 2011-10-03 03:35:18 +00:00
Niklas Laxström
d19db48793 Followup r98135
* Added gender parameter to newuserlog-create2-entry
* Hide old comments (for all log types!)
* logentry-newusers-newusers needs a message after all
* Move user tool links away from the action links and drop the User: prefix from create2
2011-09-28 20:28:40 +00:00
Niklas Laxström
f2553a0c58 Moved PatrolLog to logging folder, sorted the autoloaded entries alphabetically 2011-09-20 08:39:29 +00:00