Commit graph

689 commits

Author SHA1 Message Date
Kaldari
9ec8e3525b (bug 27757) API method for retrieving tokens
Change-Id: I58bc5847b996d100712781052f20150f76786ed1
2012-04-02 18:06:03 +01:00
Aaron Schulz
74e089667c [FileBackend] Moved scoped timeout stuff to its own file. Also removed some commented-out code (such a call would belong in LocalFile more so than here).
Change-Id: I0f0b7fe1a0f1da3fffe57c58b9f4d5a77d97cd29
2012-03-27 11:45:48 -07:00
Aaron Schulz
215be530dd [FileBackend]
* Added FileJournal class to log file changes for file backends. This can be used for migrations (like moving to Swift), syncing mirror repos, consistency checks, finishing/reverting operation batches, and such. The default journal is the "null" journal, which simply does nothing.
* Added the optional schema change required for using the DBFileJournal (MySQL, SQLite).

Change-Id: I33c9f9a598ba1f164c862b9dc3c718f9172db02b
2012-03-27 15:27:14 +11:00
Daniel Friesen
36b1172147 Add GitInfo class.
This adds GitInfo which is used by Special:Version to get the SHA1 of
the git repo.
It's also useful for development to put blocks of config in
LocalSettings.php that only apply to branches where you are developing
large features:

  if ( GitInfo::currentBranch() == 'myrewriteproject' ) {
    // […]
  }

Change-Id: I2a76662bb40080be6556d4edf60ac6714f36a727
2012-03-23 15:55:12 +01:00
Roan Kattouw
0fca9a7991 Revert r107309, r113601, r113704, r113742, r113792, r113838, r113859, r113893, r113894, r113952, r114047, r114252, r114256, r114257. This reverts the remaining 'new' revisions in core.
All of these revisions are tagged with 'gerritmigration' and will be resubmitted into Gerrit after the Gerrit switchover. See also http://lists.wikimedia.org/pipermail/wikitech-l/2012-March/059124.html
2012-03-21 00:16:50 +00:00
Roan Kattouw
311200ee2c Revert r114067, r114071, r114075, r114079, r114081, r114082, r114084, r114086, r114088, r114089, r114101, r114118, r114137, r114147, r114164, r114172, r114175, r114180, r114208, r114209, r114215, r114219, r114226, r114321, r114322.
This reverts the SpecialCachedPage and formatDuration sagas, with some collateral damage here and there. All of these revisions are tagged with 'gerritmigration' and will be resubmitted into Gerrit after the Gerrit switchover. See also http://lists.wikimedia.org/pipermail/wikitech-l/2012-March/059124.html
2012-03-20 23:03:59 +00:00
Daniel Friesen
e2ee009e5c Commit the cryptrand project worked on in git:
- MWCryptRand: A new api for generating cryptographic randomness for security tokens. Uses whatever cryptographic source is available and if not falls back to using random state and clock drift.
- wfRandomString - A simple non-cryptographic pesudo-random string generation function to replace wfGenerateToken which was written pretending to be secure when it's really not.
- Core updates to use MWCryptRand in various places:
-- user_token generation (to do this we stop generating user_token implicitly and only generate it when needed to avoid depleting the system's entropy pool by reading random data we'll never use)
-- email confirmation token generation
-- password salt generation
-- temporary password generation
-- Generation of the automatic watchlist token
-- login and create user tokens
-- session ids when php's entropy sources are not set
-- the installer when generating wgSecretKey and the upgrade key
2012-03-20 05:17:40 +00:00
Jeroen De Dauw
3cad6eb042 follow up to r114215, fix some fails and added CachedAction implementing the same stuff as SpecialCachedPage 2012-03-20 00:04:36 +00:00
Jeroen De Dauw
7c92fcab00 split general cache helper functionality to its own class, so we can also easily use it in stuff that does not derive from SpecialPage, such as Action 2012-03-19 23:33:25 +00:00
Jeroen De Dauw
b2134bbd0e adding special page with scaffolding for caching chunks of HTML 2012-03-17 22:26:02 +00:00
Aaron Schulz
d19f54602f [FileBackend]
* Added FileJournal class to log file changes for file backends. This can be used for migrations (like moving to Swift), syncing mirror repos, consistency checks, finishing/reverting operation batches, and such. The default journal is the "null" journal, which simply does nothing.
* Added the optional schema change required for using the DBFileJournal (MySQL, SQLite).
2012-03-13 01:46:33 +00:00
Aaron Schulz
ea99d8290a Moved FileBackendStore and helper classes to their own file (no code changes). Updated AutoLoader. 2012-03-03 18:29:38 +00:00
Daniel Friesen
d0a51ee5a4 Fix bug 34684 in my PathRouter code:
- Update the tests to test extra characters and patterns like like \\ and $1
- Also update the tests to make sure that matches that don't have enough data to work fail
- Replace the str_replace and preg_match based code with code based on preg_replace_callback.
2012-02-24 11:31:36 +00:00
Daniel Friesen
d293a19804 Revert CryptRand class in r111964 till after the git migration. 2012-02-20 22:35:14 +00:00
Daniel Friesen
3040055fc5 Commit a new cryptographic random generator class for use in MediaWiki.
Waiting for it to be reviewed before actually making use of it inside code and adding a RELEASE-NOTES entry.
2012-02-20 21:22:52 +00:00
Jeroen De Dauw
179ff65cb0 comment out inclusion awaiting putting this stuff back after slush 2012-02-15 22:59:06 +00:00
Jeroen De Dauw
a809eda1a4 follow up to r111264; split up class into one representing a table and one representing rows. Also getting rid of staticness, in particular LSB, so this becomes PHP 5.2 compatible. Not done yet, will follow up later 2012-02-14 18:11:52 +00:00
Brian Wolff
d5b26e049a Give a warning when people use $wgArticle. Add's a class that can be used to give warnings for other globals too.
See discussion on r111168.

Of course no one will see warning because trunk has $wgDeprecationReleaseLimit set to 1.17 by default
(<rant>have I mentioned how I don't like that variable. People enable warnings to be *warned* about
things. Making it so people won't get warned about things until a couple months after we've decided people
should stop using function/interface/etc defeats the purpose of having warnings</rant>)

p.s. Wasn't sure if this waranted something in the release notes, I don't think it does (It's just adding a warning)
but wasn't sure.
2012-02-13 00:19:06 +00:00
Jeroen De Dauw
b206cadcdb adding DBDataObject class after having some people review it and posting on the list. docs can currently be found at https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw/DBDataObject 2012-02-11 21:34:01 +00:00
Roan Kattouw
57310ab838 (bug 34289) user.options CSS loaded twice. Fixed by splitting off the CSS part of user.options into a separate module (user.cssprefs), as per the fixme comment added in r93363. No RELEASE-NOTEs because this is a regression fix that I'm gonna tag for backporting to 1.19 2012-02-09 11:04:24 +00:00
Sam Reed
728acedf72 Followup r110001
Add BadTitleError to AutoLoader.php
2012-01-31 15:56:17 +00:00
Aaron Schulz
92408acbfb Renamed FileBackend to FileBackendStore and ugly FileBackendBase to FileBackend. Callers doing things like FileBackend::extensionFromPath() are now more proper. 2012-01-29 22:22:28 +00:00
Aaron Schulz
0fc544635d * Moved FSFile classes from file/ to backend/
* Improved $this->lockCount check in LockServerDaemon
2012-01-24 02:46:21 +00:00
Niklas Laxström
b18bef923b Split LogPager out of LogEventsList.php 2012-01-20 09:44:39 +00:00
Aaron Schulz
95f31706ee In FileBackend/FileOp:
* Added a sane default max file size to FileBackend. Operation batches need to check this before trying anything.
* Temporarily adjust the PHP execution time limit in attemptBatch() to reduce the chance of dying in the middle of it. Also added a maximum batch size limit.
* Added some code comments.
2012-01-19 02:07:48 +00:00
Krinkle
d03087df35 [Actions] Move the remaining actions out of MediaWiki::performAction into single action classes (finally).
- [Actions] -
* I am aware that eventually these classes should be more than just a few lines re-directing control to WikiPage, but I'm keeping these commits as uncontroversial as possible due to feature freeze. Refactor could be done later.
* Contributes to solution of bug 27930 - Ablity to get current action (The Right Way)
* Final goal: Get the current action without needing access to Wiki.php internals (i.e. with Action::factory in one hand and an instance of IContextSource in the other)
* Required for proper fix of r108342/108343 (currently marked FIXME)
2012-01-17 19:56:08 +00:00
Aaron Schulz
cf4049dc39 Added CurlHttpRequest to AutoLoader.php 2012-01-17 03:58:41 +00:00
Aaron Schulz
9d49164df1 * Renamed ContainerShardListIterator -> FileBackendShardListIterator
* Renamed FSFileIterator -> FSFileBackendFileList
* Renamed SwiftFileIterator -> SwiftFileBackendFileList and added it to autoloader
* A few minor doc fixes
2012-01-14 01:52:19 +00:00
Aaron Schulz
66e1422948 * Merged (added) SwiftFileBackend class from branch.
* Added i18n messages used by the new class.
2012-01-12 20:01:54 +00:00
Antoine Musso
44b06f908e reverts Concurrency works
trunk is frozen pending stabilisation so we can release MediaWiki 1.19.
Those changes introduces API changes and new SQL tables, so that sounds like
new feature we do not have time to review right now.

Please reapply changes in branches/concurrency and have code review handled
there. Once the branch has been reviewed, please hold. Once trunk is stable
enough and 1.19 got branched, you are welcome to merge the branch in trunk.

Note: we can have a Jenkins jobs setup to run the branch tests if you need.

Reverts:
r108595 r108591 r108585 r108584 108572 r108564 108560 r108559
2012-01-11 09:05:56 +00:00
Ian Baker
b3c84ce261 MERGE branches/concurrency 108301:108557 into trunk 2012-01-10 23:03:03 +00:00
Niklas Laxström
055a1c485c Moved GenderCache to cache/ 2012-01-10 07:39:51 +00:00
Platonides
4fc7769069 Revert r108358. It's a good fellow and we like to keep it. 2012-01-09 22:33:00 +00:00
Chad Horohoe
95d52efc32 * Drop old parserTests.php way of running parser tests. You can run parser tests via --group Parser or specifying
the includes/parser/MediaWikiParserTest.php test case
* Drop now unused various test recorder options -- phpunit outputs its data in lots of machine-readable formats, use those if you need to work with
  test data
* There's still a lot of duplication between NewParserTest::setUp() and MediaWikiTestCase, but hey one step at a time ;-)
* All tests pass for me (make phpunit && make parser)
2012-01-08 17:28:13 +00:00
Aaron Schulz
339e1ce7d4 * Updated rebuildImages.php per r106752.
* Also added FIXME about old call to bogus renameFile() function in rebuildImages.php.
* Added ContainerShardIterator class from r107980 to autoloader.
* Added a few FileBackend comments and improved FileRepo::enumFiles() comments.
2012-01-04 08:07:52 +00:00
Antoine Musso
c447423593 merge JSTesting branch into trunk
Changed written by Timo and reviewed by Hashar. This should be harmless.

To enable the feature:
  $wgEnableJavaScriptTest = true;

Then head to:
  [[Special:JavaScriptTest/qunit]]
2012-01-03 18:33:26 +00:00
Mark A. Hershberger
8d2a865869 alphabetize includes/media autoloaders + some whitespace 2011-12-27 13:34:28 +00:00
Mark A. Hershberger
25860829ac r107351: forgot to commit the changes to AutoLoader ... also update a comment 2011-12-27 02:05:24 +00:00
Ian Baker
59f93398a5 added missing UploadStash exceptions to AutoLoader 2011-12-22 00:11:38 +00:00
Sam Reed
a818723197 Fix AutoLoader fail from r106800 2011-12-20 15:02:39 +00:00
Sam Reed
1bbdc44b31 Move registration form template to its own file 2011-12-20 14:01:09 +00:00
Aaron Schulz
5275f9b097 Merged FileBackend branch. Manually avoiding merging the many prop-only changes SVN likes to sprinkle in (easy to spot from the change list). Did not add SwiftFileBackend.php as it still is in development. 2011-12-20 03:52:06 +00:00
Jeroen De Dauw
9dbfc9f4af follow up to r106272, alphabetical order so Nikerabbit doesnt go mad :) 2011-12-15 16:23:33 +00:00
Jeroen De Dauw
ed8d203227 move logging pages to logging dir 2011-12-14 22:48:48 +00:00
Brion Vibber
1200ae7dae Revert r104353, r104354, r104356, r104358, r104383: changes to pagers breaking existing links as noted in CR. 2011-12-06 19:32:29 +00:00
John Du Hart
0de3082ca4 Adding new debugging toolbar
Needs a UI cleanup still, but for the most part is working.
2011-12-04 18:29:57 +00:00
Roan Kattouw
9a21633faa Add RefreshLinks class to the AutoLoader, I'll need it for my cleanup script for bug 31576 2011-11-30 20:03:34 +00:00
Jan Gerber
0095c08ed2 Use database to track uploaded chunks and concatenate at the end.
with i18n documentation dont break phpunit

follow up r93720
2011-11-30 14:56:40 +00:00
Roan Kattouw
e83bb90997 Revert r104659 and its followup r104665: break the unit tests with a fatal error. This cripples our CI system, we can't detect new failures this way. 2011-11-30 13:54:35 +00:00
Daniel Friesen
8f8d8e4dfc Recommit PathRouter code from r104274, r104284, r104285 without the WebRequest.php and hooks.txt code so we can start to add tests and fix the bug in it. 2011-11-30 13:37:22 +00:00