Commit graph

23 commits

Author SHA1 Message Date
Tim Starling
60fbfaa93f * Use a separate transaction for the site_stats update
* Remove obsolete runtime schema check
2008-09-26 15:35:11 +00:00
Aaron Schulz
41591cbdce rc_log_type can be null, and NULL != 'x' is treated as false, which borked the count. (bug 15682) 2008-09-21 22:56:59 +00:00
Aaron Schulz
1627c222df Remove some individual transactions 2008-09-19 10:13:32 +00:00
Aaron Schulz
991bb4c016 * Remove mysql var and move field init to updaters.inc 2008-09-01 19:22:28 +00:00
Aaron Schulz
332c496506 * Maintain active user count for Special:Statistics (bug 13585)
* Add a global to add update functions to updateSpecialPages.php
2008-08-31 19:29:37 +00:00
Chad Horohoe
7bc1f87963 Add some caching to the group counts. 2008-08-28 01:09:40 +00:00
Chad Horohoe
14a80040bf Deprecate SiteStats::admins() in favor of SiteStats::numberingroup('sysop'). Should make bug 13471 easy. 2008-07-28 15:49:44 +00:00
Aryeh Gregor
3574dd82e3 Revert 36514 per Wikitech-l discussion. 2008-06-22 18:24:33 +00:00
Chad Horohoe
5c7d4d299d No need to count(*) in SiteStats::admins 2008-06-20 18:46:29 +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
Yuri Astrakhan
fa3c83c114 Statistics code cleanup, fixed multiple db reload bug. 2007-08-09 12:27:50 +00:00
Aryeh Gregor
a4e96dbddb Er, right. Best to have "return true;" somewhere in the function, isn't it? 2007-07-16 20:05:32 +00:00
Aryeh Gregor
8959942024 Whoops, reversed inequality. Forgot to check whether this is being run *too* often. 2007-07-16 20:01:54 +00:00
Aryeh Gregor
c3311c0887 (bug 4650) Added various sanity checks to site stats generation. 2007-07-16 19:48:18 +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
Nick Jenkins
558807bb9c Suspect $dbr was undefined in this scope. 2007-03-23 08:48:27 +00:00
Brion Vibber
6479ad2cda * Lazy-initialize site_stats row on load when empty. Somewhat kinder to
dump-based installations, avoiding PHP warnings when NUMBEROFARTICLES
  and such are used.
2007-02-21 00:04:21 +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
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Antoine Musso
b144fcb85d Rename constructors to __constructor 2007-01-20 13:34:31 +00:00
Nick Jenkins
07f59df83b $fname is not defined / null in these contexts, replacing with __METHOD__ 2006-11-29 12:45:47 +00:00
Nick Jenkins
a474761d9a Changing lines like this: "extract( $dbw->tableNames( 'page', 'archive' ) );" to be like this: "list ($page, $archive) = $dbw->tableNamesN( 'page', 'archive' );".
Three reasons for this:
1) It's better for analysis tools [which want explicit variable declaration]
2) It's easier for a human to read, as it's completely explicit where the variables came from [which is something you don't get with extract() ]
3) It makes it easier to find everywhere where a variable is used with search/grep [which you can't currently do with $tbl_page variables from things like: "extract($db->tableNames( 'page', 'revision'), EXTR_PREFIX_ALL, 'tbl');"].

Otherwise, from a functionality/efficiency perspective the two forms should be identical.

By doing this have been able run static analysis over the usages of these variables, thus eliminating 5 unneeded table names from calls, plus removing 3 unused calls entirely, and it just feels subjectively slightly nicer to me.
2006-11-27 08:36:57 +00:00
Tim Starling
2f12a58d93 * Introduced StringUtils.php, populated it with some generic string functions, both new and collected from various other files.
* Removed some backtracking regexes with an O(N^2) worst case, replaced with StringUtils::delimiterReplace(). There is a beneficial functional difference: /*/ is no longer considered to be a complete CSS comment.
* Changed the parser strip state from an array to an object. This should hopefully avoid the PHP bugs with array references. StripState uses the new ReplacementArray to do the replacements, thereby supporting FSS. 
* Removed DatabaseFunctions.php from the default startup sequence. Moved wfGetDB() to GlobalFunctions.php.
* Introduced the SiteStats class, with a collection of cached site stats accessor functions.
* Removed all global functions from Parser.php, they don't belong there.
* Made LanguageConverter use the new ReplacementArray class instead of managing its own FSS objects.
2006-11-21 09:53:45 +00:00
Renamed from includes/SiteStatsUpdate.php (Browse further)