Commit graph

130 commits

Author SHA1 Message Date
Aaron Schulz
860eb6bed8 And this was true... *sigh* 2008-09-30 13:36:40 +00:00
Aaron Schulz
629db4f5d3 Revert self - local issue 2008-09-30 13:35:15 +00:00
Aaron Schulz
7e89f520eb Don't assume edits are bot edits just because there is no 'bot=' url param... 2008-09-30 13:31:48 +00:00
Aaron Schulz
c0d49305dc Remove commented out code 2008-09-24 13:49:48 +00:00
Tim Starling
80a610618c Fix unnecessary GlobalFunctions.php bloat from r41148 2008-09-24 08:36:44 +00:00
Aaron Schulz
9894dfb363 Refactor RC2UDP code some 2008-09-22 12:22:18 +00:00
Tim Starling
d149d7e387 Fixed two patrol bugs:
* Return of ID instead of object from notifyNew() caused markPatrolled() to fail when the master and slave are different connections
* doMarkPatrolled() incorrectly checked for the patrol right instead of the autopatrol right when automatic patrol was requested.

Also fixed some formatting, more needed.
2008-09-20 07:55:14 +00:00
Aaron Schulz
22c8d2d293 * Clean up patrol code to not possibly log twice (depended on slave lag)
* Make notifyEdit() return the whole RC object
* Spacing tweaks
* Wrap patrolling in a transaction
2008-09-19 00:11:41 +00:00
Tim Starling
6730363fa1 Revert r40627, r40551, r40536, r40535 (mark non-autoconfirmed users in RC and watchlist with an orange asterisk). Potentially slow, potentially controversial, so it needs a configuration option to enable/disable it. 2008-09-16 05:56:43 +00:00
Aaron Schulz
9b20471b66 * Mark non-autoconfirmed users in RC
* Avoid overselecting fields in RC and add $fields to SpecialRecentChangesQuery
* Some whitespace tweaks in RecentChange.php. Remove dead code.
* Avoid rc_new check in ChangesList
* Move some "unpatrolled" CSS to shared.css. Add 'newuser' CSS.
* Bump style version
2008-09-06 15:01:59 +00:00
Roan Kattouw
bd3bf5d2a7 * Split patrol code
** Backend code moved to RecentChange::reallyMarkPatrolled() and doMarkPatrolled()
** Adapted Article::markpatrolled()
* (bug 15466) Added action=patrol to the API. Modified patch by Soxred93
* Added rctoken=patrol to list=recentchanges
* Detect duplicate warnings in ApiBase::setWarning()
2008-09-04 15:17:51 +00:00
Tim Starling
55bc27c609 Minor log-related changes for documentation and to support a potential extension 2008-08-25 03:08:56 +00:00
Chad Horohoe
84b7170d85 Remove useless param in RecentChange::newFromCurRow() 2008-06-16 02:39:43 +00:00
Chad Horohoe
226d93340b (bug 14132) Allow user to disable bot edits from being output to UDP. 2008-06-10 13:56:35 +00:00
Danny B
84cb1ed971 * Bug 14245 - Bot flag not shown on RC IRC posts
* switching the M & N flags order
2008-05-24 01:04:32 +00:00
Brion Vibber
a4ffac4063 Revert r35178 and normalize User's getID() and setID() methods to prettier getId() and setId()
This doesn't accomplish anything, of course, but if you're going to run around changing them, at least make em prettier eh? :)
2008-05-22 16:39:43 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Aaron Schulz
2cf12c973d * Make enotif job use user ID rather than name for users. Fallback to name for anons and for old job rows (B/C). This makes it rename safe.
* User->getID() already returns an integer
* Use != rather than <>, as it looks clearer
* Do not add "updated since" to users for their own edits
* Actually check $wgShowUpdatedMarker properly. It is it's own setting.
2008-05-17 23:34:28 +00:00
Aaron Schulz
0a8cd4cc91 Anons have ID 0 2008-05-17 22:57:46 +00:00
Aaron Schulz
833a81e84b Don't assume $wgUser is always the editor, it's poor practice and confusing... 2008-05-17 22:37:06 +00:00
Aaron Schulz
ac4e9adb63 Revert self - bogus location 2008-05-17 22:32:39 +00:00
Aaron Schulz
cbd7cc3d47 Don't notify users of their own edits at least 2008-05-17 22:23:56 +00:00
Brion Vibber
53aab1da02 revert r34818 -- bad 2008-05-14 21:56:30 +00:00
Greg Sabino Mullane
9772421df8 Don't attempt to store the page_id in recentchanges table if we are deleting. 2008-05-14 17:44:05 +00:00
Aaron Schulz
93f97a6712 Actually color replace on the right prefixed text 2008-04-21 23:15:17 +00:00
Aaron Schulz
da45109f74 Clean this up a bit 2008-04-21 23:10:20 +00:00
Aaron Schulz
b1d16453d8 Use prefixedText(), rather than IRC clean text for replace call on comment to make blue color (bug 13662) 2008-04-21 22:59:54 +00:00
Aaron Schulz
3b59a4709c Remove old nonsensical code 2008-04-20 14:31:02 +00:00
Aaron Schulz
165cfc590a * Clean up IRC feed
* Remove some unused vars
2008-04-20 14:24:10 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Aaron Schulz
9cbc0cf53d Use new fields 2008-04-02 05:07:46 +00:00
Brion Vibber
deb2045611 * (bug 12294) Namespace class renamed to MWNamespace for PHP 5.3 compatibility
* PHP 5.3 compatibility fix for wfRunHooks() called with no parameters

An autoloaded 'Namespace' class alias is retained for compatibility with
extensions which haven't updated to the new class name... however they too
will break on PHP 5.3. Yay!
2008-03-21 23:13:34 +00:00
Aaron Schulz
0f64dac23d r32045 committed from wrong working branch. Revert and commit the one I wanted. 2008-03-16 21:02:10 +00:00
Aaron Schulz
4490d3eea8 Load extra RC fields 2008-03-16 20:59:59 +00:00
Aaron Schulz
72f6c42844 Don't allow double logging of patrol events 2008-02-25 05:58:10 +00:00
Roan Kattouw
1c2b1a23f1 Removing unused global $wgRequest; that I missed in the previous commit. 2008-01-10 13:37:01 +00:00
Roan Kattouw
4c1c04dcae Fixing the mess that was r29539:
* $wgRequest shouldn't be used in functions like Article::doEdit() that are also called by API modules
* Moving code that decides whether the edit is bot out of DB logic and into UI logic: API and UI each decide indepentently from one another
* Removing $bot==='default' behavior from RecentChange::notifyEdit() and notifyNew(): nobody uses it, and it shouldn't be used anyway; whether the edit is bot should've been decided long ago
2008-01-10 13:33:23 +00:00
Daniel Cannon
bd7eafea20 * (bug 12574) Allow bots to specify whether an edit should be marked as a bot
edit, via the parameter 'bot'. (Default: '1')

Patch by Cobi <Winbots at gmail dot com>.
2008-01-10 09:54:35 +00:00
Tim Starling
353f203ce2 WARNING! NEEDS CAREFUL DEPLOYMENT
* Bug 9213: Fixed the plainly broken user_newtalk updating and caching scheme. I tried to keep my changes roughly performance-neutral, but the update on Wikimedia should be watched carefully for performance problems.
* Made UserMailer a class, use the autoloader to load it
* General UserMailer refactoring
* If the user has email-on-newtalk enabled, send them an email for every change, not just the first one before they view the page again.
* Don't add a watchlist entry automatically on change of user talk page
2007-10-03 08:46:17 +00:00
Brion Vibber
9be2c3676a Revert r26281 for the moment. Big patch, changes several existing practices. Will want some public testing and more review before taking it to trunk. 2007-10-01 19:50:25 +00:00
Aaron Schulz
4febfc77c2 *Clean up deletion of revisions and remove some gaps
*Allow blocking of users to hide names
*Implement revision deletion for images/deleted files/deleted revs
*Log deletion set off for now
*Add 'hidden' file dir
*Dissallow merging via undelete (which was inefficient and hard to reverse)
*Use restore points and diffs to special:undelete
*Add a special page to merge pages
*Get changeslist to use tables to avoid ugly formatting
*Add logs into RC for rebuildrecentchanges.php
*Add private logs
*List private logs at specialpages
*Tweak/add some deletion and merge messages
2007-10-01 19:38:28 +00:00
Nick Jenkins
786e93fb37 Static code analysis housekeeping time... things that could be double-checked are marked with "[Note: some-comment]" :
if-if-else without curly braces [api/ApiQuerySiteinfo.php] --> adding
Unused global declaration:  $wgGroupPermissions --> removing 
Unused global declaration:  $wgEmailConfirmToEdit (line 301) --> removing 
Variable $id appears only once (line 1021)  --> removing 
Variable $m was used before it was defined (line 805) --> defining.
Variable $retval was used before it was defined (line 2346) --> renaming to $result
Variable $rcid appears only once (line 244 of RecentChange.php)  --> using this instead of $change [Note: was left over from r24607 refactoring, revert if wrong please]
Unused global declaration:  $wgCommandLineMode (line 11) --> removing
Variable $k appears only once (line 132 of ImagePage.php) --> removing.
Variable $info appears only once (line 311 of ImagePage.php)  --> removing.
Unused global declaration:  $wgTitle (line 569 of ImagePage.php) -> removing.
Variable $handlerParams was used before it was defined (line 616 of Linker.php) --> resolved by Raymond in r24966
Variable $match was used before it was defined (line 1031 of Linker.php) --> defining.
Unused global declaration:  $wgEnotifWatchlist (line 253 of UserMailer.php) --> removing 
Unused global declaration:  $wgShowUpdatedMarker (line 253 of UserMailer.php) --> removing 
Variable $img appears only once (line 446 of SpecialUpload.php) --> added definition, defined as null, flagged with @todo  [Note: should $img be defined in this context, or is it intended to be null? And should the return value after the hook be checked in some way?]
Unused global declaration:  $wgEnableAPI (line 739 of SpecialUpload.php) --> removing.
Unused global declaration:  $wgNamespaceProtection (line 1030 of OutputPage.php) --> removing.
Unused global declaration:  $wgContLang (line 18 of SpecialWatchlist.php) --> removing.
Unused global declaration:  $wgRawHtml (line 269 of SpecialMovepage.php) --> removing.
The value of variable $page was never used (line 331 of SpecialUndelete.php) --> removing line, as $page gets redefined a few lines down.
Variable $synIndex appears only once (line 521 of MagicWord.php) --> commenting out.
Variable $case appears only once (line 539 of MagicWord.php) --> removing from foreach index key usage.
Variable $wgUser appears only once (line 1039 of Title.php) --> adding line to declare as a global, would be null otherwise.
Variable $m was used before it was defined (line 285 of Title.php) --> defining.
Variable $id appears only once (line 1150 of Title.php) --> removing from foreach index key usage.
Variable $subpage appears only once (line 1297 of Title.php) --> commenting out.
Variable $restrictions appears only once (line 1399 of Title.php) --> commenting out.
Variable $mime appears only once (line 210 of filerepo/OldLocalFile.php) --> removing.
Variable $deprefixedName appears only once (line 213 of filerepo/LocalFile.php) --> removing.
Variable $m appears only once (line 541 of filerepo/LocalFile.php) --> removing.
Variable $where appears only once (line 1245 of filerepo/LocalFile.php) --> removing.
Variable $info appears only once (line 1427 of filerepo/LocalFile.php) --> removing.
Variable $rel appears only once (line 138 of filerepo/RepoGroup.php) --> commenting out.
Variable $zone appears only once (line 138 of filerepo/RepoGroup.php) --> commenting out.
Variable $nbytes appears only once (line 208 of media/Generic.php) --> added a return line that uses $nbytes. [Note: I'm assuming that this was the intent]
Variable $offset appears only once (line 201 of SpecialListusers.php) --> removing.
Variable $limit appears only once (line 201 of SpecialListusers.php) --> removing.
Variable $groupTarget appears only once (line 203 of SpecialListusers.php) --> removing.
Unused global declaration:  $wgLang (line 74 of SpecialWantedpages.php) --> removing.
Variable $block appears only once (line 244 of SpecialProtectedpages.php) --> removing.
Variable $offset appears only once (line 281 of SpecialProtectedpages.php) --> removing.
Variable $limit appears only once (line 281 of SpecialProtectedpages.php) --> removing.
Unused global declaration:  $wgLang (line 30 of FileDeleteForm.php) --> removing.
Unused global declaration:  $wgServer (line 30 of FileDeleteForm.php) --> removing.
2007-08-21 03:57:54 +00:00
Rob Church
aaf9612fd4 Mark static methods as such 2007-08-15 15:37:28 +00:00
Rob Church
4280f45ccc * (bug 10793) Show patrol links on all eligible diff pages
* Introduce RecentChange::newFromConds() to support the above, and a new index
* Refactored some bits
2007-08-06 03:29:40 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
River Tarnell
a6f6e04841 instead of storing every mail as a job, have a job to send enotif updates for the whole mail at once. 2007-05-11 16:42:18 +00:00
Aryeh Gregor
7125495256 (bug 9860) Fix bug caused by true == 'default' (don't you love PHP?). Thanks to Ben White/Philip.
I'm not sure how to phrase this for RELEASE-NOTES since I'm not sure what it does exactly; does it only affect extension-writers or something?  From looking at the code I can't even see how the execution path is ever even followed, except maybe from maintenance scripts.
2007-05-10 01:24:51 +00:00
Brion Vibber
9150412fe7 For now revert the rev_deleted branch merge; don't want trunk to get too far gone before changes are reviewed!
Reverted: 20511, 20510, 20507, 20474, 20461, 20460, 20457, 20448, 20446
2007-03-16 16:01:07 +00:00
Aaron Schulz
2448539ad9 *Merge in phase3_rev_deleted/includes 2007-03-14 15:50:06 +00:00
Nick Jenkins
f88c771756 The war on redundant ampersand usage!
* Convert "$dbw =& wfGetDB( DB_MASTER );" --> "$dbw = wfGetDB( DB_MASTER );"
* convert "$skin =& $wgUser->getSkin();" --> "$skin = $wgUser->getSkin();"

For the time being have not changed the function definitions of wfGetDB() or User::getSkin() [i.e. they are still both return-by-ref], so as to ensure the interface does not change for extensions [some of which may still be trying to run on PHP4 environments]. However presumably at some point this can be changed too.

Also includes tiny tweak to newlines in parserTests - will show 1 rather than 2 newlines between the "Reading tests from" strings when in quiet mode.
2007-01-22 23:50:42 +00:00