Commit graph

31 commits

Author SHA1 Message Date
Chad Horohoe
974da20dfd Stop caring about ss_admins, we don't use it for anything anyway. Could probably be dropped from schema too. 2010-04-05 18:18:47 +00:00
Alexandre Emsenhuber
2d0dd7959c $fname -> __METHOD__ 2009-11-07 14:23:09 +00:00
Chad Horohoe
e0f51edc51 Typofix. 2009-08-02 20:00:41 +00:00
Chad Horohoe
a1c51e18af Merge maintenance-work branch (now with less errors!):
* Docs have been updated to indicate the standard on how to write maintenance scripts (MW.org docs will follow) Have ported vast majority of maintenance scripts to new format. Remaining ones (mostly FiveUpgrade-related) are a bit more tricky. commandLine.inc is untouched for now. Many have gotten code-style updates as well. Deleted .inc files were only used by their .php counterparts, and have been merged into single files.
* (bug 11867) Lock error on redirect table when running orphans.php
* (bug 16322) Allow maintenance scripts to accept DB user/pass over input or params
* (bug 18566) Maintenance script to un/protect pages
* initStats overhaul, now uses class SiteStatsInit. Also fixes bug 18930
2009-08-02 19:35:17 +00:00
Niklas Laxström
2dce653596 Whitespace 2009-07-18 07:44:57 +00:00
Brion Vibber
1c9773bd01 Revert r52336 "Merge maintenance-work branch:"
Seems to have broken a bunch of stuff. Don't commit giant non-critical changes that break Setup.php and all maint scripts. Thanks!
2009-06-24 02:49:24 +00:00
Chad Horohoe
59b60fc311 Merge maintenance-work branch:
* (bug 16322) Allow maint scripts to accept DB user/pass over input or params if no AdminSettings.php
* (bug 18768) Remove AdminSettings.php from MediaWiki core
* (bug 19157) createAndPromote error on bad password
* (bug 14201) Create AdminSettings.php during wiki installation, in the same way as LocalSettings.php
* Introduce new Maintenance class framework and port a good number of scripts over; the ones that are left are a little more complicated. Read the docs.
* Not deleting "unused" files yet, don't want to break everything at once :)
2009-06-24 02:02:37 +00:00
Tim Starling
4124558d7b For backport to 1.14.
* Made the upgrader work with SQLite
* Implemented missing schema info functionality in DatabaseSqlite
* Merged the SQLite and MySQL schemas into the one file with the help of some replaceVars() hacks.
* Moved all primary key definitions to the field definition, moved all indexes to CREATE INDEX statements, for best SQLite compatibility.
* Made all autoincrement fields primary keys, as required by SQLite.
* Removed meaningless buzzword from the category table comment
* tables.sql: s/'0'/0/
* In SQLite the index names have DB scope. Renamed archive.usertext_timestamp, user_newtalk.user_id, user_newtalk.user_ip
* SQLite does not support UPDATE with LIMIT by default. Removed all instances I could find.
* Made query errors work in the installer.
* Fixed DatabaseSqlite::lastErrno(), made SQLITE_SCHEMA errors automatically reissue the query as suggested on sqlite-users. Otherwise upgrade breaks.
* Removed miscellaneous status information from getServerVersion(), that's not the place to put it
2009-01-15 06:56:58 +00:00
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)